Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why the ' ', hexadecimal value 0x0C, is an invalid character. Line 1, position 1. throws in WPF

When i load a xxxx.XAML into WPF frame it throws the error ' ', hexadecimal value 0x0C, is an invalid character. Line 1, position 1. how to find which is causing the problem. when the xxxx.XAML is in another project's start page, it works fine, when i load that condent of xxxx.XAML in arother project means it throws an error why this is happening ?

And also i upgrade my project from vs 2010 to vs 2012

like image 613
BalaKrishnan웃 Avatar asked Jan 16 '13 06:01

BalaKrishnan웃


People also ask

What is hexadecimal value 0x0C?

Hexadecimal value 0x0C, is an invalid character exception.

What character is hexadecimal value 0x00?

Hexadecimal value 0x00 is a invalid character.

What is hexadecimal value 0x00?

"hexadecimal value 0x00 is an invalid character, line 1 position 1" when creating an e-file in Taxwise®. Article Type: 08/23/2022.


1 Answers

In my case it was that I wanted to load a XAML file using the code below, but it's Build Action was set to Page instead of Resource:

Uri uri = new Uri(resourcePath, System.UriKind.Relative);
Stream stream = Application.GetResourceStream(uri).Stream;
UIElement view = (UIElement)XamlReader.Load(stream);
stream.Close();
like image 92
XMight Avatar answered Sep 17 '22 16:09

XMight