This documentation is archived and is not being maintained.

ContextMenu.HasDropShadow Property

Gets or sets whether the context menu has a drop shadow.

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

public bool HasDropShadow { get; set; }
/** @property */
public boolean get_HasDropShadow ()

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

public function get HasDropShadow () : boolean

public function set HasDropShadow (value : boolean)

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

Property Value

A Boolean value that is true if the context menu has a drop shadow; false otherwise. The default is false.

Identifier Field


Metadata Flags



The default value for this property is false but the value is set to true in the ContextMenu default style.

The following example shows how to use the HasDropShadow property. Because the ContextMenu style sets the property to true this example sets the property false to show how the property renders differently.

<ContextMenu HorizontalOffset="50" VerticalOffset="50" HasDropShadow="false">

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