RibbonFormattingTab Class
- Namespace
TXTextControl.WPF
- Package
TXTextControl.from the private NuGet feed or Text Control Offline PackagesTextControl. WPF. SDK
- Assembly
TXTextControl.WPF. dll
- Install
dotnet add package TXTextControl..NET 8 and later. For .NET Framework, referenceTextControl. WPF. SDK TXTextControl.from the setup.WPF. dll
- Inherits
- Ribbon
Tab - Ribbon
Formatting Tab
- Ribbon
- Implements
- IComponent
Connector
Description
The WPF.RibbonFormattingTab class represents a ribbon tab for setting font and paragraph attributes, formatting styles and for handling the clipboard. It is inherited from the System.Windows.Controls.Ribbon.RibbonTab class and must be hosted in a System.Windows.Controls.Ribbon.Ribbon object. It can be connected with a WPF.TextControl through the WPF.TextControl.RibbonFormattingTab property. Each item has a name, available through its Name property, which corresponds with a member of the WPF.RibbonFormattingTab.RibbonItem enumeration. The FrameworkElement.FindName method can be used to get a certain item and manipulate, move or delete it.
Syntax
public class RibbonFormattingTab : System.Windows.Controls.Ribbon.RibbonTab, IComponentConnectorPublic Class RibbonFormattingTab
Inherits System.Windows.Controls.Ribbon.RibbonTab
Implements IComponentConnectorExamples
The RibbonFormattingTab can be configured. The following example removes the Bold button from a RibbonFormattingTab and inserts a simple button instead:
FrameworkElement boldButton = ribbonFormattingTab1.FindName(RibbonFormattingTab.RibbonItem.TXITEM_Bold.ToString()) as FrameworkElement;
ItemsControl ic = boldButton.Parent as ItemsControl;
if (ic != null)
{
ic.Items.Remove(boldButton);
RibbonButton ribbonButton = new RibbonButton();
ribbonButton.Label = "New Button";
ic.Items.Insert(0, ribbonButton);
}Dim boldButton As FrameworkElement = TryCast(ribbonFormattingTab1.FindName(RibbonFormattingTab.RibbonItem.TXITEM_Bold.ToString()), FrameworkElement)
Dim ic As ItemsControl = TryCast(boldButton.Parent, ItemsControl)
If ic IsNot Nothing Then
ic.Items.Remove(boldButton)
Dim ribbonButton As New RibbonButton()
ribbonButton.Label = "New Button"
ic.Items.Insert(0, ribbonButton)
End IfThe following example creates a Ribbon Formatting Tab instance and configures its find horizontal sidebar setting for a document workflow.
TXTextControl.WPF.RibbonFormattingTab ribbonFormattingTab = new();
ribbonFormattingTab.FindHorizontalSidebar = "Quarterly report";Dim ribbonFormattingTab As New TXTextControl.WPF.RibbonFormattingTab()
ribbonFormattingTab.FindHorizontalSidebar = "Quarterly report"Members
Constructors
| Constructor | Description |
|---|---|
| RibbonFormattingTab | Not described in the reference. public RibbonFormattingTab(); |
Properties
| Property | Description |
|---|---|
| FindHorizontalSidebar | Specifies the name of the horizontal sidebar that is connected to the RibbonFormattingTab's TXITEM_Find button. The property value is String.Empty, if there is no sidebar connected. |
| FindSidebar | Specifies the name of the vertical sidebar that is connected to the RibbonFormattingTab's TXITEM_Find button. The property value is String.Empty, if there is no sidebar connected. |
| GotoHorizontalSidebar | Specifies the name of the horizontal sidebar that is connected to the RibbonFormattingTab's TXITEM_Goto button. The property value is String.Empty, if there is no sidebar connected. |
| GotoSidebar | Specifies the name of the vertical sidebar that is connected to the RibbonFormattingTab's TXITEM_Goto button. The property value is String.Empty, if there is no sidebar connected. |
| ReplaceHorizontalSidebar | Specifies the name of the horizontal sidebar that is connected to the RibbonFormattingTab's TXITEM_Replace button. The property value is String.Empty, if there is no sidebar connected. |
| ReplaceSidebar | Specifies the name of the vertical sidebar that is connected to the RibbonFormattingTab's TXITEM_Replace button. The property value is String.Empty, if there is no sidebar connected. |
| StylesSidebar | Specifies the name of the sidebar that is connected to the RibbonFormattingTab's TXITEM_StyleName's Change Styles drop down item. The property value is String.Empty, if there is no sidebar connected. |
Methods
| Method | Description |
|---|---|
| InitializeComponent | Not described in the reference. public void InitializeComponent(); |
Fields
| Field | Description |
|---|---|
| FindHorizontalSidebarProperty | Not described in the reference. public static readonly DependencyProperty FindHorizontalSidebarProperty; |
| FindSidebarProperty | Not described in the reference. public static readonly DependencyProperty FindSidebarProperty; |
| GotoHorizontalSidebarProperty | Not described in the reference. public static readonly DependencyProperty GotoHorizontalSidebarProperty; |
| GotoSidebarProperty | Not described in the reference. public static readonly DependencyProperty GotoSidebarProperty; |
| ReplaceHorizontalSidebarProperty | Not described in the reference. public static readonly DependencyProperty ReplaceHorizontalSidebarProperty; |
| ReplaceSidebarProperty | Not described in the reference. public static readonly DependencyProperty ReplaceSidebarProperty; |
| StylesSidebarProperty | Not described in the reference. public static readonly DependencyProperty StylesSidebarProperty; |
Enumerations
| Enumeration | Description |
|---|---|
| RibbonDropDownItem | Each RibbonDropDownItem represents a drop-down item in the RibbonFormattingTab. The corresponding string of a RibbonDropDownItem is the same as the item's Name property. The RibbonDropDownItem enumeration can be used with the ResourceProvider class that provides static methods to receive bitmaps or strings which are associated with the corresponding ribbon drop-down item. |
| RibbonItem | Each RibbonItem represents an item in the RibbonFormattingTab that is not a drop-down item. The corresponding string of a RibbonItem is the same as the item's Name property. The RibbonItem enumeration can be used with the RibbonFormattingTab's FrameworkElement.FindName method to get an item and manipulate it or with the ResourceProvider class that provides static methods to receive bitmaps or strings which are associated with the corresponding ribbon item. |