Image.Source 속성

정의

이미지에 대한 ImageSource 를 가져오거나 설정합니다.

public:
 property System::Windows::Media::ImageSource ^ Source { System::Windows::Media::ImageSource ^ get(); void set(System::Windows::Media::ImageSource ^ value); };
public System.Windows.Media.ImageSource Source { get; set; }
member this.Source : System.Windows.Media.ImageSource with get, set
Public Property Source As ImageSource

속성 값

ImageSource

그려지는 이미지의 원본입니다. 기본값은 null입니다.

예제

다음 예제에서는 사용 하는 방법에 설명 합니다 Source 속성입니다.

Image^ myImage3 = gcnew Image();
BitmapImage^ bi3 = gcnew BitmapImage();
bi3->BeginInit();
bi3->UriSource = gcnew System::Uri("smiley_stackpanel.PNG", UriKind::Relative);
bi3->EndInit();
myImage3->Stretch = Stretch::Fill;
myImage3->Source = bi3;
Image myImage3 = new Image();
BitmapImage bi3 = new BitmapImage();
bi3.BeginInit();
bi3.UriSource = new Uri("smiley_stackpanel.PNG", UriKind.Relative);
bi3.EndInit();
myImage3.Stretch = Stretch.Fill;
myImage3.Source = bi3;
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"/>

설명

XAML 특성 사용

<object Source="imageUri"/>  

XAML 텍스트 사용

XAML 정보는 형식을 참조하세요 ImageSource .

XAML 값

imageUri
System.String

이미지 파일의 URI입니다.

종속성 속성 정보

식별자 필드 SourceProperty
메타 데이터 속성 설정 true AffectsMeasure,

AffectsRender

적용 대상