[]
        
(Showing Draft Content)

C1.WPF.C1Menu

C1Menu Class

The C1Menu control enables you hierarchically organize elements associated with event handlers.

Namespace: C1.WPF
Assembly: C1.WPF.4.6.2.dll
Syntax
[TemplateVisualState(Name = "Focused", GroupName = "FocusStates")]
[TemplateVisualState(Name = "Unfocused", GroupName = "FocusStates")]
[StyleTypedProperty(Property = "SeparatorStyle", StyleTargetType = typeof(C1Separator))]
[StyleTypedProperty(Property = "FirstLevelStyle", StyleTargetType = typeof(C1MenuItem))]
[StyleTypedProperty(Property = "NonFirstLevelStyle", StyleTargetType = typeof(C1MenuItem))]
public class C1Menu : C1HierarchicalPresenter, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IQueryAmbient, IAddChild, IContainItemStorage

Constructors

Name Description
C1Menu()

Initializes a new instance of a C1Menu.

Fields

Name Description
AutoCloseProperty

Identifies the AutoClose dependency property.

DetectBoundariesProperty

Identifies the DetectBoundaries dependency property.

DisabledCuesVisibilityProperty

Identifies the DisabledCuesVisibility dependency property.

FirstLevelStyleProperty

Identifies the FirstLevelStyle dependency property.

FirstLevelTemplateProperty

Identifies the FirstLevelTemplate dependency property.

FocusCuesVisibilityProperty

Identifies the FocusCuesVisibility dependency property.

HighlightedBackgroundProperty

Identifies the HighlightedBackground dependency property.

IsFocusedProperty

Identifies the IsFocused dependency property.

MenuOpenDelayProperty

Identifies the MenuOpenDelay dependency property.

NonFirstLevelStyleProperty

Identifies the NonFirstLevelStyle dependency property.

NonFirstLevelTemplateProperty

Identifies the NonFirstLevelTemplate dependency property.

OpenedBackgroundProperty

Identifies the OpenedBackground dependency property.

OrientationProperty

Identifies the Orientation dependency property.

SeparatorStyleProperty

Identifies the SeparatorStyle dependency property.

SubMenuMaxHeightProperty

Identifies the SubMenuMaxHeight dependency property.

Properties

Name Description
AutoClose

Gets or sets a value indicating if the menu will auto close when the user clicks outside of it.

DetectBoundaries

Gets or sets a value indicating if the menu will auto update the position of its sub-menus when they are close to the boundaries of the application.

DisabledCuesVisibility

Gets or sets a value indicating whether the disabled visuals of the control are visible.

FirstLevelStyle

Represents the style to apply to all menu items at the first level.

FirstLevelTemplate

Represents the template to apply to all menu items at the first level.

FocusCuesVisibility

Gets or sets a value indicating whether the focus visuals of the control are visible.

HighlightedBackground

Gets or sets the Brush used to highlight the menu item.

IsFocused

Returns true if the control has the focus.

MenuOpenDelay

Gets or Sets a value (in milliseconds) for the delay used when opening a submenu.

NonFirstLevelStyle

Represents the style to apply to all menu items that are not in the first level.

NonFirstLevelTemplate

Represents the template to apply to all menu items that are not in the first level.

OpenedBackground

Gets or sets the Brush used in a menu item when this item is opened.

Orientation

Gets or sets the direction in which to render the Menu control.

SeparatorStyle

Default style applied to the C1Separator located inside this C1Menu.

SubMenuMaxHeight

Gets or sets a value that indicates the MaxHeight of the SubMenu.

Methods

Name Description
ChangeVisualStateFocus(bool)

Updates the current visual state of the Focus visual state group to match the object's properties.

ClearContainerForItemOverride(DependencyObject, object)
Close()

Forces closing all opened sub-menus.

GetContainerForItemOverride()
IsItemItsOwnContainerOverride(object)
OnApplyTemplate()

Builds the visual tree for the C1Menu control when a new template is applied.

OnAutoCloseChanged(bool)

Called when the property AutoClose changed.

OnAutoClosed(EventArgs)

Raises the AutoClosed event.

OnAutoClosing(CancelEventArgs)

Raises the AutoClosing event.

OnItemChecked(SourcedEventArgs)

Raises the C1.Silverlight.C1Menu.ItemChecked event.

OnItemClick(SourcedEventArgs)

Raises the C1.Silverlight.C1Menu.ItemClick event.

OnItemClosed(SourcedEventArgs)

Raises the C1.Silverlight.C1Menu.ItemClosed event.

OnItemClosing(CancelSourceEventArgs)

Raises the C1.Silverlight.C1Menu.ItemClosing event.

OnItemOpened(SourcedEventArgs)

Raises the C1.Silverlight.C1Menu.ItemOpened event.

OnItemOpening(CancelSourceEventArgs)

Raises the C1.Silverlight.C1Menu.ItemOpening event.

OnItemUnchecked(SourcedEventArgs)

Raises the C1.Silverlight.C1Menu.ItemUnchecked event.

OnItemsChanged(NotifyCollectionChangedEventArgs)
PrepareContainerForItemOverride(DependencyObject, object)

Events

Name Description
AutoClosed

Occurs when the Menu is AutoClosed.

AutoClosing

Occurs when the Menu is AutoClosing.

ItemChecked

Occurs when a C1MenuItem is checked.

ItemClick

Occurs when a C1MenuItem is clicked.

ItemClosed

Occurs when a C1MenuItem is closed.

ItemClosing

Occurs when a C1MenuItem is closing.

ItemOpened

Occurs when a C1MenuItem is opened.

ItemOpening

Occurs when a C1MenuItem is opening.

ItemUnchecked

Occurs when a C1MenuItem is unchecked.

Extension Methods