StretchDirection Enum

Definition

Beskriver hur skalning gäller för innehåll och begränsar skalning till namngivna axeltyper.

public enum class StretchDirection
public enum StretchDirection
type StretchDirection = 
Public Enum StretchDirection
Arv
StretchDirection

Fält

Name Värde Description
UpOnly 0

Innehållet skalas endast uppåt när det är mindre än det överordnade innehållet. Om innehållet är större utförs ingen nedskalning nedåt.

DownOnly 1

Innehållet skalar bara nedåt när det är större än det överordnade innehållet. Om innehållet är mindre utförs ingen uppskalning uppåt.

Both 2

Innehållet sträcker sig så att det passar den överordnade Stretch enligt läget.

Exempel

I följande exempel visas hur du skapar en instans av Viewbox och anger StretchDirection innehållet med hjälp av kod.


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

Gäller för

Se även