ContextMenu 样式和模板ContextMenu Styles and Templates
03/30/2017
本文内容
本主题描述控件的样式和模板 ContextMenu 。This topic describes the styles and templates for the ContextMenu control. 您可以修改默认值 ControlTemplate ,为控件指定独特的外观。You can modify the default ControlTemplate to give the control a unique appearance. 有关详细信息,请参阅为 控件创建模板。
ContextMenu 部件ContextMenu Parts
ContextMenu控件没有任何命名部分。The ContextMenu control does not have any named parts.
When you create a ControlTemplate for a ContextMenu, your template might contain an ItemsPresenter within a ScrollViewer. (The ItemsPresenter displays each item in the ContextMenu; the ScrollViewer enables scrolling within the control). If the ItemsPresenter is not the direct child of the ScrollViewer, you must give the ItemsPresenter the name, ItemsPresenter.
ContextMenu 状态ContextMenu States
下表列出了控件的可视状态 ContextMenu 。The following table lists the visual st