MediaElement.Stretch 속성

정의

대상 사각형을 Stretch 채우는 방법을 MediaElement 설명하는 값을 가져오거나 설정합니다.

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

속성 값

렌더링된 미디어의 스트레치 값입니다. 기본값은 Uniform입니다.

예제

다음 예제에서는 콘텐츠 모드를 Viewbox 만들고 설정하는 Stretch 방법을 보여줍니다.


// Create a Viewbox and add it to the Canvas
myViewbox = gcnew Viewbox();
myViewbox->StretchDirection = StretchDirection::Both;
myViewbox->Stretch = Stretch::Fill;
myViewbox->MaxWidth = 400;
myViewbox->MaxHeight = 400;

// Create a Viewbox and add it to the Canvas
myViewbox = new Viewbox();
myViewbox.StretchDirection = StretchDirection.Both;
myViewbox.Stretch = Stretch.Fill;
myViewbox.MaxWidth = 400;
myViewbox.MaxHeight = 400;

' Create a ViewBox and add it to the Canvas
Dim myViewbox As New Viewbox()
myViewbox.StretchDirection = StretchDirection.Both
myViewbox.Stretch = Stretch.Fill
myViewbox.MaxWidth = 400
myViewbox.MaxHeight = 400

설명

다음 그림에서는 다양한 Stretch 값을 보여 줍니다.

다른 TileBrush Stretch 설정 다른 그라데이션 스프레드 메서드

종속성 속성 정보

항목 가치
식별자 필드 StretchProperty
메타데이터 속성이 다음으로 설정됩니다. true AffectsMeasure

적용 대상