Viewbox.Stretch プロパティ

定義

コンテンツを使用可能な領域に収める方法を決定する ViewboxStretch モードを取得または設定します。

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

プロパティ値

Stretch

コンテンツを使用可能な領域に収める方法を決定する Stretch。 既定値は、Uniform です。

次の例は、コードを使用してインスタンス Viewbox を作成し、プロパティを設定する方法を 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

注釈

依存プロパティ情報

識別子フィールド StretchProperty
メタデータのプロパティが次に設定されている true AffectsMeasure

適用対象

こちらもご覧ください