MediaElement.Stretch プロパティ
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
Stretchが目的の四角形をどのように塗りつぶすかを示すMediaElement値を取得または設定します。
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
プロパティ値
レンダリングされたメディアのストレッチ値。 既定値は 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
注釈
次の図は、さまざまな Stretch 値を示しています。
さまざまなグラデーションの広がり方法
依存関係プロパティ情報
| 品目 | 価値 |
|---|---|
| 識別子フィールド | StretchProperty |
に設定されたメタデータ プロパティ true |
AffectsMeasure |