# Sidebar.ShowCloseButton Property

> Gets or sets a value indicating whether the Sidebar's close button is shown. The default value is true.

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

---

### Description

Gets or sets a value indicating whether the Sidebar's close button is shown. The default value is `true`.

### Syntax

```csharp
public bool ShowCloseButton { get; set; }
```

```vbnet
Public Property ShowCloseButton As Boolean
```

### Examples

The following example uses `Sidebar.ShowCloseButton` to configure show close button as part of the sidebar workflow. The configured value is checked before the workflow continues.

```csharp
sidebar.ShowCloseButton = true;
if (sidebar.ShowCloseButton)
{
    Console.WriteLine("Sidebar: Show Close Button is enabled.");
}
```

```vbnet
sidebar.ShowCloseButton = True
If sidebar.ShowCloseButton Then
    Console.WriteLine("Sidebar: Show Close Button is enabled.")
End If
```

---

## Nearby

- **Previous:** [Sidebar.IsSizable Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/sidebar/issizable-property/llms-full.txt)
- **Next:** [Sidebar.ShowPinButton Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/sidebar/showpinbutton-property/llms-full.txt)
