Accessing image from Resource File in XAML markup






3.86/5 (7 votes)
Accessing image from Resource File in XAML markup
Suppose we have an image in our Resource file named as LeftBaseTriangle.bmp.
In order to access it via XAML, all we need is to add a reference to project properties like below:
xmlns:properties="clr-namespace:Azad.Modules.MyProject.Properties"
and add the following code:
<image source="{Binding Source={x:Static properties:Resources.LeftBaseTriangle}}" />