-
Oct 30th, 2014, 09:02 AM
#1
Thread Starter
New Member
Error setting background image in WPF using Visual Basic, Visual Basic Studio
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>
<Grid.Background>
<ImageBrush ImageSource="space.jpg"/>
</Grid.Background>
</Grid>
</Window>
I don't understand what's wrong...
-
Oct 30th, 2014, 09:27 AM
#2
Addicted Member
Re: Error setting background image in WPF using Visual Basic, Visual Basic Studio
try press Ctrl+Alt+E to show Exception Window, and try to check all Thrown checklist, try it again
-
Oct 30th, 2014, 09:39 AM
#3
Thread Starter
New Member
Re: Error setting background image in WPF using Visual Basic, Visual Basic Studio
I checked off everything in the Thrown checklist, but it still doesn't go through...do I have to have certain things remaining checked in that checklist?
-
Oct 30th, 2014, 09:48 AM
#4
New Member
Re: Error setting background image in WPF using Visual Basic, Visual Basic Studio
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
-
Oct 30th, 2014, 10:00 AM
#5
Thread Starter
New Member
Re: Error setting background image in WPF using Visual Basic, Visual Basic Studio
Originally Posted by Turtlechalk
These are all a little confusing to me, but I will try to look into it.
-
Oct 30th, 2014, 10:40 AM
#6
Thread Starter
New Member
Re: Error setting background image in WPF using Visual Basic, Visual Basic Studio
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...
-
Oct 30th, 2014, 11:44 AM
#7
Addicted Member
Re: Error setting background image in WPF using Visual Basic, Visual Basic Studio
glad to hear it worked...
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|