WPF

Code Examples Upgrade Guide User Guide Demos Support Forums Download
  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class RibbonItemsControl

    Show / Hide Table of Contents

    Class RibbonItemsControl

    Represents base abstract class for Ribbon ItemsControls.

    Inheritance
    System.Object
    RibbonItemsControl
    DropDownButton
    RibbonGallery
    Implements
    ICollapsable
    IRibbonControl
    System.IDisposable
    Namespace: Syncfusion.Windows.Tools.Controls
    Assembly: Syncfusion.Tools.Wpf.dll
    Syntax
    public abstract class RibbonItemsControl : ItemsControl, ICollapsable, IRibbonControl, IDisposable

    Constructors

    RibbonItemsControl()

    Initializes a new instance of the RibbonItemsControl class.

    Declaration
    public RibbonItemsControl()

    Fields

    CollapseLabelProperty

    Used to represent the CollpaseLabel. It is a dependency property.

    Declaration
    public static readonly DependencyProperty CollapseLabelProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    IconStretchProperty

    Identifies the IconStretch dependency property.

    Declaration
    public static readonly DependencyProperty IconStretchProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty
    Remarks

    The identifier for the IconStretch dependency property.

    IconTemplateProperty

    Identifies the IconTemplate dependency property.

    Declaration
    public static readonly DependencyProperty IconTemplateProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty
    Remarks

    The identifier for the IconTemplate dependency property.

    IconTemplateSelectorProperty

    Identifies the IconTemplateSelector dependency property.

    Declaration
    public static readonly DependencyProperty IconTemplateSelectorProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty
    Remarks

    The identifier for the IconTemplateSelector dependency property.

    IconTypeProperty

    Identifies the IconType Property.

    Declaration
    public static readonly DependencyProperty IconTypeProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    IsAddInPopupProperty

    Used to represent the IsAddInPopup. It is a dependency property.

    Declaration
    protected static readonly DependencyProperty IsAddInPopupProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    IsDropDownOpenProperty

    Identifies whether the dropdown popup is open.

    Declaration
    public static readonly DependencyProperty IsDropDownOpenProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    IsLargeImageVisibleProperty

    Identifies whether large icon is set in the control.

    Declaration
    protected static readonly DependencyProperty IsLargeImageVisibleProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    IsMultiLineProperty

    Identifies the IsMultiline property.

    Declaration
    protected static readonly DependencyProperty IsMultiLineProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    IsSmallImageVisibleProperty

    Identifies the small icon is set in the control.

    Declaration
    protected static readonly DependencyProperty IsSmallImageVisibleProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    LabelProperty

    Identifies the text that labels the control

    Declaration
    public static readonly DependencyProperty LabelProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    LargeIconProperty

    Identifies the large icon that appears in the control.

    Declaration
    public static readonly DependencyProperty LargeIconProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    MediumIconProperty

    Identifies the MediumIcon dependency property.

    Declaration
    public static readonly DependencyProperty MediumIconProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty
    Remarks

    The identifier for the MediumIcon dependency property.

    SizeFormProperty

    Identifies type of the control size.

    Declaration
    public static readonly DependencyProperty SizeFormProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    SmallIconProperty

    Identifies the small icon that appears in the control.

    Declaration
    public static readonly DependencyProperty SmallIconProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    SplitLabelIntoTwoLineProperty

    Identifies the SplitIntoTwoLine property.

    Declaration
    protected static readonly DependencyProperty SplitLabelIntoTwoLineProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    VectorImageProperty

    Identifies the VectorImage Property.

    Declaration
    protected static readonly DependencyProperty VectorImageProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    Properties

    CollapseLabel

    Gets or sets the collapse label.

    Declaration
    public string CollapseLabel { get; set; }
    Property Value
    Type Description
    System.String

    The collapse label.

    IconStretch

    Gets or sets fills the Icon in allocated space.

    Declaration
    public Stretch IconStretch { get; set; }
    Property Value
    Type Description
    System.Windows.Media.Stretch

    IconTemplate

    Gets or sets the template that used to display the icon of RibbonItemsControl.

    Declaration
    public DataTemplate IconTemplate { get; set; }
    Property Value
    Type Description
    System.Windows.DataTemplate

    The System.Windows.DataTemplate is used to display an icon in RibbonItemsControl.

    Remarks

    IconTemplate inherits its parent DataContext. The RibbonItemsControl exposes IconTemplateSelector, IconTemplate, LargeIcon, SmallIcon, MediumIcon and VectorImage properties for setting the Icon. It loads icon in the following priority order,

    • IconTemplateSelector
    • IconTemplate
    • VectorImage
    • LargeIcon
    • MediumIcon
    • SmallIcon
    Examples

    The example below illustrates how to use IconTemplate for split button.

    <syncfusion:SplitButton>
                      <syncfusion:SplitButton.IconTemplate>
                           <DataTemplate x:Name="template">
                               <Grid >
                                  <Image  Width="26" Height="26" Source="/Resources/Paste32.png"/>
                               </Grid>
                           </DataTemplate>
                       </syncfusion:SplitButton.IconTemplate>
    </syncfusion:SplitButton>

    The new IconTemplate property used which has the features to customize the split button template.

    IconTemplateSelector

    Gets or sets a System.Windows.Controls.DataTemplateSelector that determines the template to display icon in a RibbonItemsControl based on SizeForm.

    Declaration
    public DataTemplateSelector IconTemplateSelector { get; set; }
    Property Value
    Type Description
    System.Windows.Controls.DataTemplateSelector

    A custom System.Windows.Controls.DataTemplateSelector selector object that provides logic to choose a System.Windows.DataTemplate to be returned. The default is null.

    Remarks

    The RibbonItemsControl exposes IconTemplateSelector, IconTemplate, LargeIcon, SmallIcon, MediumIcon and VectorImage properties for setting the Icon. It loads icon in the following priority order,

    • IconTemplateSelector
    • IconTemplate
    • VectorImage
    • LargeIcon
    • MediumIcon
    • SmallIcon
    See Also
    IconTemplate

    IconType

    Gets or sets the IconType.RibbonButton size.

    Declaration
    public IconType IconType { get; set; }
    Property Value
    Type Description
    IconType
    Examples
    SplitButton button = new SplitButton();
    button.Label = "Button";        
    button.IconType = IconType.Icon;
    See Also
    RibbonButton

    IsAddInPopup

    Gets or sets the value check whether add in popup or not.

    Declaration
    public bool IsAddInPopup { get; set; }
    Property Value
    Type Description
    System.Boolean

    IsDropDownOpen

    Gets or sets a value indicating whether the dropdown popup is open.

    Declaration
    public bool IsDropDownOpen { get; set; }
    Property Value
    Type Description
    System.Boolean

    Type: System.Boolean True is popup is open, false is closed.

    Examples
    DropDownButton button = new DropDownButton();
    // Create source.
    // ....
    button.IsDropDownOpen = true;
    See Also
    System.Boolean

    IsLargeImageVisible

    Gets or sets a value indicating whether this instance large image is set.

    Declaration
    public bool IsLargeImageVisible { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if this instance is large image visible; otherwise, false.

    IsMultiLine

    Gets or sets a value indicating whether this instance is multi line.

    Declaration
    public bool IsMultiLine { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if this instance is multi line; otherwise, false.

    IsSmallImageVisible

    Gets or sets a value indicating whether this instance small image is set.

    Declaration
    public bool IsSmallImageVisible { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if this instance is small image visible; otherwise, false.

    Label

    Gets or sets the text that labels the control.

    Declaration
    public string Label { get; set; }
    Property Value
    Type Description
    System.String

    Type: System.String Text that labels the control. The default is empty string.

    See Also
    System.String

    LargeIcon

    Gets or sets the large icon that appears in the control.

    Declaration
    public ImageSource LargeIcon { get; set; }
    Property Value
    Type Description
    System.Windows.Media.ImageSource
    Remarks

    Many controls have more than just text in the element. Often there is an icon.

    Examples
    // Create the image element.
    DropDownButton button = new DropDownButton();
    // Create source.
    BitmapImage bimage = new BitmapImage();
    // BitmapImage.UriSource must be in a BeginInit/EndInit block.
    bimage.BeginInit();
    bimage.UriSource = new Uri(@"/sampleImages/sample.jpg",UriKind.RelativeOrAbsolute);
    bimage.EndInit();
    // Set the image source.
    button.LargeIcon = bimage;
    See Also
    RibbonButton
    System.Windows.Media.ImageSource

    MediumIcon

    Gets or sets the image that appears in the control when the Simplified value is set.

    Declaration
    public ImageSource MediumIcon { get; set; }
    Property Value
    Type Description
    System.Windows.Media.ImageSource

    The System.Windows.Media.ImageSource value that is used to set the MediumIcon.

    Remarks

    The MediumIcon appears in the control only when the LayoutMode is set to Simplified.

    Examples
    // Create the image element.
    DropDownButton button = new DropDownButton();
    // Create source.
    BitmapImage bimage = new BitmapImage();
    // BitmapImage.UriSource must be in a BeginInit/EndInit block.
    bimage.BeginInit();
    bimage.UriSource = new Uri(@"/sampleImages/sample.jpg",UriKind.RelativeOrAbsolute);
    bimage.EndInit();
    // Set the image source.
    button.MediumIcon = bimage;
    See Also
    System.Windows.Media.ImageSource

    Popup

    Gets internal Popup control.

    Declaration
    protected Popup Popup { get; }
    Property Value
    Type Description
    System.Windows.Controls.Primitives.Popup

    SizeForm

    Gets or sets the size form.

    Declaration
    public SizeForm SizeForm { get; set; }
    Property Value
    Type Description
    SizeForm

    Type: SizeForm Enumeration that specifies type of the control size.

    Remarks

    Changing control's SizeForm property changes it's visual representation. Text is only rendered in Large and Small variants.

    Examples
    DropDownButton button = new DropDownButton();
    button.Label = "Button";        
    button.SizeForm = SizeForm.Large;
    See Also
    SizeForm

    SmallIcon

    Gets or sets the small icon that appears in the control.

    Declaration
    public ImageSource SmallIcon { get; set; }
    Property Value
    Type Description
    System.Windows.Media.ImageSource
    Remarks

    Many controls have more than just text in the element. Often there is an icon.

    Examples
    // Create the image element.
    DropDownButton button = new DropDownButton();
    // Create source.
    BitmapImage bimage = new BitmapImage();
    // BitmapImage.UriSource must be in a BeginInit/EndInit block.
    bimage.BeginInit();
    bimage.UriSource = new Uri(@"/sampleImages/sample.jpg",UriKind.RelativeOrAbsolute);
    bimage.EndInit();
    // Set the image source.
    button.SmallIcon = bimage;
    See Also
    System.Windows.Media.ImageSource

    SplitLabelIntoTwoLine

    Gets or sets a value indicating whether [split label into two line].

    Declaration
    public bool SplitLabelIntoTwoLine { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if [split label into two line]; otherwise, false.

    ToggleButton

    Gets internal toggle button control.

    Declaration
    protected FrameworkElement ToggleButton { get; }
    Property Value
    Type Description
    System.Windows.FrameworkElement

    VectorImage

    Gets or sets a value indicating whether VectorImage.

    Declaration
    public ObservableCollection<Path> VectorImage { get; set; }
    Property Value
    Type Description
    System.Collections.ObjectModel.ObservableCollection<System.Windows.Shapes.Path>

    Methods

    CoerceOnIsMultiline(Object)

    Coerces the on is multiline.

    Declaration
    protected virtual object CoerceOnIsMultiline(object value)
    Parameters
    Type Name Description
    System.Object value

    The value.

    Returns
    Type Description
    System.Object

    The coerce value

    CoerceOnIsMultiline(DependencyObject, Object)

    Coerces the on is multiline.

    Declaration
    public static object CoerceOnIsMultiline(DependencyObject d, object baseValue)
    Parameters
    Type Name Description
    System.Windows.DependencyObject d

    The d.

    System.Object baseValue

    The base value.

    Returns
    Type Description
    System.Object

    The instance of coerce

    CoerceOnLabel(Object)

    Coerces the on label.

    Declaration
    protected virtual object CoerceOnLabel(object value)
    Parameters
    Type Name Description
    System.Object value

    The value.

    Returns
    Type Description
    System.Object

    The coerce value

    CoerceOnLabel(DependencyObject, Object)

    Coerces the on label.

    Declaration
    public static object CoerceOnLabel(DependencyObject d, object baseValue)
    Parameters
    Type Name Description
    System.Windows.DependencyObject d

    The d.

    System.Object baseValue

    The base value.

    Returns
    Type Description
    System.Object

    Dispose()

    Dispose all used objects

    Declaration
    public void Dispose()

    FireAfterDropDownPopup()

    Raises after DropDownPopup event.

    Declaration
    protected virtual void FireAfterDropDownPopup()

    FireBeforeDropDownPopup(CancelEventArgs)

    Fires the before drop down popup.

    Declaration
    protected virtual void FireBeforeDropDownPopup(CancelEventArgs e)
    Parameters
    Type Name Description
    System.ComponentModel.CancelEventArgs e

    The System.ComponentModel.CancelEventArgs instance containing the event data.

    OnApplyTemplate()

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

    Declaration
    public override void OnApplyTemplate()

    OnGotMouseCapture(MouseEventArgs)

    Invoked when an unhandled Mouse.GotMouseCapture attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

    Declaration
    protected override void OnGotMouseCapture(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.MouseEventArgs e

    The MouseEventArgs that contains the event data.

    OnIsDropDownOpenChanged(DependencyPropertyChangedEventArgs)

    Updates property value cache and raises IsDropDownOpenChanged event.

    Declaration
    protected virtual void OnIsDropDownOpenChanged(DependencyPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs e

    Property change details, such as old value and new value.

    OnIsMultiLineChanged(DependencyPropertyChangedEventArgs)

    Raises the IsMultiLineChanged event.

    Declaration
    protected virtual void OnIsMultiLineChanged(DependencyPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs e

    The System.Windows.DependencyPropertyChangedEventArgs instance containing the event data.

    OnKeyDown(KeyEventArgs)

    Invoked when the System.Windows.UIElement.KeyDown event is received.

    Declaration
    protected override void OnKeyDown(KeyEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.KeyEventArgs e

    Information about the event.

    OnLabelChanged(DependencyPropertyChangedEventArgs)

    Updates property value cache and raises LabelChanged event.

    Declaration
    protected virtual void OnLabelChanged(DependencyPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs e

    Property change details, such as old value and new value.

    OnLargeIconChanged(DependencyPropertyChangedEventArgs)

    Updates property value cache and raises LargeIconChanged event.

    Declaration
    protected virtual void OnLargeIconChanged(DependencyPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs e

    Property change details, such as old value and new value.

    OnLostMouseCapture(MouseEventArgs)

    Invoked when an unhandled Mouse.LostMouseCapture attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

    Declaration
    protected override void OnLostMouseCapture(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.MouseEventArgs e

    TheMouseEventArgs that contains event data.

    OnMouseEnter(MouseEventArgs)

    Invoked when an unhandled System.Windows.Input.Mouse.MouseEnterattached event is raised on this element. Implement this method to add class handling for this event.

    Declaration
    protected override void OnMouseEnter(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.MouseEventArgs e

    The System.Windows.Input.MouseEventArgs that contains the event data.

    OnMouseLeftButtonUp(MouseButtonEventArgs)

    Provides class handling for the MouseLeftButtonUp routed event that occurs when the left mouse button is released while the mouse pointer is over this control. Invoked when an unhandled System.Windows.UIElement.MouseLeftButtonUprouted event reaches Ban element in its route that is derived from this class. Implement this method to add class handling for this event.

    Declaration
    protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.MouseButtonEventArgs e

    The System.Windows.Input.MouseButtonEventArgs that contains the event data. The event data reports that the left mouse button was released.

    OnMouseRightButtonUp(MouseButtonEventArgs)

    Invoked when an unhandled System.Windows.UIElement.MouseRightButtonUprouted event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

    Declaration
    protected override void OnMouseRightButtonUp(MouseButtonEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.MouseButtonEventArgs e

    The System.Windows.Input.MouseButtonEventArgs that contains the event data. The event data reports that the right mouse button was released.

    OnPreviewKeyDown(KeyEventArgs)

    Raises the PreviewKeyDown event.

    Declaration
    protected override void OnPreviewKeyDown(KeyEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.KeyEventArgs e

    The event data

    OnSizeFormChanged(DependencyPropertyChangedEventArgs)

    Updates property value cache and raises SizeFormChanged event.

    Declaration
    protected virtual void OnSizeFormChanged(DependencyPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs e

    Property change details, such as old value and new value.

    OnSmallIconChanged(DependencyPropertyChangedEventArgs)

    Updates property value cache and raises SmallIconChanged event.

    Declaration
    protected virtual void OnSmallIconChanged(DependencyPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs e

    Property change details, such as old value and new value.

    OnSplitLabelIntoTwoLineChanged(DependencyPropertyChangedEventArgs)

    Raises the SplitIntoTwoLineChanged event.

    Declaration
    protected virtual void OnSplitLabelIntoTwoLineChanged(DependencyPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs e

    The System.Windows.DependencyPropertyChangedEventArgs instance containing the event data.

    OnStylusSystemGesture(StylusSystemGestureEventArgs)

    Invoked when an unhandled Stylus.StylusSystemGesture attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

    Declaration
    protected override void OnStylusSystemGesture(StylusSystemGestureEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.StylusSystemGestureEventArgs e

    The event data

    OnTouchUp(TouchEventArgs)

    Declaration
    protected override void OnTouchUp(TouchEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.TouchEventArgs e

    Popup_Closed(Object, EventArgs)

    Handles the Closed event of the Popup control.

    Declaration
    protected virtual void Popup_Closed(object sender, EventArgs e)
    Parameters
    Type Name Description
    System.Object sender

    The source of the event.

    System.EventArgs e

    The System.EventArgs instance containing the event data.

    Popup_Opened(Object, EventArgs)

    Executes when the popup is opened.

    Declaration
    protected virtual void Popup_Opened(object sender, EventArgs e)
    Parameters
    Type Name Description
    System.Object sender

    The source of the event.

    System.EventArgs e

    The System.EventArgs instance containing the event data.

    ToggleButton_MouseLeftButtonDown(Object, MouseButtonEventArgs)

    Handles the MouseLeftButtonDown event of the ToggleButton control.

    Declaration
    protected virtual void ToggleButton_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
    Parameters
    Type Name Description
    System.Object sender

    The source of the event.

    System.Windows.Input.MouseButtonEventArgs e

    The System.Windows.Input.MouseButtonEventArgs instance containing the event data.

    Events

    IsDropDownOpenChanged

    Event that is raised when IsDropDownOpen property is changed.

    Declaration
    public event PropertyChangedCallback IsDropDownOpenChanged
    Event Type
    Type Description
    System.Windows.PropertyChangedCallback

    IsMultiLineChanged

    Occurs when [is multi line changed].

    Declaration
    public event PropertyChangedCallback IsMultiLineChanged
    Event Type
    Type Description
    System.Windows.PropertyChangedCallback

    LabelChanged

    Event that is raised when Label property is changed.

    Declaration
    public event PropertyChangedCallback LabelChanged
    Event Type
    Type Description
    System.Windows.PropertyChangedCallback

    LargeIconChanged

    Event that is raised when LargeIcon property is changed.

    Declaration
    public event PropertyChangedCallback LargeIconChanged
    Event Type
    Type Description
    System.Windows.PropertyChangedCallback

    SizeFormChanged

    Event that is raised when SizeForm property is changed.

    Declaration
    public event PropertyChangedCallback SizeFormChanged
    Event Type
    Type Description
    System.Windows.PropertyChangedCallback

    SmallIconChanged

    Event that is raised when SmallIcon property is changed.

    Declaration
    public event PropertyChangedCallback SmallIconChanged
    Event Type
    Type Description
    System.Windows.PropertyChangedCallback

    SplitLabelIntoTwoLineChanged

    Occurs when [split label into two line changed].

    Declaration
    public event PropertyChangedCallback SplitLabelIntoTwoLineChanged
    Event Type
    Type Description
    System.Windows.PropertyChangedCallback

    Explicit Interface Implementations

    IRibbonControl.get_ToolTip()

    Declaration
    object IRibbonControl.get_ToolTip()
    Returns
    Type Description
    System.Object

    Implements

    ICollapsable
    IRibbonControl
    System.IDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved