If this is your first visit, be sure to
check out the
FAQ
by clicking the
link above. You may have to
register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.
Hi everybody,
I get this error message trying to set a background image for my WPF using Visual Basic in Visual Studio 2013 Express:
"An unhandled exception of type 'System.Windows.Markup.XamlParseException' occurred in PresentationFramework.dll
Additional information: 'Provide value on 'System.Windows.Baml2006.TypeConverterMarkupExtension' threw an exception.' Line number '7' and line position '14'.
If there is a handler for this exception, the program may be safely continued."
Here is the XAML:
<Window x:Class="MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<Grid.Background>
<ImageBrush ImageSource="space.jpg"/>
</Grid.Background>
</Grid>
</Window>
I don't understand what's wrong...
I would review a few of these possible resolutions from the page below as they seem somewhat close to what your issue might be, otherwise head back and we can try again.
http://stackoverflow.com/questions/1...ension-threw-a
These are all a little confusing to me, but I will try to look into it.
Weird - I got it to work. Before debugging, only placing "space.jpg" in xaml would load the image, but for whatever reason, gave me the crash....once I put the whole file location into xaml...it worked!
"file:///c:/users/pikey10/documents/visual studio 2013/Projects/Mission Control B/Mission Control B/space.jpg"
as opposed to "space.jpg" Even though it still loaded and everything before debugging...
Advertiser Disclosure:
Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.