Skip to end of metadata
Go to start of metadata

Remarks

UXRibbonGalleryList is a rich UI control that displays a collection of related items or commands in the ribbon. It is particularly useful to display a list of preview items which allow users to intuitively recognize the results of a command or a selection before it is applied. If there are too many items in the gallery, an expand arrow is provided to display the rest of the collection in a floating, resizable popup.

UXRibbonGalleryList provides VisibleItemCount property which is used to determine the initial number of items to display in the gallery list. You can also set CollapsedItemCount, SmallItemCountMediumItemCount and LargeItemCount properties which determine the number of items to display according to the size state of the gallery. As a ribbon-friendly control, UXRibbonGalleryList participates with the fluent resizing mechanism of the ribbon and updates the visible item count accordingly.

XAML

The result looks like the following figure.

To learn more about UXRibbonGalleryList, see Working with Galleries.

 

Definition

public class UXRibbonGalleryList : UXRibbonDropDownButtonBase

Summary

The following table summarizes the members exposed in this class.

Public Constructors

UXRibbonGalleryList Constructor()Creates a new instance of UXRibbonGalleryList class.

Public Properties

CollapsedItemCountGets or sets a value that determines the item count that been needed to collapsed the control.
LargeItemCountGets or sets a value that determines the item count that been needed for resize the control to large.
MaximumRowGets or sets a value that specifies the maximum row.
MaximumSizeGets or sets a value that specifies the control maximum size.
MediumItemCountGets or sets a value that determines the item count that been needed for resize the control to medium.
MinimumSizeGets or sets a value that specifies the control minimum size.
SizeGets or sets a value that specifies the control size.
SmallItemCountGets or sets a value that determines the item count that been needed for resize the control to small.
VisibleItemCountGets or sets a value that determines the current visible item that been show in gallery.

Fields

CollapsedItemCountPropertyIdentifies the CollapsedItemCount dependency property.
LargeItemCountPropertyIdentifies the LargeItemCount dependency property.
MaximumRowPropertyIdentifies the MaximumRow dependency property.
MaximumSizePropertyIdentifies the MaximumSize dependency property.
MediumItemCountPropertyIdentifies the MediumItemCount dependency property.
MinimumSizePropertyIdentifies the MinimumSize dependency property.
SizePropertyIdentifies the Size dependency property.
SmallItemCountPropertyIdentifies the SmallItemCount dependency property.
UsedGalleryItemHeightAsControlHeightPropertyIdentifies the UsedGalleryItemHeightAsControlHeight dependency property.
VisibleItemCountPropertyIdentifies the VisibleItemCount dependency property.

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.
InitializeTemplates()Initializes control templates.
OnApplyTemplate()When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call System.Windows.Controls.Control.ApplyTemplate(). In simplest terms, this means the method is called just before a UI element displays in an application. For more information, see Remarks.
RaiseAction()Raise the action in element that implements IRibbonKeyTipAction.

Protected Methods

ChangeVisualState(bool)Change visual state.
GoToShowGalleryState(bool)Active the show gallery state.
GoToShowGalleryState()Active the show gallery state.
GoToShowLabelState(bool)Active the show label state.
GoToShowLabelState()Active the show label state.
ItemsControlFactory() 
Menu_Closed(object, ISRoutedEventArgs)Raised when the menu is closed.
Menu_Opened(object, ISRoutedEventArgs)Raised when the menu is opened.
OnMouseEnter(MouseEventArgs)Provides class handling for the System.Windows.UIElement.MouseEnter event that occurs when the mouse enters this control.
OnMouseLeave(MouseEventArgs)Provides class handling for the System.Windows.UIElement.MouseLeave routed event that occurs when the mouse leaves an element.
OnMouseLeftButtonDown(MouseButtonEventArgs)Provides class handling for the System.Windows.UIElement.MouseLeftButtonDown event that occurs when the left mouse button is pressed while the mouse pointer is over this control.

Public Constructors

public UXRibbonGalleryList()

Creates a new instance of UXRibbonGalleryList class.

Public Properties

public int CollapsedItemCount { get; set; }

Gets or sets a value that determines the item count that been needed to collapsed the control.

public int LargeItemCount { get; set; }

Gets or sets a value that determines the item count that been needed for resize the control to large.

public double MaximumRow { get; set; }

Gets or sets a value that specifies the maximum row.

public RibbonGroupSize MaximumSize { get; set; }

Gets or sets a value that specifies the control maximum size.

public int MediumItemCount { get; set; }

Gets or sets a value that determines the item count that been needed for resize the control to medium.

public RibbonGroupSize MinimumSize { get; set; }

Gets or sets a value that specifies the control minimum size.

public RibbonGroupSize Size { get; set; }

Gets or sets a value that specifies the control size.

public int SmallItemCount { get; set; }

Gets or sets a value that determines the item count that been needed for resize the control to small.

public int VisibleItemCount { get; set; }

Gets or sets a value that determines the current visible item that been show in gallery.

Fields

public static readonly DependencyProperty CollapsedItemCountProperty

Identifies the CollapsedItemCount dependency property.

public static readonly DependencyProperty LargeItemCountProperty

Identifies the LargeItemCount dependency property.

public static readonly DependencyProperty MaximumRowProperty

Identifies the MaximumRow dependency property.

public static readonly DependencyProperty MaximumSizeProperty

Identifies the MaximumSize dependency property.

public static readonly DependencyProperty MediumItemCountProperty

Identifies the MediumItemCount dependency property.

public static readonly DependencyProperty MinimumSizeProperty

Identifies the MinimumSize dependency property.

public static readonly DependencyProperty SizeProperty

Identifies the Size dependency property.

public static readonly DependencyProperty SmallItemCountProperty

Identifies the SmallItemCount dependency property.

public static readonly DependencyProperty UsedGalleryItemHeightAsControlHeightProperty

Identifies the UsedGalleryItemHeightAsControlHeight dependency property.

public static readonly DependencyProperty VisibleItemCountProperty

Identifies the VisibleItemCount dependency property.

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 InitializeTemplates()

Initializes control templates.

public void OnApplyTemplate()

When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call System.Windows.Controls.Control.ApplyTemplate(). In simplest terms, this means the method is called just before a UI element displays in an application. For more information, see Remarks.

public void RaiseAction()

Raise the action in element that implements IRibbonKeyTipAction.

Protected Methods

protected void ChangeVisualState(bool useTransitions)

Change visual state.

Parameters

useTransitions 

 

protected void GoToShowGalleryState(bool animate)

Active the show gallery state.

Parameters

animate 

 

protected void GoToShowGalleryState()

Active the show gallery state.

protected void GoToShowLabelState(bool animate)

Active the show label state.

Parameters

animate 

 

protected void GoToShowLabelState()

Active the show label state.

protected ItemsControl ItemsControlFactory()

 

protected void Menu_Closed(object sender, ISRoutedEventArgs e)

Raised when the menu is closed.

Parameters

sender 
e 

 

protected void Menu_Opened(object sender, ISRoutedEventArgs e)

Raised when the menu is opened.

Parameters

sender 
e 

 

protected void OnMouseEnter(MouseEventArgs e)

Provides class handling for the System.Windows.UIElement.MouseEnter event that occurs when the mouse enters this control.

Parameters

eThe event data.

 

protected void OnMouseLeave(MouseEventArgs e)

Provides class handling for the System.Windows.UIElement.MouseLeave routed event that occurs when the mouse leaves an element.

Parameters

eThe event data for the System.Windows.UIElement.MouseLeave event.

 

protected void OnMouseLeftButtonDown(MouseButtonEventArgs e)

Provides class handling for the System.Windows.UIElement.MouseLeftButtonDown event that occurs when the left mouse button is pressed while the mouse pointer is over this control.

Parameters

eThe event data.
  • No labels