New to Telerik UI for WPFStart a free 30-day trial

Represents a customizable button control designed for use in a RadRibbonView. The RadRibbonButton class inherits from RadButton and implements the IRibbonButton and IVariantControl interfaces. This class provides properties for managing text and images across different button sizes, and includes options for auto-sizing, text splitting, and collapsing behaviors. The RadRibbonButton supports a dual-text display with properties for both TextRow1 and TextRow2, enabling rich, contextual button labeling. Additional properties such as Size and CurrentSize allow for control over the button's appearance and behavior based on available space in the Ribbon layout, while the SmallImage and LargeImage properties facilitate the setting of different icons for various button states. Inherits and extends the functionality of the base class to ensure a cohesive user experience within a Ribbon control layout. The class provides callbacks that manage property changes and layout adjustments dynamically.

Definition

Constructors

Initializes a new instance of the RadRibbonButton class.

C#
public RadRibbonButton()

Fields

CollapseToMediumProperty

DependencyProperty

Identifies the CollapseToMedium property.

C#
public static readonly DependencyProperty CollapseToMediumProperty

CollapseToSmallProperty

DependencyProperty

Identifies the CollapseToSmall property.

C#
public static readonly DependencyProperty CollapseToSmallProperty

CurrentSizeProperty

DependencyProperty

Identifies the CurrentSize property.

C#
public static readonly DependencyProperty CurrentSizeProperty

IsAutoSizeProperty

DependencyProperty

Identifies the IsAutoSize property.

C#
public static readonly DependencyProperty IsAutoSizeProperty

LargeImageProperty

DependencyProperty

Identifies the LargeImage property.

C#
public static readonly DependencyProperty LargeImageProperty

SizeProperty

DependencyProperty

Identifies the Size property.

C#
public static readonly DependencyProperty SizeProperty

SmallImageProperty

DependencyProperty

Identifies the SmallImage property.

C#
public static readonly DependencyProperty SmallImageProperty

SplitTextProperty

DependencyProperty

Identifies the SplitText property.

C#
public static readonly DependencyProperty SplitTextProperty

TextProperty

DependencyProperty

Identifies the Text property.

C#
public static readonly DependencyProperty TextProperty

TextRow1Property

DependencyProperty

Identifies the TextRow1 property.

C#
public static readonly DependencyProperty TextRow1Property

TextRow2Property

DependencyProperty

Identifies the TextRow2 property.

C#
public static readonly DependencyProperty TextRow2Property

Properties

Get/Set the guidance about button's resize to the Medium size. This is a dependency property.

C#
public CollapseThreshold CollapseToMedium { get; set; }

Implements: IRibbonButton.CollapseToMedium

Get/Set the guidance about button's resize to the Small size. This is a dependency property.

C#
public CollapseThreshold CollapseToSmall { get; set; }

Implements: IRibbonButton.CollapseToSmall

Get/Set the current State-size of the button. This is a dependency property.

C#
public ButtonSize CurrentSize { get; }

Implements: IRibbonButton.CurrentSize

Get/Set the permission to resize the Image according to the RibbonView guidance. This is a dependency property.

C#
public bool IsAutoSize { get; set; }

LargeImage

ImageSource

Get/Set the LargeImage that is shown in Large button state. This is a dependency property.

C#
public ImageSource LargeImage { get; set; }

Implements: IRibbonButton.LargeImage

Get/Set the button initial size. In fact this is the max-size that the button can implement. This is a dependency property.

C#
public ButtonSize Size { get; set; }

Implements: IRibbonButton.Size

SmallImage

ImageSource

Get/Set the SmallImage that is shown in Medium and Small button state. This is a dependency property.

C#
public ImageSource SmallImage { get; set; }

Implements: IRibbonButton.SmallImage

Enable/disable the Text splitting for the Large-sized button. This is a dependency property.

C#
public bool SplitText { get; set; }

Get/Set the Text label that is shown in Medium and Large button state. This is a dependency property.

C#
public string Text { get; set; }

Implements: IRibbonButton.Text

Get/Set the Text label that is shown in Medium and Large button state. This is a dependency property.

C#
public string TextRow1 { get; }

Get/Set the Text label that is shown only in Large button state. This is a dependency property.

C#
public string TextRow2 { get; }

Methods

Invoked whenever application code or internal processes (such as a rebuilding layout pass) call. .

C#
public override void OnApplyTemplate()

Overrides: RadButton.OnApplyTemplate()

Creates a RadButtonAutomationPeer.

C#
protected override AutomationPeer OnCreateAutomationPeer()
Returns:

AutomationPeer

Overrides: RadButton.OnCreateAutomationPeer()

Raises the event. This method is invoked whenever is set to true internally.

C#
protected override void OnInitialized(EventArgs e)
Parameters:eEventArgs

The RoutedEventArgs that contains the event data.

Overrides: RadButton.OnInitialized(EventArgs)

Implements the interface for button resizing in order to follow the resize mechanism of the ribbon group.

C#
public void SetVariant(RibbonGroupVariant variant)
Parameters:variantRibbonGroupVariant

Implements: IVariantControl.SetVariant(RibbonGroupVariant)