Sidebar 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
- Control
- Sidebar
Description
The Sidebar class represents a container that gives quick access to a System.Windows.FrameworkElement which is either user-defined or a predefined TextControl feature interface. It must be placed inside another UIElement, but can also be displayed as a dialog. A Sidebar is inherited from the System.Windows.Controls.Control class. 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.Controls.Control class see the .NET Framework reference.
Syntax
public class Sidebar : ControlPublic Class Sidebar
Inherits ControlExamples
The following example creates a Sidebar instance and configures its content layout setting for a document workflow.
TXTextControl.WPF.Sidebar sidebar = new();
sidebar.ContentLayout = TXTextControl.WPF.Sidebar.SidebarContentLayout.Custom;Dim sidebar As New TXTextControl.WPF.Sidebar()
sidebar.ContentLayout = TXTextControl.WPF.Sidebar.SidebarContentLayout.CustomMembers
Constructors
| Constructor | Description |
|---|---|
| Sidebar | Initializes a new instance of the Sidebar class. |
Properties
| Property | Description |
|---|---|
| Content | Gets or sets an object of type System.Windows.FrameworkElement that represents the content of the Sidebar. |
| ContentLayout | Determines 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. |
| DialogLocation | Gets 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 null. The default value is null. |
| DialogSize | Gets 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 null. The default value is null. |
| DialogStyle | Gets or sets the requested border and title bar layout of the sidebar dialog. The default value is SidebarDialogStyle.Standard. |
| IsPinned | Gets 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. |
| IsShown | Gets or sets a value indicating whether the Sidebar is shown. The default value is true. |
| IsSizable | Gets or sets a value indicating whether the Sidebar can be sized with the mouse. The default value is true. |
| ShowCloseButton | Gets or sets a value indicating whether the Sidebar's close button is shown. The default value is true. |
| ShowPinButton | Gets or sets a value indicating whether the Sidebar's pin button is shown. The default value is true. |
| ShowTitle | Gets or sets a value indicating whether the Sidebar's title is shown. The default value is true. |
| Text | Gets or sets the text that is displayed in the title bar of the Sidebar. |
| TextControl | Gets or sets the TextControl that is used for the predefined TextControl feature layouts. |
| TitleFontFamily | Gets or sets the font family of the title bar's text. The default value is the font family 'Calibri Light'. |
| TitleFontSize | Gets or sets the font size of the title bar's text. The default value is 24. |
| TitleForeground | Gets or sets the brush of the title bar's text. The default value is a System.Windows.Media.SolidColorBrush instance with the ARGB value (255, 43, 87, 154). |
Fields
| Field | Description |
|---|---|
| ContentLayoutProperty | Not described in the reference. public static readonly DependencyProperty ContentLayoutProperty; |
| ContentProperty | Not described in the reference. public static readonly DependencyProperty ContentProperty; |
| DialogLocationProperty | Not described in the reference. public static readonly DependencyProperty DialogLocationProperty; |
| DialogSizeProperty | Not described in the reference. public static readonly DependencyProperty DialogSizeProperty; |
| DialogStyleProperty | Not described in the reference. public static readonly DependencyProperty DialogStyleProperty; |
| IsPinnedProperty | Not described in the reference. public static readonly DependencyProperty IsPinnedProperty; |
| IsShownProperty | Not described in the reference. public static readonly DependencyProperty IsShownProperty; |
| IsSizableProperty | Not described in the reference. public static readonly DependencyProperty IsSizableProperty; |
| ShowCloseButtonProperty | Not described in the reference. public static readonly DependencyProperty ShowCloseButtonProperty; |
| ShowPinButtonProperty | Not described in the reference. public static readonly DependencyProperty ShowPinButtonProperty; |
| ShowTitleProperty | Not described in the reference. public static readonly DependencyProperty ShowTitleProperty; |
| TextControlProperty | Not described in the reference. public static readonly DependencyProperty TextControlProperty; |
| TextProperty | Not described in the reference. public static readonly DependencyProperty TextProperty; |
| TitleFontFamilyProperty | Not described in the reference. public static readonly DependencyProperty TitleFontFamilyProperty; |
| TitleFontSizeProperty | Not described in the reference. public static readonly DependencyProperty TitleFontSizeProperty; |
| TitleForegroundProperty | Not described in the reference. public static readonly DependencyProperty TitleForegroundProperty; |
Enumerations
| Enumeration | Description |
|---|---|
| AboutItem | Each 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 FrameworkElement.FindName method to get the item and manipulate it. |
| CommentsItem | Each 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 FrameworkElement.FindName method to get the item and manipulate it. |
| ConditionalInstructionsItem | Each 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 FrameworkElement.FindName method to get the item and manipulate it. |
| DocumentSettingsItem | Each DocumentSettingsItem represents an item in a predefined Document Settings control. The corresponding string of a DocumentSettingsItem is the same as the item's Name property. The DocumentSettingsItem enumeration can be used with the FrameworkElement.FindName method to get the item and manipulate it. |
| FieldNavigatorItem | Each 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 FrameworkElement.FindName method to get the item and manipulate it. |
| FindAndReplaceItem | Each 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 FrameworkElement.FindName method to get the item and manipulate it. |
| GotoItem | Each 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 FrameworkElement.FindName method to get the item and manipulate it. |
| SidebarContentLayout | Specifies the requested layout that has to be intialized and rendered as sidebar content. |
| SidebarDialogStyle | Specifies the requested border and title bar layout of the sidebar dialog. |
| StylesItem | Each 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 FrameworkElement.FindName method to get the item and manipulate it. |
| TrackedChangesItem | Each 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 FrameworkElement.FindName method to get the item and manipulate it. |