> For the complete documentation index, see [llms.txt](https://tldocs.gitbook.io/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tldocs.gitbook.io/documentation/framework/controls/wizard.md).

# Wizard

Activating the navigation events (switch page, pressing the button Finish or Cancel):

```csharp
public override void Opened()
{
    base.Opened();
    
    wiz.WizardSelectionChanged += wiz_WizardSelectionChanged;
    wiz.WizardFinished += wiz_WizardFinished;
    wiz.WizardCanceled += wiz_WizardCanceled;
    wizSessionSelect.LeaveCurrentPage += wizSessionSelect_LeaveCurrentPage;
    
    //....
}
```

```csharp
private void wiz_WizardCanceled(object sender, DataEventArgs<object> e)
{
    BusObj.Reset();
    if (wiz.SelectedItem == wizSessionSelect)
    {
        this.Close();
    }
    
    //....
}
```

```csharp
private void wizSessionSelect_LeaveCurrentPage(object sender, DataEventArgs<object> e)
{
    BusObj.InitInventur(lginventur_id.SelectedValue.ToStringNN(), lginv_zaehlg_nr.SelectedValue.ToInt(0));
}
```

Switching pages programmatically:

```csharp
if (wiz.SelectedItem == wizGebindeEdit)
{
    this.InitArtikelEdit();
    wizGebindeEdit.IsFinishVisible = true;

    //button is valid and IsBackValid = true, but previous pages are disabled when moving to page3 (internal flag)
    //so we need to change it to false and then back to true (the change has to be detected)
    //wizGebindeEdit.IsBackValid = true;
    wizGebindeEdit.IsBackValid = false;
    wizGebindeEdit2.IsCurrentValid = true;
}
```

Activating Finish button in another page than the last one:

```csharp
//Atm the finish button is not related to a page, but to the wizard control!
wizGebindeEdit.IsFinishVisible = true;
```


---

# 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://tldocs.gitbook.io/documentation/framework/controls/wizard.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.
