Viewbox.StretchDirection Özellik

Tanım

ölçeklendirmenin StretchDirectioniçeriğine Viewboxnasıl uygulanacağını belirleyen öğesini alır veya ayarlar.

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

Özellik Değeri

Ölçeklendirmenin StretchDirection içeriğinin nasıl uygulanacağını belirleyen bir Viewbox. Varsayılan değer: Both.

Örnekler

Aşağıdaki örnekte, örneğinin Viewbox nasıl oluşturulacağı ve ardından kod kullanılarak özelliğinin StretchDirection nasıl ayarlanacağı gösterilmektedir.


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

Açıklamalar

Bu özellik, içeriği Viewboxiçin geçerli olan ölçeklendirme kısıtlamalarını belirler. Örneğin, içeriğinin özgün boyutundan Viewbox daha küçük veya daha büyük olmasını önlemek için bu özelliği kullanın.

Bağımlılık Özelliği Bilgileri

Tanımlayıcı alanı StretchDirectionProperty
Meta veri özellikleri olarak ayarlandı true AffectsMeasure

Şunlara uygulanır

Ayrıca bkz.