Class RibbonTab
Represents a tab in a SfRibbon
Inheritance
Implements
Namespace: Syncfusion.UI.Xaml.Ribbon
Assembly: Syncfusion.Ribbon.WinUI.dll
Syntax
public class RibbonTab : ItemsControl, IDisposable
Remarks
RibbonTab organizes related groups of commands in a SfRibbon and hosts one or more RibbonGroup instances. A RibbonGroup then hosts controls that represent application commands.
Examples
This code example shows how to declare and use the RibbonTab.
<ribbon:RibbonTab Header="Home" >
<ribbon:RibbonGroup Header="Clipboard">
<ribbon:RibbonSplitButton Content="Paste"
Icon="Paste"
SizeMode="Large" />
</ribbon:RibbonGroup>
<ribbon:RibbonGroup Header="Normal">
<ribbon:RibbonButton Content="Cut"
Icon="Cut"
SizeMode="Normal" />
<ribbon:RibbonButton Content="Copy "
Icon="Copy"
SizeMode="Normal" />
<ribbon:RibbonButton Content="Format Painter"
SizeMode="Normal">
<ribbon:RibbonButton.Icon>
<FontIcon Glyph="" />
</ribbon:RibbonButton.Icon>
</ribbon:RibbonButton>
</ribbon:RibbonGroup>
</ribbon:RibbonTab>
Constructors
RibbonTab()
Initializes a new instance of the RibbonTab class.
Declaration
public RibbonTab()
Fields
HeaderProperty
Identifies the Header dependency property.
Declaration
public static readonly DependencyProperty HeaderProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
HeaderTemplateProperty
Identifies the HeaderTemplate dependency property.
Declaration
public static readonly DependencyProperty HeaderTemplateProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Properties
Header
Gets or sets the content for the RibbonTab header.
Declaration
public object Header { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The content for the RibbonTab header. The default value is null. |
HeaderTemplate
Gets or sets the Microsoft.UI.Xaml.DataTemplate that defines the visual representation of the control's header in RibbonTab.
Declaration
public DataTemplate HeaderTemplate { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DataTemplate | The template that is used to display the header content of RibbonTab. The default value is |
Examples
The code example below shows how to use the HeaderTemplate property in a RibbonTab.
<ribbon:RibbonTab>
<ribbon:RibbonTab.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding Header}"/>
</DataTemplate>
</ribbon:RibbonTab.HeaderTemplate>
</ribbon:RibbonTab>
- or -
<ribbon:RibbonTab HeaderTemplate="{StaticResource RibbonTabHeaderTemplate}"/>
Methods
Dispose()
Release the unmanaged resources of RibbonGroup.
Declaration
public void Dispose()
Dispose(Boolean)
Release the unmanaged resources of RibbonTab.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | true if unmanaged resources should be disposed; otherwise, false. |
OnCreateAutomationPeer()
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
Type |
---|
Microsoft.UI.Xaml.Automation.Peers.AutomationPeer |
OnPointerEntered(PointerRoutedEventArgs)
Occurs when a pointer enters the hit test area of the RibbonTab.
Declaration
protected override void OnPointerEntered(PointerRoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.UI.Xaml.Input.PointerRoutedEventArgs | e | The Microsoft.UI.Xaml.Input.PointerRoutedEventArgs that contains the event data. |
OnPointerExited(PointerRoutedEventArgs)
Occurs when a pointer leaves the hit test area of the RibbonTab.
Declaration
protected override void OnPointerExited(PointerRoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.UI.Xaml.Input.PointerRoutedEventArgs | e | The Microsoft.UI.Xaml.Input.PointerRoutedEventArgs that contains the event data. |
OnPointerPressed(PointerRoutedEventArgs)
Occurs when a pointer pressed to the hit test area of the RibbonTab.
Declaration
protected override void OnPointerPressed(PointerRoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.UI.Xaml.Input.PointerRoutedEventArgs | e | The Microsoft.UI.Xaml.Input.PointerRoutedEventArgs that contains the event data. |
OnPointerReleased(PointerRoutedEventArgs)
Occurs when a pointer released from hit test area of the RibbonTab.
Declaration
protected override void OnPointerReleased(PointerRoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.UI.Xaml.Input.PointerRoutedEventArgs | e | The Microsoft.UI.Xaml.Input.PointerRoutedEventArgs that contains the event data. |