Condividi tramite


Viewbox.Stretch Proprietà

Definizione

Ottiene o imposta la ViewboxStretch modalità , che determina il modo in cui il contenuto rientra nello spazio disponibile.

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

Valore della proprietà

Oggetto Stretch che determina il modo in cui il contenuto rientra nello spazio disponibile. Il valore predefinito è Uniform.

Esempio

Nell'esempio seguente viene illustrato come creare un'istanza di Viewbox e quindi impostare la proprietà usando il Stretch codice .


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

Commenti

Informazioni sulle proprietà di dipendenza

Elemento Valore
Campo Identificatore StretchProperty
Proprietà dei metadati impostate su true AffectsMeasure

Si applica a

Vedi anche