StretchDirection 열거형

정의

크기 조정이 콘텐츠에 적용되는 방법을 설명하고 크기 조정을 명명된 축 유형으로 제한합니다.

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

필드

Both 2

콘텐츠는 Stretch 모드에 따라 부모에 맞게 확장합니다.

DownOnly 1

콘텐츠 부모 보다 큰 경우에 크기가 줄어듭니다. 콘텐츠가 더 작은 경우 크기가 커지지 않습니다.

UpOnly 0

부모보다 작은 경우에만 콘텐츠 크기가 커집니다. 콘텐츠가 더 큰 경우 크기가 줄어들지 않습니다.

예제

다음 예제에는 인스턴스를 만드는 방법을 보여 줍니다 Viewbox 설정의 StretchDirection 코드를 사용 하 여 콘텐츠입니다.


// 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

적용 대상

추가 정보