Search This Blog

Thursday, December 1, 2011

Silverlight xaml style add image

I will cover adding images with the example of ToggleButton. To add an image to a Silverlight style just do the following:

    <Image Source="/Some.Company.Namespace.ModuleName;component/Styles/Images/image.png" Width="10" Height="10" />

Where Some.Company.Namespace.ModuleName is the assembly name (project properties->Assembly name). This is followed by ‘component’ which denotes project folder. Then we have folder path and image file name.

So the path is:


1 comment:

If you like this post, please leave a comment :)