共用方式為


MenuItem.ShouldApplyItemContainerStyle(DependencyObject, Object) 方法

定義

用來判斷是否要將樣式套用至項目容器。

protected:
 override bool ShouldApplyItemContainerStyle(System::Windows::DependencyObject ^ container, System::Object ^ item);
protected override bool ShouldApplyItemContainerStyle (System.Windows.DependencyObject container, object item);
override this.ShouldApplyItemContainerStyle : System.Windows.DependencyObject * obj -> bool
Protected Overrides Function ShouldApplyItemContainerStyle (container As DependencyObject, item As Object) As Boolean

參數

container
DependencyObject

要套用至容器的樣式。

item
Object

容器所屬的項目。

傳回

Boolean

如果 MenuItem 不為 Separator,則為 true,否則為 false

適用於