Uredi

Deli z drugimi prek


TaskDialogButton Class

Definition

Represents a button control of a task dialog.

public ref class TaskDialogButton : System::Windows::Forms::TaskDialogControl
public class TaskDialogButton : System.Windows.Forms.TaskDialogControl
type TaskDialogButton = class
    inherit TaskDialogControl
Public Class TaskDialogButton
Inherits TaskDialogControl
Inheritance
TaskDialogButton
Derived

Remarks

A button can either be a standard button (whose text is provided by the OS), or a custom button (or command link) where you can provide your own text.

TaskDialogButton instances retrieved by static getters like OK are standard buttons. Their Text property cannot be set as the OS will provide the localized text for the buttons when showing them in the dialog.

Button instances created with one of the constructors are custom buttons, which allow you to provide your own text as button label.

Note

It's not possible to show both custom buttons and command links (TaskDialogCommandLinkButton instances) at the same time - it's only one or the other. In either case, you can combine them with standard buttons.

Constructors

TaskDialogButton()

Initializes a new instance of the TaskDialogButton class.

TaskDialogButton(String, Boolean, Boolean)

Initializes a new instance of the TaskDialogButton class using the given text and, optionally, a description text.

Properties

Abort

Gets a standard TaskDialogButton instance representing the Abort button.

AllowCloseDialog

Gets or sets a value that indicates whether the task dialog should close when this button is clicked. Or, if this button is the Help button, indicates whether the HelpRequest should be raised.

BoundPage

Gets the TaskDialogPage instance which this control is currently bound to.

(Inherited from TaskDialogControl)
Cancel

Gets a standard TaskDialogButton instance representing the Cancel button.

Close

Gets a standard TaskDialogButton instance representing the Close button.

Continue

Gets a standard TaskDialogButton instance representing the Continue button.

Enabled

Gets or sets a value indicating whether the button can respond to user interaction.

Help

Gets a standard TaskDialogButton instance representing the Help button.

Ignore

Gets a standard TaskDialogButton instance representing the Ignore button.

No

Gets a standard TaskDialogButton instance representing the No button.

OK

Gets a standard TaskDialogButton instance representing the OK button.

Retry

Gets a standard TaskDialogButton instance representing the Retry button.

ShowShieldIcon

Gets or sets a value that indicates if the User Account Control (UAC) shield icon should be shown near the button; that is, whether the action invoked by the button requires elevation.

Tag

Gets or sets the object that contains data about the control.

(Inherited from TaskDialogControl)
Text

Gets or sets the text associated with this control.

TryAgain

Gets a standard TaskDialogButton instance representing the Try Again button.

Visible

Gets or sets a value that indicates if this TaskDialogButton should be shown when displaying the task dialog.

Yes

Gets a standard TaskDialogButton instance representing the Yes button.

Methods

Equals(Object)

Determines whether the specified object is equal to the current object.

GetHashCode()

Serves as the default hash function.

GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
PerformClick()

Simulates a click on this button.

ToString()

Returns a string that represents the current TaskDialogButton control.

Operators

Equality(TaskDialogButton, TaskDialogButton)
Inequality(TaskDialogButton, TaskDialogButton)

Events

Click

Occurs when the button is clicked.

Applies to