TX Text Control .NET for Windows Forms

Sidebar Class

Class|Introduced in 26.0
Namespace
TXTextControl.Windows.Forms
Package
TXTextControl.TextControl.WinForms.SDK from the private NuGet feed or Text Control Offline Packages
Assembly
TXTextControl.Windows.Forms.dll
Install
dotnet add package TXTextControl.TextControl.WinForms.SDK .NET 8 and later. For .NET Framework, reference TXTextControl.Windows.Forms.dll from the setup.
Inherits
  1. TableLayoutPanel
  2. Sidebar
Implements
INotifyPropertyChanged

Description

The Sidebar class represents a container that gives quick access to a control which is either user-defined or a predefined TextControl feature interface. It must be placed into another control, but can also be displayed as a dialog. A Sidebar is inherited from the System.Windows.Forms.TableLayoutPanel class and implements the System.ComponentModel.INotifyPropertyChanged interface. The following describes only the properties, methods and events defined through the Sidebar class. For a list of properties, methods and events inherited from the System.Windows.Forms.TableLayoutPanel class and the System.ComponentModel.INotifyPropertyChanged interface see the .NET Framework reference.

Syntax

public class Sidebar : TableLayoutPanel, INotifyPropertyChanged

Examples

The following example creates a Sidebar instance and configures its text setting for a document workflow.

using TXTextControl.Windows.Forms.Sidebar sidebar = new();
sidebar.Text = "Quarterly results";

Members

Constructors

ConstructorDescription
SidebarInitializes a new instance of the Sidebar class.

Properties

PropertyDescription
ContentGets or sets an object of type System.Windows.Forms.Control that represents the content of the Sidebar.
ContentLayoutDetermines the content layout that has to be intialized and rendered for the Sidebar. Beside the predefined TextControl feature layouts SidebarContentLayout.FieldNavigator, SidebarContentLayout.Find, SidebarContentLayout.Goto, SidebarContentLayout.Replace, SidebarContentLayout.Styles, SidebarContentLayout.TrackedChanges, SidebarContentLayout.ConditionalInstructions, SidebarContentLayout.DocumentSettings, SidebarContentLayout.Comments and SidebarContentLayout.About, the user can choose SidebarContentLayout.Custom to place a custom control as content. To disable setting any content for this Sidebar, set the property to SidebarContentLayout.None. The default value is SidebarContentLayout.None.
DialogLocationGets or sets the location of the dialog where the Sidebar is placed, if the Sidebar.IsPinned property is set to false. To place the dialog into the center of the top most control, the property value must be set to System.Drawing.Point.Empty. The default value is System.Drawing.Point.Empty.
DialogSizeGets or sets the size of the dialog where the Sidebar is placed, if the Sidebar.IsPinned property is set to false. To resize the dialog according to its content, the property value must be set to System.Drawing.Size.Empty. The default value is System.Drawing.Size.Empty.
DialogStyleGets or sets the requested border and title bar layout of the sidebar dialog. The default value is SidebarDialogStyle.Standard.
IsPinnedGets or sets a value indicating whether the Sidebar is rendered inside another control (property value is set to true) or displayed as dialog. The default value is true.
IsShownGets or sets a value indicating whether the Sidebar is shown. The default value is true.
IsSizableGets or sets a value indicating whether the Sidebar can be sized with the mouse. The default value is true.
ShowCloseButtonGets or sets a value indicating whether the Sidebar's close button is shown. The default value is true.
ShowPinButtonGets or sets a value indicating whether the Sidebar's pin button is shown. The default value is true.
ShowTitleGets or sets a value indicating whether the Sidebar's title is shown. The default value is true.
TextOverridden. Gets or sets the text that is displayed in the title bar of the Sidebar.
TextControlGets or sets the TextControl that is used for the predefined TextControl feature layouts.
TitleFontGets or sets the font of the title bar's text. The default value is the font type 'Calibri Light' with a size of 18.
TitleForeColorGets or sets the color of the title bar's text. The default value is the ARGB value (255, 43, 87, 154).

Methods

MethodDescription
FindItemFinds a control inside a predefined content control that has the provided identifier name.

Events

EventDescription
PropertyChangedNot described in the reference. public event PropertyChangedEventHandler PropertyChanged;

Enumerations

EnumerationDescription
AboutItemEach AboutItem represents an item in a predefined About control. The corresponding string of a AboutItem is the same as the item's Name property. The AboutItem enumeration can be used with the Sidebar.FindItem method to get the item and manipulate it.
CommentsItemEach CommentsItem represents an item in a predefined Comments control. The corresponding string of a CommentsItem is the same as the item's Name property. The CommentsItem enumeration can be used with the Sidebar.FindItem method to get the item and manipulate it.
ConditionalInstructionsItemEach ConditionalInstructionsItem represents an item in a predefined ConditionalInstructions control. The corresponding string of a ConditionalInstructionsItem is the same as the item's Name property. The ConditionalInstructionsItem enumeration can be used with the Sidebar.FindItem method to get the item and manipulate it.
DocumentSettingsItemEach DocumentSettingsItem represents an item in a predefined DocumentSettings control. The corresponding string of a DocumentSettingsItem is the same as the item's Name property. The DocumentSettingsItem enumeration can be used with the Sidebar.FindItem method to get the item and manipulate it.
FieldNavigatorItemEach FieldNavigatorItem represents an item in a predefined FieldNavigator control. The corresponding string of a FieldNavigatorItem is the same as the item's Name property. The FieldNavigatorItem enumeration can be used with the Sidebar.FindItem method to get the item and manipulate it.
FindAndReplaceItemEach FieldNavigatorItem represents an item in a predefined Find or Replace control. The corresponding string of a FindAndReplaceItem is the same as the item's Name property. The FindAndReplaceItem enumeration can be used with the Sidebar.FindItem method to get the item and manipulate it.
GotoItemEach GotoItem represents an item in a predefined Goto control. The corresponding string of a GotoItem is the same as the item's Name property. The GotoItem enumeration can be used with the Sidebar.FindItem method to get the item and manipulate it.
SidebarContentLayoutSpecifies the requested layout that has to be intialized and rendered as sidebar content.
SidebarDialogStyleSpecifies the requested border and title bar layout of the sidebar dialog.
StylesItemEach StylesItem represents an item in a predefined Styles control. The corresponding string of a StylesItem is the same as the item's Name property. The StylesItem enumeration can be used with the Sidebar.FindItem method to get the item and manipulate it.
TrackedChangesItemEach TrackedChangesItem represents an item in a predefined TrackedChanges control. The corresponding string of a TrackedChangesItem is the same as the item's Name property. The TrackedChangesItem enumeration can be used with the Sidebar.FindItem method to get the item and manipulate it.

Further Reading