I'm doing this:
<Image Grid.Column="0" Grid.Row="0" x:Name="Andromeda" Source="/Resource开发者_如何学运维s/64px-Andromedahero.gif" />
But it's just not working. :S
Here's a screenshot of the file/folder hierarchy. Any help?
A couple of potential options:
- Make sure that your resources are set to be compiled as embedded resources.
- If this is a control library, and you're using this from a separate application, you may need to use a Pack URI.
Edit:
If it's a control library, you'll want to use:
Source="pack://application:,,,/MyControlLibraryAssembly;component/Resources/64px-Andromedahero.gif"
精彩评论