In This Article

RibbonControlGroup Class

Represents a control that encapsulates a set of similar controls within a RibbonGroup, altering their variant sizes using a designated behavior.

[TemplatePart(Name = "PART_ExternalHeaderHostPanel", Type = typeof(Panel))]
public class RibbonControlGroup : ItemsControl, IOrientedElement, ISupportsStarSizing
Inheritance:
object Visual UIElement FrameworkElement Control ItemsControl object
Implements:
IOrientedElement ISupportsStarSizing

Constructors

RibbonControlGroup()

Initializes an instance of the class.

public RibbonControlGroup()

Properties

CanArrangeVertically

Indicates whether the control group can arrange vertically.

public bool CanArrangeVertically { get; set; }

Property Value

bool:

true if the control group can arrange vertically; otherwise, false. The default value is false.

ItemVariantBehavior

An ItemVariantBehavior that indicates how variant sizes should be applied to items.

public ItemVariantBehavior ItemVariantBehavior { get; set; }

Property Value

ItemVariantBehavior:

The default value is All.

ItemVariantSize

A VariantSize indicating the variant size for items.

public VariantSize ItemVariantSize { get; }

Property Value

VariantSize

LayoutMode

A RibbonLayoutMode indicating the layout mode in use.

public RibbonLayoutMode LayoutMode { get; }

Property Value

RibbonLayoutMode

Orientation

The orientation of the control.

public Orientation Orientation { get; }

Property Value

Orientation

SeparatorMode

A RibbonControlGroupSeparatorMode indicating how separators should be positioned around the control.

public RibbonControlGroupSeparatorMode SeparatorMode { get; set; }

Property Value

RibbonControlGroupSeparatorMode:

The default value is Default.

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.

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

CanArrangeVerticallyProperty

Defines the CanArrangeVertically property.

public static readonly DependencyProperty CanArrangeVerticallyProperty

ItemVariantBehaviorProperty

Defines the ItemVariantBehavior property.

public static readonly DependencyProperty ItemVariantBehaviorProperty

ItemVariantSizeProperty

Defines the ItemVariantSize property.

public static readonly DependencyProperty ItemVariantSizeProperty

LayoutModeProperty

Defines the LayoutMode property.

public static readonly DependencyProperty LayoutModeProperty

OrientationProperty

Defines the Orientation property.

public static readonly DependencyProperty OrientationProperty

SeparatorModeProperty

Defines the SeparatorMode property.

public static readonly DependencyProperty SeparatorModeProperty

UserInterfaceDensityProperty

Defines the UserInterfaceDensity property.

public static readonly DependencyProperty UserInterfaceDensityProperty

VariantSizeProperty

Defines the VariantSize property.

public static readonly DependencyProperty VariantSizeProperty

Extension Methods