This is perplexing, in winforms it is unforgivably easy, but in WPF it seems impossible.
I need to set the grid background to the image, it must be just what I thought.
The image was configured as a resource (right-click on the project name → properties → resource tab → import an existing file), but when I click on the "Background" property and select a brush for the tile, it points me to the file that is imported into the folder " Resources ", this works until the application is launched from outside the visual studio where it does not work.
<Grid Width="550" Height="350">
<Grid.Background>
<ImageBrush ImageSource="Resources/CINTRA2016.png"/>
</Grid.Background>
I have the code above in XAML, how do I work with resources? I also tried <ImageBrush ImageSource="pack://application:,,,/CINTRA 2016;CINTRA2016"/>that did not work.
Both images have a resource build action in Solution Explorer
source
share