In This Article

RibbonGallery Class

Represents a gallery control, for use within a Ribbon.

[TemplatePart(Name = "PART_CollapsedButton", Type = typeof(BarPopupButton))]
[TemplatePart(Name = "PART_ExpandedElement", Type = typeof(FrameworkElement))]
[TemplatePart(Name = "PART_MoreButton", Type = typeof(RibbonGalleryMoreButton))]
public class RibbonGallery : BarMenuGalleryHostBase, DUCE.IResource, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IHaveResources, IQueryAmbient, IAddChild, IGeneratorHost, IContainItemStorage, ICommandSource, ISupportsCoerceLabel, IVariantSizeItem
Inheritance:
System.Object System.Windows.Threading.DispatcherObject System.Windows.DependencyObject System.Windows.Media.Visual System.Windows.UIElement System.Windows.FrameworkElement System.Windows.Controls.Control System.Windows.Controls.ItemsControl System.Windows.Controls.Primitives.Selector BarGalleryBase BarMenuGalleryHostBase Object

Constructors

RibbonGallery()

Initializes a new instance of the RibbonGallery class.

public RibbonGallery()

Properties

CollapsedButtonToolTip

Gets or sets the tooltip for the collapsed button.

public object CollapsedButtonToolTip { get; set; }

Property Value

System.Object:

The tooltip for the collapsed button.

IsScrolling

Gets whether the gallery is currently being scrolled.

public bool IsScrolling { get; }

Property Value

System.Boolean:

true if the gallery is currently being scrolled; otherwise, false.

KeyTipText

Gets or sets the key tip text used to access the control.

[Localizability(LocalizationCategory.Label)]
public string KeyTipText { get; set; }

Property Value

System.String:

The key tip text used to access the control.

LayoutMode

Gets or sets a RibbonLayoutMode indicating the layout mode in use.

public RibbonLayoutMode LayoutMode { get; set; }

Property Value

RibbonLayoutMode:

A RibbonLayoutMode indicating the layout mode in use.

MaxColumnCount

Gets or sets the maximum number of columns when in-ribbon.

public int MaxColumnCount { get; set; }

Property Value

System.Int32:

The maximum number of columns when in-ribbon. The default value is 15.

MaxItemsPresenterHeight

Gets or sets the maximum height of the in-ribbon items presenter.

public double MaxItemsPresenterHeight { get; set; }

Property Value

System.Double:

The maximum height of the in-ribbon items presenter.

MinLargeColumnCount

Gets or sets the minimum number of columns to use when in-ribbon with a Large variant size.

public int MinLargeColumnCount { get; set; }

Property Value

System.Int32:

The minimum number of columns to use when in-ribbon with a Large variant size. The default value is 5.

MinMediumColumnCount

Gets or sets the minimum number of columns to use when in-ribbon with a Medium variant size.

public int MinMediumColumnCount { get; set; }

Property Value

System.Int32:

The minimum number of columns to use when in-ribbon with a Medium variant size. The default value is 3.

ScrollDownCommand

Gets the System.Windows.Input.ICommand used to invoke the ScrollDown() method.

public ICommand ScrollDownCommand { get; }

Property Value

System.Windows.Input.ICommand:

The System.Windows.Input.ICommand used to invoke the ScrollDown() method.

ScrollUpCommand

Gets the System.Windows.Input.ICommand used to invoke the ScrollUp() method.

public ICommand ScrollUpCommand { get; }

Property Value

System.Windows.Input.ICommand:

The System.Windows.Input.ICommand used to invoke the ScrollUp() method.

ToolBarItemCollapseBehavior

Gets or sets the ItemCollapseBehavior for the control when in a ribbon using Simplified layout mode.

public ItemCollapseBehavior ToolBarItemCollapseBehavior { get; set; }

Property Value

ItemCollapseBehavior:

The ItemCollapseBehavior for the control when in a ribbon using Simplified layout mode. The default value is Default.

ToolBarItemVariantBehavior

Gets or sets the ItemVariantBehavior for the control when in a toolbar, which also applies when in a ribbon using Simplified layout mode.

public ItemVariantBehavior ToolBarItemVariantBehavior { get; set; }

Property Value

ItemVariantBehavior:

The ItemVariantBehavior for the control when in a toolbar, which also applies when in a ribbon using Simplified layout mode. The default value is AlwaysSmall.

VariantSize

Gets or sets the VariantSize currently assigned to the control. This property should only be manually set when the control is standalone, and not hosted by a bar control.

public VariantSize VariantSize { get; set; }

Property Value

VariantSize:

The VariantSize currently assigned to the control.

Methods

OnApplyTemplate()

When overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate().

public override void OnApplyTemplate()

OnCreateAutomationPeer()

Returns class-specific System.Windows.Automation.Peers.AutomationPeer implementations for the Windows Presentation Foundation (WPF) infrastructure.

protected override AutomationPeer OnCreateAutomationPeer()

Returns

System.Windows.Automation.Peers.AutomationPeer:

The type-specific System.Windows.Automation.Peers.AutomationPeer implementation.

OnItemSpacingPropertyValueChanged(DependencyPropertyChangedEventArgs)

Occurs when the ItemSpacing property value changes.

protected override void OnItemSpacingPropertyValueChanged(DependencyPropertyChangedEventArgs e)
Parameter Type Description
e System.Windows.DependencyPropertyChangedEventArgs

The System.Windows.DependencyPropertyChangedEventArgs containing data related to this event.

OnMinItemHeightPropertyValueChanged(DependencyPropertyChangedEventArgs)

Occurs when the MinItemHeight property value changes.

protected override void OnMinItemHeightPropertyValueChanged(DependencyPropertyChangedEventArgs e)
Parameter Type Description
e System.Windows.DependencyPropertyChangedEventArgs

The System.Windows.DependencyPropertyChangedEventArgs containing data related to this event.

OnMinItemWidthPropertyValueChanged(DependencyPropertyChangedEventArgs)

Occurs when the MinItemWidth property value changes.

protected override void OnMinItemWidthPropertyValueChanged(DependencyPropertyChangedEventArgs e)
Parameter Type Description
e System.Windows.DependencyPropertyChangedEventArgs

The System.Windows.DependencyPropertyChangedEventArgs containing data related to this event.

OnUserInterfaceDensityPropertyValueChanged(DependencyPropertyChangedEventArgs)

Occurs when the UserInterfaceDensity property value changes.

protected override void OnUserInterfaceDensityPropertyValueChanged(DependencyPropertyChangedEventArgs e)
Parameter Type Description
e System.Windows.DependencyPropertyChangedEventArgs

The System.Windows.DependencyPropertyChangedEventArgs containing data related to this event.

ScrollDown()

Scrolls the gallery down a row.

public void ScrollDown()

ScrollUp()

Scrolls the gallery up a row.

public void ScrollUp()

Fields

CollapsedButtonToolTipProperty

Identifies the CollapsedButtonToolTip dependency property. This field is read-only.

public static readonly DependencyProperty CollapsedButtonToolTipProperty

IsScrollingProperty

Identifies the IsScrolling dependency property. This field is read-only.

public static readonly DependencyProperty IsScrollingProperty

KeyTipTextProperty

Identifies the KeyTipText dependency property. This field is read-only.

public static readonly DependencyProperty KeyTipTextProperty

LayoutModeProperty

Identifies the LayoutMode dependency property. This field is read-only.

public static readonly DependencyProperty LayoutModeProperty

MaxColumnCountProperty

Identifies the MaxColumnCount dependency property. This field is read-only.

public static readonly DependencyProperty MaxColumnCountProperty

MaxItemsPresenterHeightProperty

Identifies the MaxItemsPresenterHeight dependency property. This field is read-only.

public static readonly DependencyProperty MaxItemsPresenterHeightProperty

MinLargeColumnCountProperty

Identifies the MinLargeColumnCount dependency property. This field is read-only.

public static readonly DependencyProperty MinLargeColumnCountProperty

MinMediumColumnCountProperty

Identifies the MinMediumColumnCount dependency property. This field is read-only.

public static readonly DependencyProperty MinMediumColumnCountProperty

ToolBarItemCollapseBehaviorProperty

Identifies the ToolBarItemCollapseBehavior dependency property. This field is read-only.

public static readonly DependencyProperty ToolBarItemCollapseBehaviorProperty

ToolBarItemVariantBehaviorProperty

Identifies the ToolBarItemVariantBehavior dependency property. This field is read-only.

public static readonly DependencyProperty ToolBarItemVariantBehaviorProperty

VariantSizeProperty

Identifies the VariantSize dependency property. This field is read-only.

public static readonly DependencyProperty VariantSizeProperty

Inherited Members

Extension Methods