Class BackstageViewTabItem
Represents a single tab that is used in a BackstageView control.
Inheritance
Namespace: Syncfusion.UI.Xaml.Ribbon
Assembly: Syncfusion.Ribbon.WinUI.dll
Syntax
public class BackstageViewTabItem : ListViewItem, IBackstageViewItem, IDisposable
Remarks
The BackstageViewTabItem is a tab that responds to the SelectionChanged event in a BackstageView control.
Examples
The code example below shows how to add BackstageViewTabItem control in a BackstageView.
<syncfusion:RibbonBackstage Target="{Binding ElementName=rootGrid}">
<syncfusion:BackstageView ShowBackButton="True">
syncfusion:BackstageView.Items>
<syncfusion:BackstageViewTabItem Header="New"
Icon="NewFolder">
<local:Sample1 />
</syncfusion:BackstageViewTabItem>
<syncfusion:BackstageViewTabItem Header="Open">
<syncfusion:BackstageViewTabItem.Icon>
<FontIcon Glyph="" />
</syncfusion:BackstageViewTabItem.Icon>
<local:Sample2 />
</syncfusion:BackstageViewTabItem>
</syncfusion:BackstageView.Items>
</syncfusion:BackstageView>
</syncfusion:RibbonBackstage>
Constructors
BackstageViewTabItem()
Initializes a new instance of the BackstageViewTabItem class.
Declaration
public BackstageViewTabItem()
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 |
IconProperty
Identifies the Icon dependency property.
Declaration
public static readonly DependencyProperty IconProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Properties
Header
Gets or sets the content for the BackstageViewTabItem header.
Declaration
public object Header { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The content for the BackstageViewTabItem 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 BackstageViewTabItem.
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 BackstageViewTabItem. The default value is |
Examples
The code example below shows how to use the HeaderTemplate property in a BackstageViewTabItem.
<ribbon:BackstageViewTabItem>
<ribbon:BackstageViewTabItem.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding Header}"/>
</DataTemplate>
</ribbon:BackstageViewTabItem.HeaderTemplate>
</ribbon:BackstageViewTabItem>
- or -
<ribbon:BackstageViewTabItem HeaderTemplate="{StaticResource TabItemHeaderTemplate}"/>
Icon
Gets or sets an icon that appears in a BackstageViewTabItem.
Declaration
public IconElement Icon { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.Controls.IconElement | The icon that appears in a BackstageViewTabItem. The default value is null. |
Remarks
The icon value can be assigned from the Microsoft.UI.Xaml.Controls.Symbol enumeration, or a Unicode string that references a glyph in the Segoe MDL2 Assets font. You can use character map application that comes with Windows to browse the font's glyphs and find their Unicode values. Then, use the format $#x(UNICODE) in XAML or the format \u(UNICODE) in code, where (UNICODE) is the value of the glyph that indicates the location in the font file.
Examples
<ribbon:BackstageViewTabItem Header="Open">
<ribbon:BackstageViewTabItem.Icon>
<SymbolIcon Symbol="Save" />
</ribbon:BackstageViewTabItem.Icon>
</ribbon:BackstageViewTabItem>
<ribbon:BackstageViewTabItem Header="Open">
<ribbon:BackstageViewTabItem.Icon>
<FontIcon FontFamily="Segoe MDL2 Assets"
FontSize="16"
Glyph="" />
</ribbon:BackstageViewTabItem.Icon>
</ribbon:BackstageViewTabItem>
<ribbon:BackstageViewTabItem Header="Open">
<ribbon:BackstageViewTabItem.Icon>
<BitmapIcon UriSource="ms-appx:///Assets/Save.png" />
</ribbon:BackstageViewTabItem.Icon>
</ribbon:BackstageViewTabItem>
Methods
Dispose()
Release the unmanaged resources of BackstageView.
Declaration
public void Dispose()
Dispose(Boolean)
Release the unmanaged resources of BackstageViewTabItem control.
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 |
OnGotFocus(RoutedEventArgs)
Declaration
protected override void OnGotFocus(RoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.UI.Xaml.RoutedEventArgs | e |
OnProcessKeyboardAccelerators(ProcessKeyboardAcceleratorEventArgs)
Raises when the accelerator or shortcut key is pressed.
Declaration
protected override void OnProcessKeyboardAccelerators(ProcessKeyboardAcceleratorEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.UI.Xaml.Input.ProcessKeyboardAcceleratorEventArgs | args | Process keyboard accelerator Event Argument |
OnTapped(TappedRoutedEventArgs)
Declaration
protected override void OnTapped(TappedRoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.UI.Xaml.Input.TappedRoutedEventArgs | e |