TX Text Control .NET for WPF

ContentLayout Property

Property|Introduced in 26.0
Namespace
TXTextControl.WPF
Package
TXTextControl.TextControl.WPF.SDK as TXTextControl.WPF.dll from the private NuGet feed or Text Control Offline Packages

Description

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.

Syntax

public Sidebar.SidebarContentLayout ContentLayout { get; set; }

Examples

The following example uses Sidebar.ContentLayout to configure content layout as part of the sidebar workflow. The configured value is checked before the workflow continues.

sidebar.ContentLayout = TXTextControl.WPF.Sidebar.SidebarContentLayout.Custom;
Console.WriteLine($"Content Layout used by Sidebar: {sidebar.ContentLayout}");

Remarks

The SidebarContentLayout.Goto, SidebarContentLayout.Find, SidebarContentLayout.Replace, SidebarContentLayout.ConditionalInstructions, SidebarContentLayout.DocumentSettings and SidebarContentLayout.FieldNavigator layouts differ due to the dock style setting. If the Sidebar.HorizontalAlignment property is set to HorizontalAlignment.Left or HorizontalAlignment.Right in combination with VerticalAlignment.Stretch or VerticalAlignment.Center, a vertical alignment layout is shown. VerticalAlignment.Top or VerticalAlignment.Botton in combination with HorizontalAlignment.Stretch or HorizontalAlignment.Center aligns the layout horizontally. All other combinations result in displaying the sidebar's content in dialog style.