ContextMenu.IsOpen Vlastnost

Definice

Získá nebo nastaví hodnotu, která označuje, zda ContextMenu je viditelný.

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

Hodnota vlastnosti

trueContextMenu pokud se zobrazí, jinak hodnota false. Výchozí formát je false.

Atributy

Příklady

Tento příklad ukazuje, jak zkontrolovat, jestli IsOpen je vlastnost nastavená na true.

if (cm.IsOpen == true)
{
    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

Poznámky

Pokud IsOpen je nastavena na true, je zachytávání myši nastaveno na ContextMenu a jeho podstrom.

Informace o vlastnosti závislosti

Pole Identifikátor IsOpenProperty
Vlastnosti metadat nastavené na true BindsTwoWayByDefault

Platí pro

Viz také