C# Class TaskDialogInterop.TaskDialog

Displays a task dialog.
Inheritance: System.Windows.Window
Mostrar archivo Open project: Euclideon/WPF-Task-Dialog Class Usage Examples

Public Methods

Method Description
GetButtonIdForCommandButton ( int index ) : int

Gets the buttonId for a command button.

When creating the config options for the dialog and specifying command buttons, typically you pass in an array of button label strings. The index specifies which button to get an id for. If you passed in Save, Don't Save, and Cancel, then index 2 specifies the Cancel button.

GetButtonIdForCommonButton ( TaskDialogCommonButtons commonButtons, int index ) : int

Gets the buttonId for a common button. If the common button set includes more than one button, the index number specifies which.

GetButtonIdForCustomButton ( int index ) : int

Gets the buttonId for a custom button.

When creating the config options for the dialog and specifying custom buttons, typically you pass in an array of button label strings. The index specifies which button to get an id for. If you passed in Save, Don't Save, and Cancel, then index 2 specifies the Cancel custom button.

GetButtonIdForRadioButton ( int index ) : int

Gets the buttonId for a radio button.

When creating the config options for the dialog and specifying radio buttons, typically you pass in an array of radio label strings. The index specifies which button to get an id for. If you passed in Automatic, Manual, and Disabled, then index 1 specifies the Manual radio button.

GetButtonIndexForCommonButton ( TaskDialogCommonButtons commonButtons, int buttonId ) : int

Gets the zero-based index for a common button.

When Alt+F4, Esc, and other non-button close commands are issued, the dialog will simulate a Cancel button click. In this case, -1 for index and a buttonid of Cancel will let you know how the user closed the dialog.

Show ( TaskDialogOptions options ) : TaskDialogInterop.TaskDialogResult

Displays a task dialog with the given configuration options.

ShowMessage ( Window owner, string messageText ) : TaskDialogSimpleResult

Displays a task dialog that has a message and that returns a result.

ShowMessage ( Window owner, string messageText, string caption ) : TaskDialogSimpleResult

Displays a task dialog that has a message and that returns a result.

ShowMessage ( Window owner, string messageText, string caption, TaskDialogCommonButtons buttons ) : TaskDialogSimpleResult

Displays a task dialog that has a message and that returns a result.

ShowMessage ( Window owner, string messageText, string caption, TaskDialogCommonButtons buttons, VistaTaskDialogIcon icon ) : TaskDialogSimpleResult

Displays a task dialog that has a message and that returns a result.

ShowMessage ( Window owner, string title, string mainInstruction, string content, string expandedInfo, string verificationText, string footerText, TaskDialogCommonButtons buttons, VistaTaskDialogIcon mainIcon, VistaTaskDialogIcon footerIcon ) : TaskDialogSimpleResult

Displays a task dialog that has a message and that returns a result.

Private Methods

Method Description
ConvertCommonButton ( VistaTaskDialogCommonButtons commonButton, System command = null, bool isDefault = false, bool isCancel = false ) : TaskDialogButtonData
ConvertCommonButtons ( TaskDialogCommonButtons commonButtons ) : VistaTaskDialogCommonButtons
DetectHyperlinks ( string text ) : bool
DetectHyperlinks ( string content, string expandedInfo, string footerText ) : bool
OnClosed ( TaskDialogInterop.TaskDialogClosedEventArgs e ) : void

Raises the E:Closed event.

OnShowing ( TaskDialogInterop.TaskDialogShowingEventArgs e ) : void

Raises the E:Showing event.

ShowEmulatedTaskDialog ( TaskDialogOptions options ) : TaskDialogInterop.TaskDialogResult
ShowTaskDialog ( TaskDialogOptions options ) : TaskDialogInterop.TaskDialogResult

Method Details

GetButtonIdForCommandButton() public static method

Gets the buttonId for a command button.
When creating the config options for the dialog and specifying command buttons, typically you pass in an array of button label strings. The index specifies which button to get an id for. If you passed in Save, Don't Save, and Cancel, then index 2 specifies the Cancel button.
public static GetButtonIdForCommandButton ( int index ) : int
index int The zero-based index into the array of command buttons.
return int

GetButtonIdForCommonButton() public static method

Gets the buttonId for a common button. If the common button set includes more than one button, the index number specifies which.
public static GetButtonIdForCommonButton ( TaskDialogCommonButtons commonButtons, int index ) : int
commonButtons TaskDialogCommonButtons The common button set to use.
index int The zero-based index into the button set.
return int

GetButtonIdForCustomButton() public static method

Gets the buttonId for a custom button.
When creating the config options for the dialog and specifying custom buttons, typically you pass in an array of button label strings. The index specifies which button to get an id for. If you passed in Save, Don't Save, and Cancel, then index 2 specifies the Cancel custom button.
public static GetButtonIdForCustomButton ( int index ) : int
index int The zero-based index into the array of custom buttons.
return int

GetButtonIdForRadioButton() public static method

Gets the buttonId for a radio button.
When creating the config options for the dialog and specifying radio buttons, typically you pass in an array of radio label strings. The index specifies which button to get an id for. If you passed in Automatic, Manual, and Disabled, then index 1 specifies the Manual radio button.
public static GetButtonIdForRadioButton ( int index ) : int
index int The zero-based index into the array of radio buttons.
return int

GetButtonIndexForCommonButton() public static method

Gets the zero-based index for a common button.
When Alt+F4, Esc, and other non-button close commands are issued, the dialog will simulate a Cancel button click. In this case, -1 for index and a buttonid of Cancel will let you know how the user closed the dialog.
public static GetButtonIndexForCommonButton ( TaskDialogCommonButtons commonButtons, int buttonId ) : int
commonButtons TaskDialogCommonButtons The common button set to use.
buttonId int The button's id.
return int

Show() public static method

Displays a task dialog with the given configuration options.
public static Show ( TaskDialogOptions options ) : TaskDialogInterop.TaskDialogResult
options TaskDialogOptions /// A that specifies the /// configuration options for the dialog. ///
return TaskDialogInterop.TaskDialogResult

ShowMessage() public static method

Displays a task dialog that has a message and that returns a result.
public static ShowMessage ( Window owner, string messageText ) : TaskDialogSimpleResult
owner System.Windows.Window /// The that owns this dialog. ///
messageText string /// A that specifies the text to display. ///
return TaskDialogSimpleResult

ShowMessage() public static method

Displays a task dialog that has a message and that returns a result.
public static ShowMessage ( Window owner, string messageText, string caption ) : TaskDialogSimpleResult
owner System.Windows.Window /// The that owns this dialog. ///
messageText string /// A that specifies the text to display. ///
caption string /// A that specifies the title bar /// caption to display. ///
return TaskDialogSimpleResult

ShowMessage() public static method

Displays a task dialog that has a message and that returns a result.
public static ShowMessage ( Window owner, string messageText, string caption, TaskDialogCommonButtons buttons ) : TaskDialogSimpleResult
owner System.Windows.Window /// The that owns this dialog. ///
messageText string /// A that specifies the text to display. ///
caption string /// A that specifies the title bar /// caption to display. ///
buttons TaskDialogCommonButtons /// A value that /// specifies which button or buttons to display. ///
return TaskDialogSimpleResult

ShowMessage() public static method

Displays a task dialog that has a message and that returns a result.
public static ShowMessage ( Window owner, string messageText, string caption, TaskDialogCommonButtons buttons, VistaTaskDialogIcon icon ) : TaskDialogSimpleResult
owner System.Windows.Window /// The that owns this dialog. ///
messageText string /// A that specifies the text to display. ///
caption string /// A that specifies the title bar /// caption to display. ///
buttons TaskDialogCommonButtons /// A value that /// specifies which button or buttons to display. ///
icon VistaTaskDialogIcon /// A that specifies the /// icon to display. ///
return TaskDialogSimpleResult

ShowMessage() public static method

Displays a task dialog that has a message and that returns a result.
public static ShowMessage ( Window owner, string title, string mainInstruction, string content, string expandedInfo, string verificationText, string footerText, TaskDialogCommonButtons buttons, VistaTaskDialogIcon mainIcon, VistaTaskDialogIcon footerIcon ) : TaskDialogSimpleResult
owner System.Windows.Window /// The that owns this dialog. ///
title string /// A that specifies the title bar /// caption to display. ///
mainInstruction string /// A that specifies the main text to display. ///
content string /// A that specifies the body text to display. ///
expandedInfo string /// A that specifies the expanded text to display when toggled. ///
verificationText string /// A that specifies the text to display next to a checkbox. ///
footerText string /// A that specifies the footer text to display. ///
buttons TaskDialogCommonButtons /// A value that /// specifies which button or buttons to display. ///
mainIcon VistaTaskDialogIcon /// A that specifies the /// main icon to display. ///
footerIcon VistaTaskDialogIcon /// A that specifies the /// footer icon to display. ///
return TaskDialogSimpleResult