This documentation is archived and is not being maintained.

ContextMenu.IsOpen Property

Gets or set the IsOpen property of a context menu.

Namespace: System.Windows.Controls
Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace:

public bool IsOpen { get; set; }
/** @property */
public boolean get_IsOpen ()

/** @property */
public void set_IsOpen (boolean value)

public function get IsOpen () : boolean

public function set IsOpen (value : boolean)

<object IsOpen="bool" .../>

Property Value

A Boolean value, the default value is false.

Identifier Field


Metadata Flags


When IsOpen is set to true, mouse capture is set to the ContextMenu and its subtree.

This example shows how to check to determine whether the IsOpen property is set to true.

if (cm.IsOpen == true)
    cmButton.Content = "The ContextMenu opened and the IsOpen property is true.";

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0