ContentDialogService class¶
Defined in
Namespace: CrissCross.Avalonia.UI
Assembly: CrissCross.Avalonia.UI.dll
Full name: CrissCross.Avalonia.UI.ContentDialogService
Modifiers: public
Summary¶
Represents a contract with the service that creates ContentDialog.
Applies to
net10.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.1, net471
Class hierarchy
classDiagram
class ContentDialogService
class IContentDialogService {
<>
}
IContentDialogService <|.. ContentDialogService
Implements: IContentDialogService
Examples¶
<ContentPresenter x:Name="RootContentDialogPresenter" Grid.Row="0" />
IContentDialogService contentDialogService = new ContentDialogService();
contentDialogService.SetContentPresenter(RootContentDialogPresenter);
await _contentDialogService.ShowAsync(
new ContentDialog(){
Title = "CrissCross Dialog?",
Content = "Async Dialog!",
PrimaryButtonText = "Save",
SecondaryButtonText = "Don't Save",
CloseButtonText = "Cancel"
}
);
Constructors¶
| Name | Summary |
|---|---|
| .ctor |
Methods¶
| Name | Summary |
|---|---|
| SetContentPresenter | Sets the ContentPresenter. |
| GetContentPresenter | Provides direct access to the ContentPresenter. |
| ShowAsync | Asynchronously shows the specified dialog. |