# SpellCheckDialogClosingEventArgs.Cancel Property

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

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

---

### Description

Gets or sets a value indicating whether the [event](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-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-winforms/reference/txtextcontrol-proofing/spellcheckdialogclosingeventargs/llms-full.txt)
- **Next:** [SpellCheckDialogClosingEventArgs.CloseReason Property](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/spellcheckdialogclosingeventargs/closereason-property/llms-full.txt)
