In This Article

RibbonGroup Class

Represents a control within a Ribbon tab that is used to group related controls.

[TemplatePart(Name = "PART_CollapsedButton", Type = typeof(RibbonGroupCollapsedButton))]
[TemplatePart(Name = "PART_LauncherButtonPresenter", Type = typeof(ContentPresenter))]
public class RibbonGroup : ItemsControl
Inheritance:
object Visual UIElement FrameworkElement Control ItemsControl object

Constructors

RibbonGroup()

Initializes a new instance of the RibbonGroup class.

public RibbonGroup()

Properties

CanAutoCollapse

Gets or sets if the group can be automatically collapsed when the ribbon has limited available space.

public bool CanAutoCollapse { get; set; }

Property Value

bool:

true if the group can be automatically collapsed when the ribbon has limited available space; otherwise, false. The default value is true.

CanCloneToRibbonQuickAccessToolBar

Gets or sets whether the control can be cloned to the ribbon quick-access toolbar.

public bool CanCloneToRibbonQuickAccessToolBar { get; set; }

Property Value

bool:

true if the control can be cloned to the ribbon quick-access toolbar; otherwise, false. The default value is true.

ChildOverflowTarget

Gets or sets a RibbonGroupChildOverflowTarget indicating where items overflow when in a Simplified layout mode.

public RibbonGroupChildOverflowTarget ChildOverflowTarget { get; set; }

Property Value

RibbonGroupChildOverflowTarget:

A RibbonGroupChildOverflowTarget indicating where items overflow when in a Simplified layout mode. The default value is Tab.

CollapsedButtonKeyTipText

Gets or sets the key tip text used to access the group when it is rendered as a collapsed button.

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

Property Value

string:

The key tip text used to access the group when it is rendered as a collapsed button.

CollapsedButtonToolTip

Gets or sets the tooltip for the collapsed button.

public object CollapsedButtonToolTip { get; set; }

Property Value

object:

The tooltip for the collapsed button.

CornerRadius

Gets or sets the corner radius of the control's border.

public CornerRadius CornerRadius { get; set; }

Property Value

CornerRadius:

The corner radius of the control's border.

GroupLabelMode

Gets the RibbonGroupLabelMode that specifies when the group is labeled.

public RibbonGroupLabelMode GroupLabelMode { get; }

Property Value

RibbonGroupLabelMode:

The RibbonGroupLabelMode that specifies when the group is labeled. The default value is Default.

IsAnimationEnabled

Gets or sets whether animation is enabled.

public bool IsAnimationEnabled { get; set; }

Property Value

bool:

true if animation is enabled; otherwise, false. The default value is true.

IsOverflowButtonVisible

Gets whether the overflow button is visible.

public bool IsOverflowButtonVisible { get; }

Property Value

bool:

true if the overflow button is visible; otherwise, false.

IsPopupOpen

Gets or sets whether the popup is open.

public bool IsPopupOpen { get; set; }

Property Value

bool:

true if the popup is open; otherwise, false.

IsPopupPresenterAnimationEnabled

Gets whether popup presenter animation is enabled.

public bool IsPopupPresenterAnimationEnabled { get; }

Property Value

bool:

true if popup presenter animation is enabled; otherwise, false.

Key

Gets or sets a string that uniquely identifies the control.

[Localizability(LocalizationCategory.NeverLocalize)]
public string Key { get; set; }

Property Value

string:

A string that uniquely identifies the control.

Label

Gets or sets the text label to display.

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

Property Value

string:

The text label to display.

LargeImageSource

Gets or sets the ImageSource for a large image, generally 32x32 size.

public ImageSource LargeImageSource { get; set; }

Property Value

ImageSource:

The ImageSource for a large image.

LauncherButtonContent

Gets or sets the launcher button.

public object LauncherButtonContent { get; set; }

Property Value

object:

The launcher button, which can either be a launcher button view model that uses ItemContainerTemplateSelector for its UI, or a RibbonGroupLauncherButton control instance.

LayoutMode

Gets a RibbonLayoutMode indicating the layout mode in use.

public RibbonLayoutMode LayoutMode { get; }

Property Value

RibbonLayoutMode:

A RibbonLayoutMode indicating the layout mode in use.

OverflowButtonToolTip

Gets or sets the tooltip for the overflow button.

public object OverflowButtonToolTip { get; set; }

Property Value

object:

The tooltip for the overflow button.

SeparatorBrush

Gets or sets the Brush to render separators.

public Brush SeparatorBrush { get; set; }

Property Value

Brush:

The Brush to render separators.

SmallImageSource

Gets or sets the ImageSource for a small image, generally 16x16 size.

public ImageSource SmallImageSource { get; set; }

Property Value

ImageSource:

The ImageSource for a small image.

Title

Gets or sets the string title, which can override the Label when displayed in screen tips and customization UI.

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

Property Value

string:

The string title.

UserInterfaceDensity

Gets or sets a UserInterfaceDensity that indicates how compact or spacious the UI should appear.

public UserInterfaceDensity UserInterfaceDensity { get; set; }

Property Value

UserInterfaceDensity:

A UserInterfaceDensity that indicates how compact or spacious the UI should appear. The default value is Compact.

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

ClearContainerForItemOverride(DependencyObject, object)

When overridden in a derived class, undoes the effects of the PrepareContainerForItemOverride(DependencyObject, object) method.

protected override void ClearContainerForItemOverride(DependencyObject element, object item)
Parameter Type Description
element DependencyObject

The container element.

item object

The item.

GetContainerForItemOverride()

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

protected override DependencyObject GetContainerForItemOverride()

Returns

DependencyObject:

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.

protected override bool IsItemItsOwnContainerOverride(object item)
Parameter Type Description
item object

The item to check.

Returns

bool:

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

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 AutomationPeer implementations for the Windows Presentation Foundation (WPF) infrastructure.

protected override AutomationPeer OnCreateAutomationPeer()

Returns

AutomationPeer:

The type-specific AutomationPeer implementation.

OnKeyTipInvoked(KeyTipInvokedEventArgs)

Occurs when the control's key tip is invoked.

protected virtual void OnKeyTipInvoked(KeyTipInvokedEventArgs e)
Parameter Type Description
e KeyTipInvokedEventArgs

The KeyTipInvokedEventArgs containing data related to this event.

OnKeyTipOpening(KeyTipOpeningEventArgs)

Occurs when the control's key tip is opening.

protected virtual void OnKeyTipOpening(KeyTipOpeningEventArgs e)
Parameter Type Description
e KeyTipOpeningEventArgs

The KeyTipOpeningEventArgs containing data related to this event.

OnVariantSizeChanged(VariantSize, VariantSize)

Occurs when the VariantSize property value changes.

protected virtual void OnVariantSizeChanged(VariantSize oldValue, VariantSize newValue)
Parameter Type Description
oldValue VariantSize

The old value.

newValue VariantSize

The new value.

PrepareContainerForItemOverride(DependencyObject, object)

Prepares the specified element to display the specified item.

protected override void PrepareContainerForItemOverride(DependencyObject element, object item)
Parameter Type Description
element DependencyObject

Element used to display the specified item.

item object

Specified item.

ToString()

Returns the string representation of this object.

public override string ToString()

Returns

string:

The string representation of this object.

Fields

CanAutoCollapseProperty

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

public static readonly DependencyProperty CanAutoCollapseProperty

CanCloneToRibbonQuickAccessToolBarProperty

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

public static readonly DependencyProperty CanCloneToRibbonQuickAccessToolBarProperty

ChildOverflowTargetProperty

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

public static readonly DependencyProperty ChildOverflowTargetProperty

CollapsedButtonKeyTipTextProperty

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

public static readonly DependencyProperty CollapsedButtonKeyTipTextProperty

CollapsedButtonToolTipProperty

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

public static readonly DependencyProperty CollapsedButtonToolTipProperty

CornerRadiusProperty

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

public static readonly DependencyProperty CornerRadiusProperty

GroupLabelModeProperty

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

public static readonly DependencyProperty GroupLabelModeProperty

IsAnimationEnabledProperty

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

public static readonly DependencyProperty IsAnimationEnabledProperty

IsOverflowButtonVisibleProperty

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

public static readonly DependencyProperty IsOverflowButtonVisibleProperty

IsPopupOpenProperty

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

public static readonly DependencyProperty IsPopupOpenProperty

IsPopupPresenterAnimationEnabledProperty

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

public static readonly DependencyProperty IsPopupPresenterAnimationEnabledProperty

KeyProperty

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

public static readonly DependencyProperty KeyProperty

LabelProperty

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

public static readonly DependencyProperty LabelProperty

LargeImageSourceProperty

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

public static readonly DependencyProperty LargeImageSourceProperty

LauncherButtonContentProperty

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

public static readonly DependencyProperty LauncherButtonContentProperty

LayoutModeProperty

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

public static readonly DependencyProperty LayoutModeProperty

OverflowButtonToolTipProperty

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

public static readonly DependencyProperty OverflowButtonToolTipProperty

SeparatorBrushProperty

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

public static readonly DependencyProperty SeparatorBrushProperty

SmallImageSourceProperty

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

public static readonly DependencyProperty SmallImageSourceProperty

TitleProperty

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

public static readonly DependencyProperty TitleProperty

UserInterfaceDensityProperty

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

public static readonly DependencyProperty UserInterfaceDensityProperty

VariantSizeProperty

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

public static readonly DependencyProperty VariantSizeProperty