Stretch 열거형

정의

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

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

필드

Name Description
None 0

콘텐츠는 원래 크기를 유지합니다.

Fill 1

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

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 설정
늘이기 값

적용 대상