# FormattingStyleCollection.Remove Method

> Removes a formatting style from a Text Control document.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 10.1
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WPF.SDK` (assembly `TXTextControl.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.dll` from the setup
- **Path:** TX Text Control .NET for WPF > Reference > TXTextControl > FormattingStyleCollection.Remove Method
- **393 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/formattingstylecollection/remove-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/formattingstylecollection/remove-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/formattingstylecollection/remove-method/llms-full.txt

---

### Description

Removes a formatting style from a Text Control document.

### Syntax

```csharp
public bool Remove(string styleName);
```

```vbnet
Public Function Remove(styleName As String) As Boolean
```

### Parameters

| Parameter | Description |
|---|---|
| styleName | Specifies the name of the style to remove. |

### Return Value

The return value is true, if the style could be removed. Otherwise it is false.

### Examples

The following example removes an item from the formatting style collection.

```csharp
if (formattingStyleCollection.Remove("CustomerName"))
{
    Console.WriteLine("Remove completed successfully.");
}
```

```vbnet
If formattingStyleCollection.Remove("CustomerName") Then
    Console.WriteLine("Remove completed successfully.")
End If
```

---

## Nearby

- **Previous:** [FormattingStyleCollection.IsSynchronized Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/formattingstylecollection/issynchronized-property/llms-full.txt)
- **Next:** [FormattingStyleCollection.SyncRoot Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/formattingstylecollection/syncroot-property/llms-full.txt)
