# SpellCheckDialogClosingEventArgs.Cancel Property

> Gets or sets a value indicating whether the event is canceled or not.

- **Product:** TX Spell .NET for WPF
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 3.0
- **Namespace:** `TXTextControl.WPF.Proofing`
- **Package:** `TXTextControl.TXSpell.WPF.SDK` (assembly `TXSpell.WPF.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXSpell.WPF.dll` from the setup
- **Path:** TX Spell .NET for WPF > Reference > TXTextControl.WPF.Proofing > SpellCheckDialogClosingEventArgs.Cancel Property
- **400 words**
- **Web URL:** https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/spellcheckdialogclosingeventargs/cancel-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/spellcheckdialogclosingeventargs/cancel-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/spellcheckdialogclosingeventargs/cancel-property/llms-full.txt

---

### Description

Gets or sets a value indicating whether the [event](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/spellcheckdialogclosing-event/llms-full.txt) is canceled or not.

### Syntax

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

```vbnet
Public Property Cancel As Boolean
```

### Examples

The following example uses `SpellCheckDialogClosingEventArgs.Cancel` to configure cancel as part of the spell check dialog closing event args workflow. The configured value is checked before the workflow continues.

```csharp
spellCheckDialogClosingEventArgs.Cancel = true;
if (spellCheckDialogClosingEventArgs.Cancel)
{
    Console.WriteLine("Spell Check Dialog Closing Event Args: Cancel is enabled.");
}
```

```vbnet
spellCheckDialogClosingEventArgs.Cancel = True
If spellCheckDialogClosingEventArgs.Cancel Then
    Console.WriteLine("Spell Check Dialog Closing Event Args: Cancel is enabled.")
End If
```

---

## Nearby

- **Previous:** [SpellCheckDialogClosingEventArgs Class](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/spellcheckdialogclosingeventargs/llms-full.txt)
- **Next:** [SpellCheckDialogClosingEventArgs.StateManager Property](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/spellcheckdialogclosingeventargs/statemanager-property/llms-full.txt)
