Tag: image

  • Working with Image.Source on Silverlight 3

    Below are some options to work with Image.Source 1. Embedded in the .xap file as Content Note that the Build Action is “Content” XAML <Image x:Name=”imgContent” Source=”/Assets/Images/2.jpg” /> Code (C#) imgContent.Source = new BitmapImage(new Uri(“/Assets/Images/2.jpg”, UriKind.Relative)); 2. Embedded in the .xap file as Resource Note that the Build Action is “Resource” XAML <Image x:Name=”imgResource” Source=”/SilverlightApplication1;component/Assets/Images/1.jpg”…