MediaElement.Stretch Eigenschap

Definitie

Hiermee wordt een Stretch waarde opgehaald of ingesteld waarmee wordt beschreven hoe een MediaElement doelrechthoek wordt gevuld.

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

De stretch-waarde voor de gerenderde media. De standaardwaarde is Uniform.

Voorbeelden

In het volgende voorbeeld ziet u hoe u een Viewbox inhoudsmodus maakt en instelt 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

Opmerkingen

In de volgende afbeelding ziet u de verschillende Stretch waarden.

Verschillende TileBrush Stretch-instellingen Verschillende Verschillende methoden voor kleurovergangsspreiding

Informatie over afhankelijkheidseigenschappen

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

Van toepassing op