Stretch 열거형

정의

할당된 공간을 채우기 위해 콘텐츠의 크기를 조정하는 방법을 설명합니다.

public enum class Stretch
public enum Stretch
type Stretch = 
Public Enum Stretch
상속

필드

Fill 1

대상 크기가 채워지도록 콘텐츠 크기가 조정됩니다. 가로 세로 비율은 유지되지 않습니다.

None 0

콘텐츠의 원래 크기를 그대로 유지합니다.

Uniform 2

원래의 가로 세로 비율을 유지하면서 대상 크기에 맞게 콘텐츠 크기가 조정됩니다.

UniformToFill 3

원래의 가로 세로 비율을 유지하면서 대상 크기에 맞게 콘텐츠 크기가 조정됩니다. 대상 사각형의 가로 세로 비율이 원본과 다를 경우 원본 콘텐츠가 대상 크기에 맞게 잘립니다.

예제

다음 예제에는 인스턴스를 만드는 방법을 보여 줍니다는 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 설정
늘이기 값

적용 대상