HeaderPane
Main
Hide
Share Link
Print

SftTaskDialogExpander Class

Represents the expander of a task dialog: text the user shows or hides with a button.

An expander without text is not shown.

Namespace: Softelvdm.SftStyleNET
Assembly: Softelvdm.SftStyleNET

Inheritance

Syntax

public sealed class SftTaskDialogExpander : Softelvdm.SftStyleNET.SftTaskDialogControl;
Public NotInheritable Class SftTaskDialogExpander
    Inherits Softelvdm.SftStyleNET.SftTaskDialogControl

Constructors

PublicSftTaskDialogExpanderInitializes a new instance of the SftTaskDialogExpander class.

Properties

PublicInherited from Softelvdm.SftStyleNET.SftTaskDialogControlBoundPageReturns the page the element belongs to while the page is shown.
PublicCollapsedButtonTextDefines the text of the button while the expander is collapsed.
PublicExpandedDefines whether the expander is expanded.
PublicExpandedButtonTextDefines the text of the button while the expander is expanded.
PublicPositionDefines where the expanded text appears.
PublicInherited from Softelvdm.SftStyleNET.SftTaskDialogControlTagDefines an object with data about the element.
PublicTextDefines the text shown when the expander is expanded.

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.
PublicStaticInherited from System.ObjectReferenceEqualsDetermines whether the specified Object instances are the same instance.
PublicToStringReturns the text of the expander.

Events

PublicExpandedChangedOccurs when the user expands or collapses the expander.

Examples

C# View entire sample code

        }

        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."));
            page.Buttons.Add(SftTaskDialogButton.Cancel);
            SftTaskDialogButton clicked = SftTaskDialog.ShowDialog(this, page);
            labelResult.Text = "Task dialog: " + (clicked == null ? "closed" : clicked.Text.Replace("&", "")) + (page.Verification.Checked ? ", do not ask again" : "");

VB.NET View entire sample code

    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)
        Dim clicked As SftTaskDialogButton = SftTaskDialog.ShowDialog(Me, page)
        Dim text As String = "closed"
        If clicked IsNot Nothing Then

See Also Classes | SftStyle/NET 3.0