Class RibbonGalleryItem
Represents a RibbonGalleryItem control.
Namespace: Syncfusion.Windows.Tools.Controls
Assembly: Syncfusion.Tools.Wpf.dll
Syntax
public class RibbonGalleryItem : ButtonBase
Remarks
RibbonGalleryItem class represents a control that is used to wrap any content inside the Ribbon gallery control.
Examples
This example shows how to create a RibbonGalleryItem in XAML.
<ribbon:RibbonGalleryItem>
<Image Source="SampleImages/Apex.png"/>
</ribbon:RibbonGalleryItem>
This example shows how to create a ButtonPanel in C#.
TextBlock text = new TextBlock();
text.Text = "Item";
RibbonGalleryItem item = new RibbonGalleryItem();
item.Content = text;
Constructors
RibbonGalleryItem()
Initializes a new instance of the RibbonGalleryItem class.
Declaration
public RibbonGalleryItem()
Fields
CheckOnClickProperty
Defines whether gallery item can be checked on mouse Click. This is a dependency property.
Declaration
public static readonly DependencyProperty CheckOnClickProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
IsCheckedProperty
Defines whether gallery item is checked. This is a dependency property.
Declaration
public static readonly DependencyProperty IsCheckedProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
Properties
CheckOnClick
Gets or sets a value indicating whether [check on click].
Declaration
public bool CheckOnClick { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
IsChecked
Gets or sets a value indicating whether this instance is checked.
Declaration
public bool IsChecked { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
Methods
OnCheckOnClickChanged(DependencyPropertyChangedEventArgs)
Updates property value cache and raises CheckOnClickChanged event.
Declaration
protected virtual void OnCheckOnClickChanged(DependencyPropertyChangedEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.DependencyPropertyChangedEventArgs | e | Property change details, such as old value and new value. |
OnCreateAutomationPeer()
Creates AutomationPeer for ribbon button.
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
| Type | Description |
|---|---|
| System.Windows.Automation.Peers.AutomationPeer | An appropriate RibbonButtonAutomationPeer for this control as part of the WPF infrastructure. |
OnIsCheckedChanged(DependencyPropertyChangedEventArgs)
Updates property value cache and raises IsCheckedChanged event.
Declaration
protected virtual void OnIsCheckedChanged(DependencyPropertyChangedEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.DependencyPropertyChangedEventArgs | e | Property change details, such as old value and new value. |
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. |
OnMouseLeftButtonUp(MouseButtonEventArgs)
Provides class handling for the System.Windows.UIElement.MouseLeftButtonUp routed event that occurs when the left mouse button is released while the mouse pointer is over this control.
Declaration
protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Input.MouseButtonEventArgs | e | The event data. |
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. |
OnStylusSystemGesture(StylusSystemGestureEventArgs)
Declaration
protected override void OnStylusSystemGesture(StylusSystemGestureEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Input.StylusSystemGestureEventArgs | e |
OnTouchUp(TouchEventArgs)
Provides class handling for the TouchUp routed event that occurs when a touch is released inside this element.
Declaration
protected override void OnTouchUp(TouchEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Input.TouchEventArgs | e | The event data |
Events
CheckOnClickChanged
Event that is raised when CheckOnClick property is changed.
Declaration
public event PropertyChangedCallback CheckOnClickChanged
Event Type
| Type |
|---|
| System.Windows.PropertyChangedCallback |
IsCheckedChanged
Event that is raised when IsChecked property is changed.
Declaration
public event PropertyChangedCallback IsCheckedChanged
Event Type
| Type |
|---|
| System.Windows.PropertyChangedCallback |