ContextMenu.IsOpen プロパティ
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
ContextMenuが表示されるかどうかを示す値を取得または設定します。
public:
property bool IsOpen { bool get(); void set(bool value); };
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.Browsable(false)]
public bool IsOpen { get; set; }
[<System.ComponentModel.Bindable(true)>]
[<System.ComponentModel.Browsable(false)>]
member this.IsOpen : bool with get, set
Public Property IsOpen As Boolean
プロパティ値
true
ContextMenuが表示されている場合は。それ以外の場合はfalse。 既定値は、false です。
- 属性
例
この例では、 IsOpen プロパティが true に設定されているかどうかを確認する方法を示します。
if (cm.IsOpen)
{
cmButton.Content = "The ContextMenu opened and the IsOpen property is true.";
}
If cm.IsOpen = True Then
cmButton.Content = "The ContextMenu opened and the IsOpen property is true."
End If
注釈
IsOpenがtrueに設定されている場合、マウス キャプチャはContextMenuとそのサブツリーに設定されます。
依存関係プロパティ情報
| 品目 | 価値 |
|---|---|
| 識別子フィールド | IsOpenProperty |
に設定されたメタデータ プロパティ true |
BindsTwoWayByDefault |