Viewbox.Stretch Eigenschap

Definitie

Hiermee haalt u de modus op of stelt u deze ViewboxStretch in, waarmee wordt bepaald hoe inhoud in de beschikbare ruimte past.

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

Waarde van eigenschap

Een Stretch die bepaalt hoe inhoud in de beschikbare ruimte past. De standaardwaarde is Uniform.

Voorbeelden

In het volgende voorbeeld ziet u hoe u een exemplaar maakt van en vervolgens de Viewbox eigenschap instelt met behulp van Stretch 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

Informatie over afhankelijkheidseigenschappen

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

Van toepassing op

Zie ook