Class RibbonTab
Represents Ribbon TabItem control.
Inheritance
Implements
Namespace: Syncfusion.Windows.Tools.Controls
Assembly: Syncfusion.Tools.Wpf.dll
Syntax
public class RibbonTab : ItemsControl, IDisposable
Constructors
RibbonTab()
Initializes a new instance of the RibbonTab class.
Declaration
public RibbonTab()
Fields
CaptionProperty
Identifies RibbonTab caption. This is a dependency property.
Declaration
public static readonly DependencyProperty CaptionProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
ContentTemplateProperty
Identifies the contenttemplate used by the RibbonTab Control.
Declaration
public static readonly DependencyProperty ContentTemplateProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
ContentTemplateSelectorProperty
Identifies the template selector used by the Ribbon Tab content.
Declaration
public static readonly DependencyProperty ContentTemplateSelectorProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
ContextColorProperty
Identifies color of the context tab color when RibbonTab is in ContextTabGroup. This is a dependency property.
Declaration
public static readonly DependencyProperty ContextColorProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
HasContextTabGroupProperty
Identifies whether RibbonTab belongs to ContextTabGroup. This is a dependency property.
Declaration
public static readonly DependencyProperty HasContextTabGroupProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
IsCancelRibbonStateProperty
Identifies the IsCancelRibbonState dependency property.
Declaration
public static readonly DependencyProperty IsCancelRibbonStateProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Remarks
The identifier for the IsCancelRibbonState dependency property.
IsCheckedProperty
Identifies the IsChecked dependency property.
Declaration
public static readonly DependencyProperty IsCheckedProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Remarks
The identifier for the IsChecked dependency property.
MergeOrderProperty
Identifies the MergeOrder dependency property.
Declaration
public static readonly DependencyProperty MergeOrderProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Remarks
The identifier for the MergeOrder dependency property.
MergeTypeProperty
Identifies the MergeType dependency property.
Declaration
public static readonly DependencyProperty MergeTypeProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Remarks
The identifier for the MergeType dependency property.
SizeReductionOrderProperty
Identifies the SizeReductionOrder dependency property.
Declaration
public static readonly DependencyProperty SizeReductionOrderProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Remarks
The identifier for the SizeReductionOrder dependency property.
TabButtonStyleProperty
Identifies the style to be used by the tab button control.
Declaration
public static readonly DependencyProperty TabButtonStyleProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
TabButtonTemplateProperty
Identifies a tab button control template.
Declaration
public static readonly DependencyProperty TabButtonTemplateProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
VisibilityChangedEvent
Event that is raised when Visibility property is changed.
Declaration
protected static readonly RoutedEvent VisibilityChangedEvent
Field Value
Type |
---|
System.Windows.RoutedEvent |
Properties
Caption
Gets or sets the text that headers the RibbonTab.
Declaration
public string Caption { get; set; }
Property Value
Type | Description |
---|---|
System.String | Type: System.String Text that headers the RibbonTab. The default is empty string. |
Examples
RibbonTab tab;
button.Caption = "Insert tab";
See Also
ContentTemplate
Gets or sets the data template used to display the content of RibbonTab. This is a dependency property./>
Declaration
public DataTemplate ContentTemplate { get; set; }
Property Value
Type |
---|
System.Windows.DataTemplate |
ContentTemplateSelector
Gets or sets a template selector which enables an application-writer to provide custom template selection logic. This is a dependency property.
Declaration
public DataTemplateSelector ContentTemplateSelector { get; set; }
Property Value
Type |
---|
System.Windows.Controls.DataTemplateSelector |
ContextAdorner
Gets or sets the context adorner.
Declaration
protected ContextAdorner ContextAdorner { get; set; }
Property Value
Type | Description |
---|---|
ContextAdorner | The context adorner. |
ContextColor
Gets or sets color of the context tab color when RibbonTab is in ContextTabGroup.
Declaration
public Color ContextColor { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Media.Color | Type: System.Windows.Media.Color Color value that will fill the RibbonTab |
ContextTabGroup
Gets or sets the context tab group.
Declaration
protected ContextTabGroup ContextTabGroup { get; set; }
Property Value
Type | Description |
---|---|
ContextTabGroup | The context tab group. |
HasContextTabGroup
Gets or sets a value indicating whether this instance has context tab group.
Declaration
public bool HasContextTabGroup { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
IsCancelRibbonState
Gets or sets the Ribbon state is cancel or not.
Declaration
public bool IsCancelRibbonState { get; set; }
Property Value
Type |
---|
System.Boolean |
IsChecked
Gets or sets a value indicating whether tab is checked.
Declaration
public bool IsChecked { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | True if tab is checked; otherwise, false. |
See Also
MergeOrder
Gets or sets the index of the merging child Ribbon tab to the parent Ribbon.
Declaration
public int MergeOrder { get; set; }
Property Value
Type |
---|
System.Int32 |
MergeType
Gets or sets the type of merging for the child Ribbon tab.
Declaration
public MergeType MergeType { get; set; }
Property Value
Type |
---|
MergeType |
SizeReductionOrder
Gets or sets a collection of RibbonBar names that specify the order in which RibbonBar size is reduced when ribbon size is reduced.
Declaration
public StringCollection SizeReductionOrder { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Specialized.StringCollection | A collection of RibbonBar names that specify the order in which RibbonBar size is reduced when ribbon size is reduced. The registered default is null. |
Examples
<syncfusion:RibbonTab Name="Insert" SizeReductionOrder="Links,Illustrations,Tables"
syncfusion:Ribbon.KeyTip="I"
Caption="Insert"
IsChecked="False">
<syncfusion:RibbonBar Name="Tables" Header="Tables">
// Ribbon Items can be added here
</syncfusion:RibbonBar>
<syncfusion:RibbonBar Name="Illustrations">
// Ribbon Items can be added here
</syncfusion:RibbonBar>
<syncfusion:RibbonBar Name="Links">
// Ribbon Items can be added here
</syncfusion:RibbonBar>
</syncfusion:RibbonTab>
TabButtonStyle
Gets or sets the style to be used by the tab button control.
Declaration
public Style TabButtonStyle { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Style | Type: System.Windows.Style The applied, non default style for the tab button, if present. Otherwise, null reference (Nothing in Visual Basic). The default is null reference (Nothing in Visual Basic). |
TabButtonTemplate
Gets or sets the tab button template.
Declaration
public ControlTemplate TabButtonTemplate { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Controls.ControlTemplate | The tab button template. |
VisualChildrenCount
Gets the number of visual child elements within this element.
Declaration
protected override int VisualChildrenCount { get; }
Property Value
Type | Description |
---|---|
System.Int32 | The number of visual child elements for this element. |
Methods
AddChildren()
Adds the childern.
Declaration
public void AddChildren()
AddItem(RibbonBar, RibbonDynamicItemInfo)
Declaration
public void AddItem(RibbonBar bar, RibbonDynamicItemInfo info)
Parameters
Type | Name | Description |
---|---|---|
RibbonBar | bar | |
RibbonDynamicItemInfo | info |
ArrangeOverride(Size)
Arranges child elements and determines a size for a ribbon tab.
Declaration
protected override Size ArrangeOverride(Size arrangeBounds)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Size | arrangeBounds | The final area within the parent that this element should use to arrange itself and its children |
Returns
Type | Description |
---|---|
System.Windows.Size | The actual size used. |
Dispose()
Declaration
public void Dispose()
GetVisualChild(Int32)
Overrides System.Windows.Media.Visual.GetVisualChild(System.Int32), and returns a child at the specified index from a collection of child elements.
Declaration
protected override Visual GetVisualChild(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index of the requested child element in the collection. |
Returns
Type | Description |
---|---|
System.Windows.Media.Visual | The requested child element. This should not return null; if the provided index is out of range, an exception is raised. |
MeasureOverride(Size)
Measures the size in layout required for child elements and determines a size for a ribbon tab.
Declaration
protected override Size MeasureOverride(Size constraint)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Size | constraint | The available size that this element can give to the child. Infinity can be specified as a value to indicate that the element will size to whatever content is available. |
Returns
Type | Description |
---|---|
System.Windows.Size | The size that this element determines it needs during layout, based on its calculations of children's sizes. |
OnCaptionChanged(DependencyPropertyChangedEventArgs)
Updates property value cache and raises CaptionChanged event.
Declaration
protected virtual void OnCaptionChanged(DependencyPropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyPropertyChangedEventArgs | e | Property changes details, such as old value and new value. |
OnContextColorChanged(DependencyPropertyChangedEventArgs)
Updates property value cache and raises ContextColorChanged event.
Declaration
protected virtual void OnContextColorChanged(DependencyPropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyPropertyChangedEventArgs | e | Property changes details, such as old value and new value. |
OnCreateAutomationPeer()
Returns class-specific AutomationPeer implementations for the Windows Presentation Foundation infrastructure.
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
Type | Description |
---|---|
System.Windows.Automation.Peers.AutomationPeer | The type-specific AutomationPeer implementation. |
OnItemsChanged(NotifyCollectionChangedEventArgs)
Invoked when the Items property changes.
Declaration
protected override void OnItemsChanged(NotifyCollectionChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Specialized.NotifyCollectionChangedEventArgs | e | Information about the change. |
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 |
OnTabButtonStyleChanged(DependencyPropertyChangedEventArgs)
Updates property value cache and raises TabButtonStyleChanged event.
Declaration
protected virtual void OnTabButtonStyleChanged(DependencyPropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyPropertyChangedEventArgs | e | Property changes details, such as old value and new value. |
OnTabButtonTemplateChanged(DependencyPropertyChangedEventArgs)
Updates property value cache and raises TabButtonTemplateChanged event.
Declaration
protected virtual void OnTabButtonTemplateChanged(DependencyPropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyPropertyChangedEventArgs | e | Property changes details, such as old value and new value. |
OnVisualParentChanged(DependencyObject)
Invoked when the parent of this element in the visual tree is changed. Overrides System.Windows.UIElement.OnVisualParentChanged(System.Windows.DependencyObject).
Declaration
protected override void OnVisualParentChanged(DependencyObject oldParent)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyObject | oldParent | The old parent element. May be null to indicate that the element did not have a visual parent previously. |
Events
CaptionChanged
Event that is raised when Caption property is changed.
Declaration
public event PropertyChangedCallback CaptionChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |
ContextColorChanged
Event that is raised when ContextColor property is changed.
Declaration
public event PropertyChangedCallback ContextColorChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |
TabButtonStyleChanged
Event that is raised when TabButtonStyle property is changed.
Declaration
public event PropertyChangedCallback TabButtonStyleChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |
TabButtonTemplateChanged
Event that is raised when TabButtonTemplate property is changed.
Declaration
public event PropertyChangedCallback TabButtonTemplateChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |
VisibilityChanged
Occurs when Visibility property is changed.
Declaration
public event PropertyChangedCallback VisibilityChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |