Represents a button of a task dialog.
The static properties return new instances of the standard buttons, whose text comes in the language of Windows. A standard button is equal to any other instance of the same standard button, with the == and != operators as with Equals, so the result of SftTaskDialog.ShowDialog can be compared with SftTaskDialogButton.Cancel. A custom button is equal only to itself. The standard buttons appear in the order of the Windows task dialog, after the custom buttons.
Namespace: Softelvdm.SftStyleNET
Assembly: Softelvdm.SftStyleNET
Inheritance
public class SftTaskDialogButton : Softelvdm.SftStyleNET.SftTaskDialogControl;
Public Class SftTaskDialogButton
Inherits Softelvdm.SftStyleNET.SftTaskDialogControl![]() | SftTaskDialogButton | Initializes a new instance of the SftTaskDialogButton class. |
![]() ![]() | Abort | Returns a new Abort button. |
![]() | AllowCloseDialog | Defines whether clicking the button closes the dialog. |
![]() ![]() | BoundPage | Returns the page the element belongs to while the page is shown. |
![]() ![]() | Cancel | Returns a new Cancel button. |
![]() ![]() | Close | Returns a new Close button. |
![]() ![]() | Continue | Returns a new Continue button. |
![]() | Enabled | Defines whether the button can be clicked. |
![]() ![]() | Help | Returns a new Help button, which raises the SftTaskDialogPage.HelpRequest event of the page and does not close the dialog. |
![]() ![]() | Ignore | Returns a new Ignore button. |
![]() ![]() | No | Returns a new No button. |
![]() ![]() | OK | Returns a new OK button. |
![]() ![]() | Retry | Returns a new Retry button. |
![]() | ShowShieldIcon | Defines whether the button shows the shield icon, which tells the user that the action needs elevated rights. |
![]() ![]() | Tag | Defines an object with data about the element. |
![]() | Text | Defines the text of the button. |
![]() ![]() | TryAgain | Returns a new Try Again button. |
![]() | Visible | Defines whether the button is shown. |
![]() ![]() | Yes | Returns a new Yes button. |
![]() | Equals | Returns whether the object is the same button, or the same standard button. |
![]() ![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. |
![]() | GetHashCode | Returns a hash code for the button. |
![]() ![]() | GetType | Gets the Type of the current instance. |
![]() ![]() | MemberwiseClone | Creates a shallow copy of the current Object. |
![]() | PerformClick | Clicks the button, as the user would, while its page is shown. |
![]() ![]() ![]() | ReferenceEquals | Determines whether the specified Object instances are the same instance. |
![]() | ToString | Returns the text of the button. |
![]() | Click | Occurs when the button is clicked. |
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" : "");
}
private void buttonColorDialog_Click(object sender, EventArgs e) {
sftColorDialog1.Color = panelColor.BackColor;
if (sftColorDialog1.ShowDialog(this) == DialogResult.OK) {
panelColor.BackColor = sftColorDialog1.Color;
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
text = clicked.Text.Replace("&", "")
End If
If page.Verification.Checked Then
text += ", do not ask again"
End IfSee Also Classes | SftStyle/NET 3.0