Export (0) Print
Expand All

Image.Source Property

Gets or sets the ImageSource for the image.

Namespace:  System.Windows.Controls
Assembly:  PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation

member Source : ImageSource with get, set
<object Source="imageUri"/>
For XAML information, see the ImageSource type.

XAML Values

imageUri

System.String

A URI of the image file.

Property Value

Type: System.Windows.Media.ImageSource
The source of the drawn image. The default value is a null reference (Nothing in Visual Basic).

Identifier field

SourceProperty

Metadata properties set to true

AffectsMeasure,

AffectsRender

The following example demonstrates how to use the Source property.

No code example is currently available or this language may not be supported.
<Image Source="smiley_stackpanel.png" Stretch="Fill"/>

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft