The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
Image.Source Property
.NET Framework (current version)
Gets or sets the ImageSource for the image.
Assembly: PresentationFramework (in PresentationFramework.dll)
Property Value
Type: System.Windows.Media.ImageSourceThe source of the drawn image. The default value is null.
<object Source="imageUri"/>
For XAML information, see the ImageSource type.
- imageUri
A URI of the image file.
Identifier field | |
Metadata properties set to true |
The following example demonstrates how to use the Source property.
Dim myImage3 As New Image Dim bi3 As New BitmapImage bi3.BeginInit() bi3.UriSource = New Uri("smiley_stackpanel.PNG", UriKind.Relative) bi3.EndInit() myImage3.Stretch = Stretch.Fill myImage3.Source = bi3
<Image Source="smiley_stackpanel.png" Stretch="Fill"/>
.NET Framework
Available since 3.0
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Available since 3.0
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Show: