Windows apps
Collapse the table of content
Expand the table of content
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

MenuItem.ShouldApplyItemContainerStyle Method (DependencyObject, Object)


Used to determine whether to apply a style to the item container.

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

protected override bool ShouldApplyItemContainerStyle(
	DependencyObject container,
	object item


Type: System.Windows.DependencyObject

Container to which the style will be applied.

Type: System.Object

Item to which the container belongs.

Return Value

Type: System.Boolean

true if the MenuItem is not a Separator; otherwise, false.

.NET Framework
Available since 3.0
Return to top
© 2017 Microsoft