HeaderPane
Main
Hide
Share Link
Print

Destroyed Event, SftTaskDialogPage Class

Occurs when the page leaves the dialog, because the dialog closes or another page replaces it.

Class: SftTaskDialogPage
Namespace: Softelvdm.SftStyleNET
Assembly: Softelvdm.SftStyleNET

Syntax

public event EventHandler Destroyed;
Public Event Destroyed As EventHandler

Comments

Occurs when the page leaves the dialog, because the dialog closes or another page replaces it.

Examples

C# View entire sample code

            page.RadioButtons.Add("&PDF document");
            SftTaskDialogButton apply = new SftTaskDialogButton("&Apply") { AllowCloseDialog = false };
            page.Buttons.Add(apply);
            page.Buttons.Add(SftTaskDialogButton.OK);
            page.Buttons.Add(SftTaskDialogButton.Cancel);
            page.Buttons.Add(SftTaskDialogButton.Help);

            page.Created += (s, a) => DumpValues("page.Created", a);
            page.Destroyed += (s, a) => DumpValues("page.Destroyed", a);
            page.HelpRequest += (s, a) => DumpValues("page.HelpRequest", a);
            page.LinkClicked += (s, a) => DumpValues("page.LinkClicked", a);
            apply.Click += (s, a) => DumpValues("Apply.Click (the dialog stays open)", a);
            foreach (SftTaskDialogRadioButton radio in page.RadioButtons) {
                SftTaskDialogRadioButton r = radio;
                r.CheckedChanged += (s, a) => DumpValues("RadioButton.CheckedChanged (" + r.Text.Replace("&", "") + (r.Checked ? ", checked" : "") + ")", a);
            }

VB.NET View entire sample code

        Dim apply As New SftTaskDialogButton("&Apply")
        apply.AllowCloseDialog = False
        page.Buttons.Add(apply)
        page.Buttons.Add(SftTaskDialogButton.OK)
        page.Buttons.Add(SftTaskDialogButton.Cancel)
        page.Buttons.Add(SftTaskDialogButton.Help)

        AddHandler page.Created, Sub(s, a) DumpValues("page.Created", a)
        AddHandler page.Destroyed, Sub(s, a) DumpValues("page.Destroyed", a)
        AddHandler page.HelpRequest, Sub(s, a) DumpValues("page.HelpRequest", a)
        AddHandler page.LinkClicked, Sub(s, a) DumpValues("page.LinkClicked", a)
        AddHandler apply.Click, Sub(s, a) DumpValues("Apply.Click (the dialog stays open)", a)
        For Each radio As SftTaskDialogRadioButton In page.RadioButtons
            Dim r As SftTaskDialogRadioButton = radio
            AddHandler r.CheckedChanged, Sub(s, a) DumpValues("RadioButton.CheckedChanged (" + r.Text.Replace("&", "") + If(r.Checked, ", checked", "") + ")", a)
        Next

See Also SftTaskDialogPage Class | Classes | SftStyle/NET 3.0