TaskDialog
Namespace: FluentAvalonia.UI.Controls
Represents and enhanced dialog with enhanced button, command, and progress support
C#
public class TaskDialog : ContentControl
Xaml
<ui:TaskDialog />
Required Template Parts
| Name | Control Type |
|---|---|
| ButtonsHost | ItemsPresenter |
| CommandsHost | ItemsPresenter |
| MoreDetailsButton | Button |
| ProgressBar | ProgressBar |
Pseudoclasses
:hosted, :hidden, :open, :header, :subheader, :icon, :footer, :footerAuto, :expanded, :progress, :progressError, :progressSuspend, :disabled, :focus, :focus-visible, :focus-within, :pointerover
Examples and Usage Notes
None yet.
API
Note: Inherited members are not shown
Properties
| Buttons | Gets the list of buttons that display at the bottom of the TaskDialog |
| ButtonsProperty | Defines the `FluentAvalonia.UI.Controls.TaskDialog.Buttons` property |
| Commands | Gets the list of Commands displayed in the TaskDialog |
| CommandsProperty | Defines the `FluentAvalonia.UI.Controls.TaskDialog.Commands` property |
| Footer | Gets or sets the footer content |
| FooterProperty | Defines the `FluentAvalonia.UI.Controls.TaskDialog.Footer` property |
| FooterTemplate | Gets or sets the IDataTemplate for the footer content |
| FooterTemplateProperty | Defines the `FluentAvalonia.UI.Controls.TaskDialog.FooterTemplate` property |
| FooterVisibility | Gets or sets the visibility of the Footer area |
| FooterVisibilityProperty | Defines the `FluentAvalonia.UI.Controls.TaskDialog.FooterVisibility` property |
| Header | Gets or sets the dialog header text |
| HeaderBackground | Gets or sets the background of the header region of the task dialog |
| HeaderBackgroundProperty | Defines the `FluentAvalonia.UI.Controls.TaskDialog.HeaderBackground` property |
| HeaderForeground | Gets or sets the foreground of the header text for the TaskDialog |
| HeaderForegroundProperty | Defines the `FluentAvalonia.UI.Controls.TaskDialog.HeaderForeground` property |
| HeaderProperty | Defines the `FluentAvalonia.UI.Controls.TaskDialog.Header` property |
| IconForeground | Gets or sets the foreground of the `FluentAvalonia.UI.Controls.TaskDialog.IconSource` for the TaskDialog |
| IconForegroundProperty | Defines the `FluentAvalonia.UI.Controls.TaskDialog.IconForeground` property |
| IconSource | Gets or sets the dialog Icon |
| IconSourceProperty | Defines the `FluentAvalonia.UI.Controls.TaskDialog.IconSource` property |
| IsFooterExpanded | Gets or sets whether the footer is visible |
| IsFooterExpandedProperty | Defines the `FluentAvalonia.UI.Controls.TaskDialog.IsFooterExpanded` property |
| ShowProgressBar | Gets or sets whether this TaskDialog shows a progress bar |
| ShowProgressBarProperty | Defines the `FluentAvalonia.UI.Controls.TaskDialog.ShowProgressBar` property |
| SubHeader | Gets or sets the dialog sub header text |
| SubHeaderProperty | Defines the `FluentAvalonia.UI.Controls.TaskDialog.SubHeader` property |
| Title | Gets or sets the title of the dialog |
| TitleProperty | Defines the `FluentAvalonia.UI.Controls.TaskDialog.Title` property |
| XamlRoot | Gets or sets the root visual that should host this dialog |
Events
| Closed | Raised when the TaskDialog is closed |
| Closing | Raised when the TaskDialog is beginning to close |
| Opened | Raised when the TaskDialog is opened and ready to be shown on screen |
| Opening | Raised when the TaskDialog is beginning to open, but is not yet visible |
Methods
| ShowAsync(Boolean) | Shows the TaskDialog |
| Hide() | Hides the TaskDialog with a `FluentAvalonia.UI.Controls.TaskDialogStandardResult.None` result |
| Hide(Object) | Hides the dialog with the specified dialog result |
Related Enums/Classes
TaskDialogButton
| IconSource | Gets or sets the icon displayed in the button |
| Command | Gets or sets the command that is invoked when the button is clicked |
| CommandParameter | Gets or sets the command parameter for the `FluentAvalonia.UI.Controls.TaskDialogButton.Command` |
| IconSourceProperty | Defines the `FluentAvalonia.UI.Controls.TaskDialogButton.IconSource` property |
| CommandProperty | Defines the `FluentAvalonia.UI.Controls.TaskDialogButton.Command` property |
| CommandParameterProperty | Defines the `FluentAvalonia.UI.Controls.TaskDialogButton.CommandParameter` property |
| OKButton | Predefined button for 'OK'. Note that predefined buttons cannot have command, icons, or click handlers attached - they are meant for simple purposes |
| CancelButton | Predefined button for 'Cancel'. Note that predefined buttons cannot have command, icons, or click handlers attached - they are meant for simple purposes |
| YesButton | Predefined button for 'Yes'. Note that predefined buttons cannot have command, icons, or click handlers attached - they are meant for simple purposes |
| NoButton | Predefined button for 'No'. Note that predefined buttons cannot have command, icons, or click handlers attached - they are meant for simple purposes |
| RetryButton | Predefined button for 'Retry'. Note that predefined buttons cannot have command, icons, or click handlers attached - they are meant for simple purposes |
| CloseButton | Predefined button for 'Close'. Note that predefined buttons cannot have command, icons, or click handlers attached - they are meant for simple purposes |
| Click | Raised when the button is clicked |
TaskDialogCommand
| ClosesOnInvoked | Gets or sets whether invoking this command should also close the dialog |
| Description | Gets or sets the description of the TaskDialogCommand |
| DescriptionProperty | Defines the `FluentAvalonia.UI.Controls.TaskDialogCommand.Description` property |
TaskDialogCheckBox
TaskDialogRadioButton
| IsChecked | Gets or sets whether this RadioButton is checked |
| IsCheckedProperty | Defines the `FluentAvalonia.UI.Controls.TaskDialogRadioButton.IsChecked` property |
TaskDialogFooterVisibility
| Never | The footer is never shown |
| Auto | The footer is hidden by default, but can be expanded open |
| Always | The footer is always visible |
TaskDialogClosingEventArgs
| Cancel | Gets or sets a value that can cancel the closing of the dialog. A true value for Cancel cancels the default behavior. |
| Result | Gets the result of the closing event. |
| GetDeferral | Gets a `FluentAvalonia.Core.Deferral` that the app can use to respond asynchronously to the closing event. |
TaskDialogProgressState
| Normal | Progress bar is in a normal state |
| Error | Progress bar is shown in an error state |
| Suspended | Progress bar is shown in a suspended state |
| Indeterminate | Progress bar is shown as indeterminate |
TaskDialogStandardResult
| None | |
| OK | |
| Cancel | |
| Yes | |
| No | |
| Retry | |
| Close |