StretchDirection 列挙型
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
スケーリングがコンテンツにどのように適用されるかについて説明し、スケーリングを名前付き軸の種類に制限します。
public enum class StretchDirection
public enum StretchDirection
type StretchDirection =
Public Enum StretchDirection
- 継承
フィールド
| 名前 | 値 | 説明 |
|---|---|---|
| UpOnly | 0 | コンテンツは、親よりも小さい場合にのみ上向きにスケーリングされます。 コンテンツが大きい場合、スケールダウンは実行されません。 |
| DownOnly | 1 | コンテンツは、親よりも大きい場合にのみ下方向に拡大縮小されます。 コンテンツが小さい場合、スケールアップは実行されません。 |
| Both | 2 | コンテンツは、 Stretch モードに従って親に合わせて拡張されます。 |
例
次の例では、コードを使用して Viewbox のインスタンスを作成し、コンテンツの StretchDirection を設定する方法を示します。
// 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