HighTechTalks DotNet Forums  

Q: displaying image in WPF

Dotnet Framework microsoft.public.dotnet.framework


Discuss Q: displaying image in WPF in the Dotnet Framework forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
G. Ralph Kuntz, MD, MS
 
Posts: n/a

Default Q: displaying image in WPF - 11-19-2007 , 02:58 PM






I am probably doing something really stupid, but I cannot get an image
to display in a window using WPF.

I copied the image into my main project directory in Visual Studio
2005.

I added the appropriate lines to my XAML file:

<Image DockPanel.Dock="Top" Margin="5" Source="myimage.png" />

The image displays fine in the design view, but when I build the
project and run it, the image does not show. Other controls move to
fill the space where the image should be.

Any ideas?

Thanks, Ralph

Reply With Quote
  #2  
Old   
G. Ralph Kuntz, MD, MS
 
Posts: n/a

Default Re: Q: displaying image in WPF - 11-19-2007 , 05:19 PM






Never mind. I needed to right click on the image and tell VS to copy
it to the ouput directory if newer.

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.