# Sidebar.ContentLayout Property

> 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.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 26.0
- **Namespace:** `TXTextControl.WPF`
- **Package:** `TXTextControl.TextControl.WPF.SDK` (assembly `TXTextControl.WPF.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.WPF.dll` from the setup
- **Path:** TX Text Control .NET for WPF > Reference > TXTextControl.WPF > Sidebar.ContentLayout Property
- **709 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/sidebar/contentlayout-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/sidebar/contentlayout-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/sidebar/contentlayout-property/llms-full.txt

---

### Description

Determines the [content](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/sidebar/content-property/llms-full.txt) [layout](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/sidebar/sidebarcontentlayout-enumeration/llms-full.txt) 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

```csharp
public Sidebar.SidebarContentLayout ContentLayout { get; set; }
```

```vbnet
Public Property ContentLayout As Sidebar.SidebarContentLayout
```

### 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.

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

```vbnet
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.

---

## Nearby

- **Previous:** [Sidebar.Content Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/sidebar/content-property/llms-full.txt)
- **Next:** [Sidebar.DialogLocation Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/sidebar/dialoglocation-property/llms-full.txt)
