HeaderPane
Main
Hide
Share Link
Print

SftTaskDialogPage Class

Represents the contents of a task dialog: its texts, icon, buttons, command links, radio buttons, verification check box, expander, footnote and progress bar.

A page is shown with SftTaskDialog.ShowDialog. While it is shown, its texts and icon and some properties of its elements can be changed and the dialog follows at once; the other properties throw an InvalidOperationException then, as their descriptions say. Navigate replaces the page with another page in the same dialog.

Namespace: Softelvdm.SftStyleNET
Assembly: Softelvdm.SftStyleNET

Inheritance

Syntax

public class SftTaskDialogPage;
Public Class SftTaskDialogPage

Constructors

PublicSftTaskDialogPageInitializes a new instance of the SftTaskDialogPage class.

Properties

PublicAllowCancelDefines whether the dialog can be closed with Esc or the close box although the page has no Cancel button.
PublicAllowMinimizeDefines whether the dialog can be minimized.
PublicBoundDialogReturns the dialog that shows the page.
PublicButtonsDefines the buttons and command links of the page.
PublicCaptionDefines the text of the dialog's title bar.
PublicDefaultButtonDefines the button that is the default button when the page appears.
PublicEnableLinksDefines whether links in the text, the expanded text and the footnote can be clicked.
PublicExpanderDefines the expander.
PublicFootnoteDefines the footnote shown below the buttons.
PublicHeadingDefines the main instruction, shown in a larger font above the text.
PublicIconDefines the icon shown beside the heading.
PublicProgressBarDefines the progress bar.
PublicRadioButtonsDefines the radio buttons of the page.
PublicRightToLeftLayoutDefines whether the dialog is laid out from right to left.
PublicSizeToContentDefines whether the dialog widens for its heading and text.
PublicTextDefines the text of the dialog.
PublicVerificationDefines the verification check box shown at the left of the buttons.

Methods

PublicInherited from System.ObjectEqualsDetermines whether the specified object is equal to the current object.
ProtectedInherited from System.ObjectFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
PublicInherited from System.ObjectGetHashCodeServes as the default hash function.
PublicInherited from System.ObjectGetTypeGets the Type of the current instance.
ProtectedInherited from System.ObjectMemberwiseCloneCreates a shallow copy of the current Object.
PublicNavigateReplaces this page with another page in the dialog that shows this page.
PublicStaticInherited from System.ObjectReferenceEqualsDetermines whether the specified Object instances are the same instance.
PublicInherited from System.ObjectToStringReturns a string that represents the current object.

Events

PublicCreatedOccurs when the page appears in the dialog.
PublicDestroyedOccurs when the page leaves the dialog, because the dialog closes or another page replaces it.
PublicHelpRequestOccurs when the user asks for help with F1 or the Help button.
PublicLinkClickedOccurs when the user clicks a link.

Examples

C# View entire sample code

        // SftMessageBox takes the arguments of MessageBox.Show and returns the same results.
        private void buttonMessageBox_Click(object sender, EventArgs e) {
            DialogResult result = SftMessageBox.Show(this, "Do you want to save the changes to Order 1042 before closing?", "Orders",
                MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
            labelResult.Text = "Message box: " + result;
        }

        private void buttonTaskDialog_Click(object sender, EventArgs e) {
            SftTaskDialogPage page = new SftTaskDialogPage {
                Caption = "Unsaved orders",
                Heading = "What do you want to do with the 3 unsaved orders?",
                Icon = SftTaskDialogIcon.Warning,
                Verification = new SftTaskDialogVerificationCheckBox("&Do not ask again"),
                Expander = new SftTaskDialogExpander("Order 1042, Order 1044 and Order 1045 have changes that are not saved."),
                Footnote = new SftTaskDialogFootnote("Drafts are kept for 30 days."),
            };

VB.NET View entire sample code

    ' SftMessageBox takes the arguments of MessageBox.Show and returns the same results.
    Private Sub ButtonMessageBox_Click(ByVal sender As Object, ByVal e As EventArgs) Handles ButtonMessageBox.Click
        Dim result As DialogResult = SftMessageBox.Show(Me, "Do you want to save the changes to Order 1042 before closing?", "Orders",
            MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question)
        LabelResult.Text = "Message box: " + result.ToString()
    End Sub

    Private Sub ButtonTaskDialog_Click(ByVal sender As Object, ByVal e As EventArgs) Handles ButtonTaskDialog.Click
        Dim page As New SftTaskDialogPage()
        page.Caption = "Unsaved orders"
        page.Heading = "What do you want to do with the 3 unsaved orders?"
        page.Icon = SftTaskDialogIcon.Warning
        page.Verification = New SftTaskDialogVerificationCheckBox("&Do not ask again")
        page.Expander = New SftTaskDialogExpander("Order 1042, Order 1044 and Order 1045 have changes that are not saved.")
        page.Footnote = New SftTaskDialogFootnote("Drafts are kept for 30 days.")
        page.Buttons.Add(New SftTaskDialogCommandLinkButton("&Save the orders", "They are saved as drafts and can be completed later."))

See Also Classes | SftStyle/NET 3.0