> For the complete documentation index, see [llms.txt](https://docs.wisej.com/api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wisej.com/api/wisej.web/containers/form/wisej.web.closereason.md).

# CloseReason

Namespace: **Wisej.Web**

Assembly: **Wisej.Framework** (4.0.0.0)

Specifies the reason that a form was closed.

{% tabs %}
{% tab title="C#" %}

```csharp
public enum CloseReason : Enum
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Enum CloseReason As [Enum]
```

{% endtab %}
{% endtabs %}

## Fields

| Name                 | Description                                                                |
| -------------------- | -------------------------------------------------------------------------- |
| **ApplicationExit**  | The application is terminating.                                            |
| **FormOwnerClosing** | The owner control form is closing.                                         |
| **MdiFormClosing**   | The parent form of this multiple document interface (MDI) form is closing. |
| **None**             | The cause of the closure was not defined or could not be determined.       |
| **UserClosing**      | The user is closing the form through the user interface (UI).              |

## Used By

| Name                                                                                                             | Description                                                  |
| ---------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ |
| [Form.CloseReason](/api/wisej.web/containers/form.md#closereason)                                                | Returns the reason for the form closing.                     |
| [FormClosedEventArgs.CloseReason](/api/wisej.web/containers/form/wisej.web.formclosedeventargs.md#closereason)   | Returns a value that indicates why the form was closed.      |
| [FormClosingEventArgs.CloseReason](/api/wisej.web/containers/form/wisej.web.formclosingeventargs.md#closereason) | Returns a value that indicates why the form is being closed. |
| [IWisejWindow.Close](/api/wisej.core/interfaces/wisej.core.iwisejwindow.md#close-reason)                         | Closes the window.                                           |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wisej.com/api/wisej.web/containers/form/wisej.web.closereason.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
