microsoft-ui-xaml icon indicating copy to clipboard operation
microsoft-ui-xaml copied to clipboard

EmbeddedResource in Xaml

Open RoccoZero opened this issue 1 year ago • 1 comments

I don't understand why this code doesn't work

<Image Source="pack://application:,,,/Resources/Steam.png" Width="30"/>

https://stackoverflow.com/questions/62032643/using-image-in-xaml-from-resources-resx

how should I use embedded resource? I just don't want all the resources to be in the bin folder can someone help me on how to use EmbeddedResource in Xaml?

RoccoZero avatar Jun 26 '24 23:06 RoccoZero

I don't understand why this code doesn't work

<Image Source="pack://application:,,,/Resources/Steam.png" Width="30"/>

https://stackoverflow.com/questions/62032643/using-image-in-xaml-from-resources-resx

how should I use embedded resource? I just don't want all the resources to be in the bin folder can someone help me on how to use EmbeddedResource in Xaml?

This applies only to wpf, please use ms-appx for winui resources.Or you can manually load the bytes[] binary stored in the resx file in the background code

Gaoyifei1011 avatar Jun 29 '24 03:06 Gaoyifei1011