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 an instance of the class.

public RibbonGroup()

Properties

CanAutoCollapse

Indicates 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

Indicates 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

A RibbonGroupChildOverflowTarget indicating where items overflow when in a Simplified layout mode.

public RibbonGroupChildOverflowTarget ChildOverflowTarget { get; set; }

Property Value

RibbonGroupChildOverflowTarget:

The default value is Tab.

CollapsedButtonKeyTipText

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

CollapsedButtonToolTip

The tooltip for the collapsed button.

public object? CollapsedButtonToolTip { get; set; }

Property Value

object

CornerRadius

The corner radius of the control's border.

public CornerRadius CornerRadius { get; set; }

Property Value

CornerRadius

GroupLabelMode

The RibbonGroupLabelMode that specifies when the group is labeled.

public RibbonGroupLabelMode GroupLabelMode { get; }

Property Value

RibbonGroupLabelMode:

The default value is Default.

IsAnimationEnabled

Indicates 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

Indicates whether the overflow button is visible.

public bool IsOverflowButtonVisible { get; }

Property Value

bool:

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

IsPopupOpen

Indicates whether the popup is open.

public bool IsPopupOpen { get; set; }

Property Value

bool:

true if the popup is open; otherwise, false.

IsPopupPresenterAnimationEnabled

Indicates whether popup presenter animation is enabled.

public bool IsPopupPresenterAnimationEnabled { get; }

Property Value

bool:

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

Key

A string that uniquely identifies the control.

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

Property Value

string

Label

The text label to display.

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

Property Value

string

LargeImageSource

The ImageSource for a large image, generally 32x32 size.

public ImageSource? LargeImageSource { get; set; }

Property Value

ImageSource

LauncherButtonContent

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

A RibbonLayoutMode indicating the layout mode in use.

public RibbonLayoutMode LayoutMode { get; }

Property Value

RibbonLayoutMode

OverflowButtonToolTip

The tooltip for the overflow button.

public object? OverflowButtonToolTip { get; set; }

Property Value

object

SeparatorBrush

The Brush to render separators.

public Brush? SeparatorBrush { get; set; }

Property Value

Brush

SmallImageSource

The ImageSource for a small image, generally 16x16 size.

public ImageSource? SmallImageSource { get; set; }

Property Value

ImageSource

Title

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

UserInterfaceDensity

A UserInterfaceDensity that indicates how compact or spacious the UI should appear.

public UserInterfaceDensity UserInterfaceDensity { get; set; }

Property Value

UserInterfaceDensity:

The default value is Compact.

VariantSize

The VariantSize currently assigned to the control.

public VariantSize VariantSize { get; set; }

Property Value

VariantSize

Remarks

This property should only be manually set when the control is standalone, and not hosted by a bar 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 event data.

OnKeyTipOpening(KeyTipOpeningEventArgs)

Occurs when the control's key tip is opening.

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

The event data.

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

Defines the CanAutoCollapse property.

public static readonly DependencyProperty CanAutoCollapseProperty

CanCloneToRibbonQuickAccessToolBarProperty

Defines the CanCloneToRibbonQuickAccessToolBar property.

public static readonly DependencyProperty CanCloneToRibbonQuickAccessToolBarProperty

ChildOverflowTargetProperty

Defines the ChildOverflowTarget property.

public static readonly DependencyProperty ChildOverflowTargetProperty

CollapsedButtonKeyTipTextProperty

Defines the CollapsedButtonKeyTipText property.

public static readonly DependencyProperty CollapsedButtonKeyTipTextProperty

CollapsedButtonToolTipProperty

Defines the CollapsedButtonToolTip property.

public static readonly DependencyProperty CollapsedButtonToolTipProperty

CornerRadiusProperty

Defines the CornerRadius property.

public static readonly DependencyProperty CornerRadiusProperty

GroupLabelModeProperty

Defines the GroupLabelMode property.

public static readonly DependencyProperty GroupLabelModeProperty

IsAnimationEnabledProperty

Defines the IsAnimationEnabled property.

public static readonly DependencyProperty IsAnimationEnabledProperty

IsOverflowButtonVisibleProperty

Defines the IsOverflowButtonVisible property.

public static readonly DependencyProperty IsOverflowButtonVisibleProperty

IsPopupOpenProperty

Defines the IsPopupOpen property.

public static readonly DependencyProperty IsPopupOpenProperty

IsPopupPresenterAnimationEnabledProperty

Defines the IsPopupPresenterAnimationEnabled property.

public static readonly DependencyProperty IsPopupPresenterAnimationEnabledProperty

KeyProperty

Defines the Key property.

public static readonly DependencyProperty KeyProperty

LabelProperty

Defines the Label property.

public static readonly DependencyProperty LabelProperty

LargeImageSourceProperty

Defines the LargeImageSource property.

public static readonly DependencyProperty LargeImageSourceProperty

LauncherButtonContentProperty

Defines the LauncherButtonContent property.

public static readonly DependencyProperty LauncherButtonContentProperty

LayoutModeProperty

Defines the LayoutMode property.

public static readonly DependencyProperty LayoutModeProperty

OverflowButtonToolTipProperty

Defines the OverflowButtonToolTip property.

public static readonly DependencyProperty OverflowButtonToolTipProperty

SeparatorBrushProperty

Defines the SeparatorBrush property.

public static readonly DependencyProperty SeparatorBrushProperty

SmallImageSourceProperty

Defines the SmallImageSource property.

public static readonly DependencyProperty SmallImageSourceProperty

TitleProperty

Defines the Title property.

public static readonly DependencyProperty TitleProperty

UserInterfaceDensityProperty

Defines the UserInterfaceDensity property.

public static readonly DependencyProperty UserInterfaceDensityProperty

VariantSizeProperty

Defines the VariantSize property.

public static readonly DependencyProperty VariantSizeProperty

Extension Methods