HeaderPane
Main
Hide
Share Link
Print

Heading Property, SftTaskDialogPage Class

Defines the main instruction, shown in a larger font above the text.

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

Syntax

public string Heading { get; set; }
Public Property Heading As String

Value

The heading, or null for none. The dialog follows a change while the page is shown.

Comments

Defines the main instruction, shown in a larger font above the text.

Examples

C# View entire sample code

            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."),
            };
            page.Buttons.Add(new SftTaskDialogCommandLinkButton("&Save the orders", "They are saved as drafts and can be completed later."));
            page.Buttons.Add(new SftTaskDialogCommandLinkButton("D&iscard the orders", "The changes are lost."));

VB.NET View entire sample code

        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."))
        page.Buttons.Add(New SftTaskDialogCommandLinkButton("D&iscard the orders", "The changes are lost."))
        page.Buttons.Add(SftTaskDialogButton.Cancel)

See Also SftTaskDialogPage Class | Classes | SftStyle/NET 3.0