Adding an image to silverlight

How to add images to Silverlight?

+3
source share
2 answers

If you just want to add a local image to the xaml control, use the following:

<Image x:Name="LocalImage" Source="Path/MyImage.png" Margin="10,10,0,0" Width="16" Height="16" HorizontalAlignment="Left" VerticalAlignment="Top" />

If this is not what you want, then you may need a more detailed question.

+7
source

The first thing you need to do is add an image to your silverlight project. Usually I make a folder in my project called images.

Once you have the images in your project, you will make sure that the publication of these images will also be published.

, , - , silverlight . jpeg. png.

png, , Paint.net

png- , XAML :

<Canvas>
<Image Source="Images/OnlineChess.png" Stretch="Fill" Canvas.Left="350" Canvas.Top="74"
                           Width="100" Height="103" Margin="10,10,10,10"/>
</Canvas>
+4

Source: https://habr.com/ru/post/1713306/


All Articles