I am working on a WPF application using .net core 3.0 preview.
I tried the following line of xaml
code in both .net core 3.0 preview
and .net framework
.
<Grid>
<Image Source="system-tray.jpg"/>
</Grid>
This works fine in .Net Framework
but doesn't work in .Net Core 3.0 preview
Any thoughts!..
For those coming by here in the future looking for an answer, like I did, here's the thing to check:
Make sure the Build Action for your image files in Visual Studio is set to "Resource". This can be checked by right-clicking the image file in the Solution Explorer and selecting "Properties".
Source: github.com/dotnet/wpf/issues/292 per question comment by Clemens
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With