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
public class SftTaskDialogPage;
Public Class SftTaskDialogPage
![]() | SftTaskDialogPage | Initializes a new instance of the SftTaskDialogPage class. |
![]() | AllowCancel | Defines whether the dialog can be closed with Esc or the close box although the page has no Cancel button. |
![]() | AllowMinimize | Defines whether the dialog can be minimized. |
![]() | BoundDialog | Returns the dialog that shows the page. |
![]() | Buttons | Defines the buttons and command links of the page. |
![]() | Caption | Defines the text of the dialog's title bar. |
![]() | DefaultButton | Defines the button that is the default button when the page appears. |
![]() | EnableLinks | Defines whether links in the text, the expanded text and the footnote can be clicked. |
![]() | Expander | Defines the expander. |
![]() | Footnote | Defines the footnote shown below the buttons. |
![]() | Heading | Defines the main instruction, shown in a larger font above the text. |
![]() | Icon | Defines the icon shown beside the heading. |
![]() | ProgressBar | Defines the progress bar. |
![]() | RadioButtons | Defines the radio buttons of the page. |
![]() | RightToLeftLayout | Defines whether the dialog is laid out from right to left. |
![]() | SizeToContent | Defines whether the dialog widens for its heading and text. |
![]() | Text | Defines the text of the dialog. |
![]() | Verification | Defines the verification check box shown at the left of the buttons. |
![]() ![]() | Equals | Determines whether the specified object is equal to the current object. |
![]() ![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. |
![]() ![]() | GetHashCode | Serves as the default hash function. |
![]() ![]() | GetType | Gets the Type of the current instance. |
![]() ![]() | MemberwiseClone | Creates a shallow copy of the current Object. |
![]() | Navigate | Replaces this page with another page in the dialog that shows this page. |
![]() ![]() ![]() | ReferenceEquals | Determines whether the specified Object instances are the same instance. |
![]() ![]() | ToString | Returns a string that represents the current object. |
![]() | Created | Occurs when the page appears in the dialog. |
![]() | Destroyed | Occurs when the page leaves the dialog, because the dialog closes or another page replaces it. |
![]() | HelpRequest | Occurs when the user asks for help with F1 or the Help button. |
![]() | LinkClicked | Occurs when the user clicks a link. |
// 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."),
};
' 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