ContextMenu.HasDropShadow 属性

定义

获取或设置一个值,该值指示上下文菜单显示时是否有投影。Gets or sets a value that indicates whether the context menu appears with a dropped shadow.

public:
 property bool HasDropShadow { bool get(); void set(bool value); };
public bool HasDropShadow { get; set; }
member this.HasDropShadow : bool with get, set
Public Property HasDropShadow As Boolean

属性值

如果上下文菜单显示时有投影,则为 true;否则为 falsetrue if the context menu appears with a dropped shadow; otherwise, false. 默认值为 falseThe default is false.

示例

下面的示例演示如何使用 HasDropShadow 属性。The following example shows how to use the HasDropShadow property.

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

注解

ContextMenu 打开时,该值将设置为 SystemParameters.DropShadow的值。When the ContextMenu opens, the value is set to the value of SystemParameters.DropShadow. 如果 SystemParameters.DropShadow 属性 false,则将此属性设置为 true 不起作用。Setting this property to true has no effect if the SystemParameters.DropShadow property is false.

依赖项属性信息Dependency Property Information

标识符字段Identifier field HasDropShadowProperty
元数据属性设置为 trueMetadata properties set to true None

适用于

另请参阅