Skip to end of metadata
Go to start of metadata

Provides a lightweight control for stack menu.

Definition

public class UXStackMenu : ISDragableSelectionControl, IMenu

Summary

The following table summarizes the members exposed in this class.

Public Constructors

UXStackMenu Constructor() Initializes a new instance of the UXStackItem class.

Public Properties

ActiveIndex Gets or sets the current active selection index. Note used for internal purpose, do not change.
ActiveItem Gets or sets the current active selection item. Note used for internal purpose, do not change.
AnimatePointerMode Gets or sets the value that determines the behavior of UXCallOut pointer animation when its repositioned.
BorderThickness Not applicable. Use StrokeThickness.
CallOutEffect Gets or sets the pixel shader effect to use for rendering the call out element.
CallOutStyle Gets or sets the call out style.
DisplayAnimation Gets or sets a value that determines the display animation.
EnableFadeInAnimation Gets or sets a value that determines whether the fade animation is enabled.
EnableFadeOutAnimation Gets or sets a value that determines whether the fade animation is enabled.
EnableMouseOverState Gets or sets a value that determine whether mouse over state is enabled at StackItem level.
EnableReflection Gets or sets a value that determine whether reflection is enabled.
EnableStackGridFadeAnimation Gets or sets a value that determines whether stack grid items fading animation is enabled.
GridCallOutElement Gets the grid callout element.
HideAnimation Gets or sets a value that determines the hide animation.
ImageLoaderTextVisibility Gets or sets a value that determines whether image loader progress text is shown.
IsOpen Gets or sets a value that determines whether the UStackMenu is opened.
ItemsPresenter Gets the item presenter.
MenuCallOutElement Gets the menu callout element.
ReflectionPosition Gets or sets a value that determine the position of the reflection.
ReflectionVisibility Gets or sets a value that determine the visibility of the reflection.
RootElement Gets the root element.
ShowLatency Gets or sets a value that determine the latency before mouse enter action is executed.
StackAnimationSpeedRatio Gets or sets the stack animation speed ratio.
StackArcDegree Gets or sets the arc style degree when stack mode is set to ArcStyle.
StackArcDirection Gets or sets the arc style direction when stack mode is set to ArcStyle.
StackArcItemHeight Gets or sets the stack arc item height.
StackArcItemWidth Gets or sets the stack arc item width.
StackArcLaunchOffset Gets or sets the arc style launch offset when stack mode is set to ArcStyle.
StackArcTextOffset Gets or sets the arc text ofset position when stack mode is set to ArcStyle.
StackArcTextPosition Gets or sets the arc text position when stack mode is set to ArcStyle.
StackDockPosition Gets or sets a value that indicates the dock position of the stack menu.
StackGridColumn Gets or sets the number of grid column when stack mode is set to GridStyle.
StackGridFooterText Gets or sets the stack grid footer text.
StackGridHeaderText Gets or sets the stack grid header text.
StackGridItemHeight Gets or sets the stack grid item height.
StackGridItemMargin Gets or sets the margin between stack grid item.
StackGridItemWidth Gets or sets the stack grid item width.
StackGridMode Gets or sets stack grid mode style."
StackGridPadding Gets or sets the stack grid padding.
StackGridRow Gets or sets the number of grid row when stack mode is set to GridStyle.
StackGridTemplate Gets or sets the content template to be displayed in stack grid mode.
StackMenuItemHeight Gets or sets the stack menu item height.
StackMenuItemWidth Gets or sets the stack menu item width.
StackMode Gets or sets the stack mode.
StackTotalDisplayItem Gets or sets a value that determines the total number of sub items that will be visible when stack mode is set to ArcStyle and the stack menu is collapsed.
StaysOpen Gets or sets a value that determines whether the popup stays open regardless the hide command.
StrokeThickness Gets or sets the border thickness.
Text Gets or sets the stack menu text.
UseImageLoader Gets or sets a value that determines whether the image loader used to download the image.

Protected Properties

Product Product Info.

Fields

AnimatePointerModeProperty Identifies the AnimatePointerMode dependency property.
ArcAnimationProperty Identifies the Animation dependency property.
CallOutEffectProperty Identifies the CallOutEffect dependency property.
CallOutStyleProperty Identifies the CallOutStyle dependency property.
DisplayAnimationProperty Identifies the DisplayAnimation dependency property.
EnableFadeInAnimationProperty Identifies the EnableFadeAnimation dependency property.
EnableFadeOutAnimationProperty Identifies the EnableFadeAnimation dependency property.
EnableMouseOverStateProperty Identifies the EnableMouseOverState dependency property.
EnableReflectionProperty Identifies the EnableReflection dependency property.
EnableStackGridFadeAnimationProperty Identifies the EnableStackGridFadeAnimation dependency property.
HideAnimationProperty Identifies the HideAnimation dependency property.
ImageLoaderTextVisibilityProperty Identifies the ImageLoaderTextVisibility dependency property.
IsOpenProperty Identifies the IsOpen dependency property.
ReflectionPositionProperty Identifies the ReflectionPosition dependency property.
ReflectionVisibilityProperty Identifies the ReflectionVisibility dependency property.
ShowLatencyProperty Identifies the ShowLatency dependency property.
StackAnimationSpeedRatioProperty Identifies the StackAnimationSpeedRatio dependency property.
StackArcDegreeProperty Identifies the StackArcDegree dependency property.
StackArcDirectionProperty Identifies the StackArcDirection dependency property.
StackArcItemHeightProperty Identifies the StackArcItemHeight dependency property.
StackArcItemWidthProperty Identifies the StackArcItemWidth dependency property.
StackArcLaunchOffsetProperty Identifies the StackArcLaunchOffset dependency property.
StackArcTextOffsetProperty Identifies the StackArcTextOffset dependency property.
StackArcTextPositionProperty Identifies the StackArcTextPosition dependency property.
StackDockPositionProperty Identifies the StackDockPosition dependency property.
StackGridColumnProperty Identifies the StackGridColumn dependency property.
StackGridFooterTextProperty Identifies the StackGridFooterText dependency property.
StackGridHeaderTextProperty Identifies the StackGridHeaderText dependency property.
StackGridItemHeightProperty Identifies the StackGridItemHeight dependency property.
StackGridItemMarginProperty Identifies the StackGridItemMargin dependency property.
StackGridItemWidthProperty Identifies the StackGridItemWidth dependency property.
StackGridModeProperty Identifies the StackGridMode dependency property.
StackGridPaddingProperty Identifies the StackGridPadding dependency property.
StackGridRowProperty Identifies the StackGridRow dependency property.
StackGridTemplateProperty Identifies the StackGridTemplate dependency property.
StackMenuItemHeightProperty Identifies the StackMenuItemHeight dependency property.
StackMenuItemWidthProperty Identifies the StackMenuItemWidth dependency property.
StackModeProperty Identifies the StackMode dependency property.
StackTotalDisplayItemProperty Identifies the StackTotalDisplayItem dependency property.
StaysOpenProperty Identifies the StaysOpen dependency property.
StrokeThicknessProperty Identifies the StrokeThickness dependency property.
TextProperty Identifies the Text dependency property.
UseImageLoaderProperty Identifies the UseImageLoader dependency property.

Static Methods

GetArcAnimation(UIElement) Gets animation value from target element.
SetArcAnimation(UIElement, Storyboard) Sets animation value to target element.

Public Methods

AttachEventHandlers() Attach built-in event handlers to control templates. Call this method if necessary.
DetachedEventHandlers() Detach built-in event handlers from control templates. Call this method if necessary.
InitializeStoryboards() Initializes storyboards.
InitializeTemplates() Initializes control templates.
KeyDownItemSelect(UXMenuItem) Perform item selection on keydown. Note used for internal purpose, call if necessary.
OnApplyTemplate() Builds the visual tree for the UXStackMenu when a new template is applied.
RefreshPointer() Refresh call out pointer when StackMode is set to GridStyle.
TransformObject(FrameworkElement) Transform drag drop object to UXAccordionItem of the specified element has drag drop info.
UpdatePosition() Update stack position.

Protected Methods

ApplyBinding(DependencyObject, object) Applies item binding for each generated element.
ApplyStyle(DependencyObject, object) Applies style for container element generated for each item.
GetContainerForItemOverride() Creates or identifies the element that is used to display the given item.
IsItemItsOwnContainerOverride(object) Determines if the specified item is (or is eligible to be) its own container.
OnItemsChanged(NotifyCollectionChangedEventArgs) Called when the value of the System.Windows.Controls.ItemsControl.Items property changes.
OnKeyDown(KeyEventArgs) Called before the KeyDown event occurs.
Panel_DragEnded(object, DragEventArgs) Occurs at origin panel, when drag is ended (after drag drop).
Panel_DragEnter(object, DragEventArgs) Occurs when an item is entering this panel.
Panel_DragInit(object, DragEventArgs) Occurs at origin panel, when drag is initializing.
Panel_DragLeave(object, DragEventArgs) Occurs when an item is leaving this panel.
Panel_DragOver(object, DragEventArgs) Occurs when an item is hovering this panel (after drag enter).
Panel_DragReturn(object, DragEventArgs) Occurs at origin panel, when drag object is returning.
Panel_DragReturned(object, DragEventArgs) Occurs when an item is about to be dragged.
Panel_DragStart(object, DragEventArgs) Occurs when an item is about to be dragged.
Panel_DragStarted(object, DragEventArgs) Occurs when an item is dragged.
Panel_Drop(object, DragEventArgs) Occurs when an item is dropped into this panel.
Panel_Inserted(object, UXPanelActionEventArgs) Occurs when an item is inserted to this panel.
Panel_Inserting(object, UXPanelActionEventArgs) Occurs when an item is about to be inserted to this panel.
Panel_Moved(object, UXPanelActionEventArgs) Occurs when an item in this panel is moved.
Panel_Moving(object, UXPanelActionEventArgs) Occurs when an item in this panel is about to be moved.
Panel_PrepareDrop(object, DragEventArgs) Occurs when an item is dropped into this panel.
Panel_Removed(object, UXPanelActionEventArgs) Occurs when an item in this panel is removed.
PrepareContainerForItemOverride(DependencyObject, object) Prepares the specified element to display the specified item.
RefreshImageBinding() Refresh image member path binding.

Events

Closed Occurs when the popup is closed.
ItemChecked Occurs when item is checked.
ItemClick Occurs when item is clicked.
ItemUnchecked Occurs when item is unchecked.
Opened Occurs when the popup is closed.
Repositioned Occurs when the popup is repositioned.

Public Constructors

public UXStackMenu()

Initializes a new instance of the UXStackItem class.

Public Properties

public int ActiveIndex { get; set; }

Gets or sets the current active selection index. Note used for internal purpose, do not change.

public UXMenuItem ActiveItem { get; set; }

Gets or sets the current active selection item. Note used for internal purpose, do not change.

public AnimatePointerMode AnimatePointerMode { get; set; }

Gets or sets the value that determines the behavior of UXCallOut pointer animation when its repositioned.

public Thickness BorderThickness { get; set; }

Not applicable. Use StrokeThickness.

public Effect CallOutEffect { get; set; }

Gets or sets the pixel shader effect to use for rendering the call out element.

public Style CallOutStyle { get; set; }

Gets or sets the call out style.

public PopupAnimation DisplayAnimation { get; set; }

Gets or sets a value that determines the display animation.

public bool EnableFadeInAnimation { get; set; }

Gets or sets a value that determines whether the fade animation is enabled.

public bool EnableFadeOutAnimation { get; set; }

Gets or sets a value that determines whether the fade animation is enabled.

public bool EnableMouseOverState { get; set; }

Gets or sets a value that determine whether mouse over state is enabled at StackItem level.

public bool EnableReflection { get; set; }

Gets or sets a value that determine whether reflection is enabled.

public bool EnableStackGridFadeAnimation { get; set; }

Gets or sets a value that determines whether stack grid items fading animation is enabled.

public UXCallOut GridCallOutElement { get; }

Gets the grid callout element.

public PopupAnimation HideAnimation { get; set; }

Gets or sets a value that determines the hide animation.

public Visibility ImageLoaderTextVisibility { get; set; }

Gets or sets a value that determines whether image loader progress text is shown.

public bool IsOpen { get; set; }

Gets or sets a value that determines whether the UStackMenu is opened.

public ItemsPresenter ItemsPresenter { get; }

Gets the item presenter.

public UXCallOut MenuCallOutElement { get; }

Gets the menu callout element.

public Dock ReflectionPosition { get; set; }

Gets or sets a value that determine the position of the reflection.

public Visibility ReflectionVisibility { get; set; }

Gets or sets a value that determine the visibility of the reflection.

public Grid RootElement { get; }

Gets the root element.

public double ShowLatency { get; set; }

Gets or sets a value that determine the latency before mouse enter action is executed.

public double StackAnimationSpeedRatio { get; set; }

Gets or sets the stack animation speed ratio.

public double StackArcDegree { get; set; }

Gets or sets the arc style degree when stack mode is set to ArcStyle.

public StackArcDirection StackArcDirection { get; set; }

Gets or sets the arc style direction when stack mode is set to ArcStyle.

public double StackArcItemHeight { get; set; }

Gets or sets the stack arc item height.

public double StackArcItemWidth { get; set; }

Gets or sets the stack arc item width.

public double StackArcLaunchOffset { get; set; }

Gets or sets the arc style launch offset when stack mode is set to ArcStyle.

public double StackArcTextOffset { get; set; }

Gets or sets the arc text ofset position when stack mode is set to ArcStyle.

public TextPosition StackArcTextPosition { get; set; }

Gets or sets the arc text position when stack mode is set to ArcStyle.

public Dock StackDockPosition { get; set; }

Gets or sets a value that indicates the dock position of the stack menu.

public int StackGridColumn { get; set; }

Gets or sets the number of grid column when stack mode is set to GridStyle.

public string StackGridFooterText { get; set; }

Gets or sets the stack grid footer text.

public string StackGridHeaderText { get; set; }

Gets or sets the stack grid header text.

public double StackGridItemHeight { get; set; }

Gets or sets the stack grid item height.

public Thickness StackGridItemMargin { get; set; }

Gets or sets the margin between stack grid item.

public double StackGridItemWidth { get; set; }

Gets or sets the stack grid item width.

public StackGridMode StackGridMode { get; set; }

Gets or sets stack grid mode style."

public Thickness StackGridPadding { get; set; }

Gets or sets the stack grid padding.

public int StackGridRow { get; set; }

Gets or sets the number of grid row when stack mode is set to GridStyle.

public DataTemplate StackGridTemplate { get; set; }

Gets or sets the content template to be displayed in stack grid mode.

public double StackMenuItemHeight { get; set; }

Gets or sets the stack menu item height.

public double StackMenuItemWidth { get; set; }

Gets or sets the stack menu item width.

public StackMode StackMode { get; set; }

Gets or sets the stack mode.

public int StackTotalDisplayItem { get; set; }

Gets or sets a value that determines the total number of sub items that will be visible when stack mode is set to ArcStyle and the stack menu is collapsed.

public bool StaysOpen { get; set; }

Gets or sets a value that determines whether the popup stays open regardless the hide command.

public double StrokeThickness { get; set; }

Gets or sets the border thickness.

public string Text { get; set; }

Gets or sets the stack menu text.

public bool UseImageLoader { get; set; }

Gets or sets a value that determines whether the image loader used to download the image.

Protected Properties

protected ProductInfo Product { get; }

Product Info.

Fields

public static readonly DependencyProperty AnimatePointerModeProperty

Identifies the AnimatePointerMode dependency property.

public static readonly DependencyProperty ArcAnimationProperty

Identifies the Animation dependency property.

public static readonly DependencyProperty CallOutEffectProperty

Identifies the CallOutEffect dependency property.

public static readonly DependencyProperty CallOutStyleProperty

Identifies the CallOutStyle dependency property.

public static readonly DependencyProperty DisplayAnimationProperty

Identifies the DisplayAnimation dependency property.

public static readonly DependencyProperty EnableFadeInAnimationProperty

Identifies the EnableFadeAnimation dependency property.

public static readonly DependencyProperty EnableFadeOutAnimationProperty

Identifies the EnableFadeAnimation dependency property.

public static readonly DependencyProperty EnableMouseOverStateProperty

Identifies the EnableMouseOverState dependency property.

public static readonly DependencyProperty EnableReflectionProperty

Identifies the EnableReflection dependency property.

public static readonly DependencyProperty EnableStackGridFadeAnimationProperty

Identifies the EnableStackGridFadeAnimation dependency property.

public static readonly DependencyProperty HideAnimationProperty

Identifies the HideAnimation dependency property.

public static readonly DependencyProperty ImageLoaderTextVisibilityProperty

Identifies the ImageLoaderTextVisibility dependency property.

public static readonly DependencyProperty IsOpenProperty

Identifies the IsOpen dependency property.

public static readonly DependencyProperty ReflectionPositionProperty

Identifies the ReflectionPosition dependency property.

public static readonly DependencyProperty ReflectionVisibilityProperty

Identifies the ReflectionVisibility dependency property.

public static readonly DependencyProperty ShowLatencyProperty

Identifies the ShowLatency dependency property.

public static readonly DependencyProperty StackAnimationSpeedRatioProperty

Identifies the StackAnimationSpeedRatio dependency property.

public static readonly DependencyProperty StackArcDegreeProperty

Identifies the StackArcDegree dependency property.

public static readonly DependencyProperty StackArcDirectionProperty

Identifies the StackArcDirection dependency property.

public static readonly DependencyProperty StackArcItemHeightProperty

Identifies the StackArcItemHeight dependency property.

public static readonly DependencyProperty StackArcItemWidthProperty

Identifies the StackArcItemWidth dependency property.

public static readonly DependencyProperty StackArcLaunchOffsetProperty

Identifies the StackArcLaunchOffset dependency property.

public static readonly DependencyProperty StackArcTextOffsetProperty

Identifies the StackArcTextOffset dependency property.

public static readonly DependencyProperty StackArcTextPositionProperty

Identifies the StackArcTextPosition dependency property.

public static readonly DependencyProperty StackDockPositionProperty

Identifies the StackDockPosition dependency property.

public static readonly DependencyProperty StackGridColumnProperty

Identifies the StackGridColumn dependency property.

public static readonly DependencyProperty StackGridFooterTextProperty

Identifies the StackGridFooterText dependency property.

public static readonly DependencyProperty StackGridHeaderTextProperty

Identifies the StackGridHeaderText dependency property.

public static readonly DependencyProperty StackGridItemHeightProperty

Identifies the StackGridItemHeight dependency property.

public static readonly DependencyProperty StackGridItemMarginProperty

Identifies the StackGridItemMargin dependency property.

public static readonly DependencyProperty StackGridItemWidthProperty

Identifies the StackGridItemWidth dependency property.

public static readonly DependencyProperty StackGridModeProperty

Identifies the StackGridMode dependency property.

public static readonly DependencyProperty StackGridPaddingProperty

Identifies the StackGridPadding dependency property.

public static readonly DependencyProperty StackGridRowProperty

Identifies the StackGridRow dependency property.

public static readonly DependencyProperty StackGridTemplateProperty

Identifies the StackGridTemplate dependency property.

public static readonly DependencyProperty StackMenuItemHeightProperty

Identifies the StackMenuItemHeight dependency property.

public static readonly DependencyProperty StackMenuItemWidthProperty

Identifies the StackMenuItemWidth dependency property.

public static readonly DependencyProperty StackModeProperty

Identifies the StackMode dependency property.

public static readonly DependencyProperty StackTotalDisplayItemProperty

Identifies the StackTotalDisplayItem dependency property.

public static readonly DependencyProperty StaysOpenProperty

Identifies the StaysOpen dependency property.

public static readonly DependencyProperty StrokeThicknessProperty

Identifies the StrokeThickness dependency property.

public static readonly DependencyProperty TextProperty

Identifies the Text dependency property.

public static readonly DependencyProperty UseImageLoaderProperty

Identifies the UseImageLoader dependency property.

Static Methods

public static Storyboard GetArcAnimation(UIElement element)

Gets animation value from target element.

Parameters

element Target element.

Return Types

Animation.

public static void SetArcAnimation(UIElement element, Storyboard value)

Sets animation value to target element.

Parameters

element Target element.
value Animation.

Public Methods

public void AttachEventHandlers()

Attach built-in event handlers to control templates. Call this method if necessary.

public void DetachedEventHandlers()

Detach built-in event handlers from control templates. Call this method if necessary.

public void InitializeStoryboards()

Initializes storyboards.

public void InitializeTemplates()

Initializes control templates.

public void KeyDownItemSelect(UXMenuItem item)

Perform item selection on keydown. Note used for internal purpose, call if necessary.

Parameters

item Menu item.

public void OnApplyTemplate()

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

public void RefreshPointer()

Refresh call out pointer when StackMode is set to GridStyle.

public FrameworkElement TransformObject(FrameworkElement element)

Transform drag drop object to UXAccordionItem of the specified element has drag drop info.

Parameters

element Drag drop element.

Return Types

Transformed element.

public void UpdatePosition()

Update stack position.

Protected Methods

protected void ApplyBinding(DependencyObject element, object item)

Applies item binding for each generated element.

Parameters

element Container element.
item Item.

protected void ApplyStyle(DependencyObject element, object item)

Applies style for container element generated for each item.

Parameters

element Container element.
item Item.

protected DependencyObject GetContainerForItemOverride()

Creates or identifies the element that is used to display the given item.

Return Types

The element that is used to display the given item.

protected bool IsItemItsOwnContainerOverride(object item)

Determines if the specified item is (or is eligible to be) its own container.

Parameters

item The item to check.

Return Types

true if the item is (or is eligible to be) its own container; otherwise, false.

protected void OnItemsChanged(NotifyCollectionChangedEventArgs e)

Called when the value of the System.Windows.Controls.ItemsControl.Items property changes.

Parameters

e NotifyCollectionChangedEventArgs that contains the event data

protected void OnKeyDown(KeyEventArgs e)

Called before the KeyDown event occurs.

Parameters

e The data for the event.

protected void Panel_DragEnded(object sender, DragEventArgs e)

Occurs at origin panel, when drag is ended (after drag drop).

Parameters

sender
e

protected void Panel_DragEnter(object sender, DragEventArgs e)

Occurs when an item is entering this panel.

Parameters

sender
e

protected void Panel_DragInit(object sender, DragEventArgs e)

Occurs at origin panel, when drag is initializing.

Parameters

sender
e

protected void Panel_DragLeave(object sender, DragEventArgs e)

Occurs when an item is leaving this panel.

Parameters

sender
e

protected void Panel_DragOver(object sender, DragEventArgs e)

Occurs when an item is hovering this panel (after drag enter).

Parameters

sender
e

protected void Panel_DragReturn(object sender, DragEventArgs e)

Occurs at origin panel, when drag object is returning.

Parameters

sender
e

protected void Panel_DragReturned(object sender, DragEventArgs e)

Occurs when an item is about to be dragged.

Parameters

sender
e

protected void Panel_DragStart(object sender, DragEventArgs e)

Occurs when an item is about to be dragged.

Parameters

sender
e

protected void Panel_DragStarted(object sender, DragEventArgs e)

Occurs when an item is dragged.

Parameters

sender
e

protected void Panel_Drop(object sender, DragEventArgs e)

Occurs when an item is dropped into this panel.

Parameters

sender
e

protected void Panel_Inserted(object sender, UXPanelActionEventArgs e)

Occurs when an item is inserted to this panel.

Parameters

sender
e

protected void Panel_Inserting(object sender, UXPanelActionEventArgs e)

Occurs when an item is about to be inserted to this panel.

Parameters

sender
e

protected void Panel_Moved(object sender, UXPanelActionEventArgs e)

Occurs when an item in this panel is moved.

Parameters

sender
e

protected void Panel_Moving(object sender, UXPanelActionEventArgs e)

Occurs when an item in this panel is about to be moved.

Parameters

sender
e

protected void Panel_PrepareDrop(object sender, DragEventArgs e)

Occurs when an item is dropped into this panel.

Parameters

sender
e

protected void Panel_Removed(object sender, UXPanelActionEventArgs e)

Occurs when an item in this panel is removed.

Parameters

sender
e

protected void PrepareContainerForItemOverride(DependencyObject element, object item)

Prepares the specified element to display the specified item.

Parameters

element The container element used to display the specified item.
item The item to display.

protected void RefreshImageBinding()

Refresh image member path binding.

Events

public event ISRoutedEventHandler Closed

Occurs when the popup is closed.

public event ISRoutedEventHandler ItemChecked

Occurs when item is checked.

public event ISRoutedEventHandler ItemClick

Occurs when item is clicked.

public event ISRoutedEventHandler ItemUnchecked

Occurs when item is unchecked.

public event ISRoutedEventHandler Opened

Occurs when the popup is closed.

public event UXPopupRoutedEventHandler Repositioned

Occurs when the popup is repositioned.

  • No labels