Viewbox.StretchDirection Propriété
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Obtient ou définit le , qui détermine la façon dont la StretchDirectionmise à l’échelle est appliquée au contenu d’un 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
Valeur de propriété
Qui StretchDirection détermine la façon dont la mise à l’échelle est appliquée au contenu d’un Viewbox. La valeur par défaut est Both.
Exemples
L’exemple suivant montre comment créer une instance de Viewbox la propriété, puis définir la propriété à l’aide StretchDirection du 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
Remarques
Cette propriété détermine les restrictions de mise à l’échelle qui s’appliquent au contenu d’un Viewbox. Par exemple, utilisez cette propriété pour empêcher le contenu d’un objet Viewbox d’être plus petit ou plus grand que sa taille d’origine.
Informations sur les propriétés de dépendance
| Élément | Valeur |
|---|---|
| Champ d’identificateur | StretchDirectionProperty |
Propriétés de métadonnées définies sur true |
AffectsMeasure |