This documentation is archived and is not being maintained.

GridViewHeaderRowPresenter.ColumnHeaderContextMenu Property

Gets or sets a ContextMenu for the column headers.

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

public ContextMenu ColumnHeaderContextMenu { get; set; }
/** @property */
public ContextMenu get_ColumnHeaderContextMenu ()

/** @property */
public void set_ColumnHeaderContextMenu (ContextMenu value)

public function get ColumnHeaderContextMenu () : ContextMenu

public function set ColumnHeaderContextMenu (value : ContextMenu)

    <ContextMenu .../>

Property Value

The ContextMenu for the column header row. The default value is a null reference (Nothing in Visual Basic).

Identifier field


Metadata properties set to true


When you implement this class as part of a GridView view mode, the value of this property is bound to the value of the ColumnHeaderContextMenu property on the GridView.

You can customize column headers in a GridView view mode by using a variety of properties that are found in this class and in related classes. For more information about these properties, and about the precedence between them, see GridView Column Header Styles and Templates Overview.

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