StretchDirection Enumerazione

Definizione

Descrive come si applica il ridimensionamento al contenuto e limita il ridimensionamento ai tipi di asse denominati.

public enum class StretchDirection
public enum StretchDirection
type StretchDirection = 
Public Enum StretchDirection
Ereditarietà
StretchDirection

Campi

Both 2

Il contenuto si adatta al padre secondo la modalità Stretch.

DownOnly 1

Il contenuto viene proporzionalmente ridotto solo se è più grande del padre. Se il contenuto è più piccolo, non viene eseguito alcun ingrandimento proporzionale.

UpOnly 0

Il contenuto viene proporzionalmente ingrandito solo se è più piccolo del padre. Se il contenuto è più grande, non viene eseguita alcuna riduzione proporzionale.

Esempio

Nell'esempio seguente viene illustrato come creare un'istanza di Viewbox e impostare il StretchDirection contenuto usando il 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

Si applica a

Vedi anche