# Sidebar.DialogSize Property

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

- **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.DialogSize Property
- **471 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/sidebar/dialogsize-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/sidebar/dialogsize-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/sidebar/dialogsize-property/llms-full.txt

---

### Description

Gets or sets the size of the dialog where the Sidebar is placed, if the [Sidebar.IsPinned](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/sidebar/ispinned-property/llms-full.txt) 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`.

### Syntax

```csharp
public Size? DialogSize { get; set; }
```

```vbnet
Public Property DialogSize As Size?
```

### Examples

The following example uses `Sidebar.DialogSize` to configure dialog size as part of the sidebar workflow. The configured value is checked before the workflow continues.

```csharp
sidebar.DialogSize = new System.Windows.Size(600, 400);
if (sidebar.DialogSize != null)
{
    Console.WriteLine("Sidebar: Dialog Size is available.");
}
```

```vbnet
sidebar.DialogSize = New System.Windows.Size(600, 400)
If sidebar.DialogSize IsNot Nothing Then
    Console.WriteLine("Sidebar: Dialog Size is available.")
End If
```

---

## Nearby

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