Viewbox.StretchDirection Eigenschap

Definitie

Hiermee wordt de StretchDirection, waarmee wordt bepaald hoe schalen wordt toegepast op de inhoud van een Viewbox.

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

Waarde van eigenschap

Een StretchDirection die bepaalt hoe schalen wordt toegepast op de inhoud van een Viewbox. De standaardwaarde is Both.

Voorbeelden

In het volgende voorbeeld ziet u hoe u een exemplaar maakt van en vervolgens de Viewbox eigenschap instelt met behulp van StretchDirection code.


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

Opmerkingen

Deze eigenschap bepaalt de schaalbeperkingen die van toepassing zijn op de inhoud van een Viewbox. Gebruik deze eigenschap bijvoorbeeld om te voorkomen dat de inhoud van een Viewbox eigenschap kleiner of groter is dan de oorspronkelijke grootte.

Informatie over afhankelijkheidseigenschappen

Item Waarde
Id-veld StretchDirectionProperty
Eigenschappen van metagegevens ingesteld op true AffectsMeasure

Van toepassing op

Zie ook