using System.Windows.Controls;
using WPFluent.Controls;
namespace WPFluent;
///
/// Represents a contract with the service that creates .
///
///
/// <ContentPresenter x:Name="RootContentDialogPresenter" Grid.Row="0" /> IContentDialogService contentDialogService = new ContentDialogService();
/// contentDialogService.SetContentPresenter(RootContentDialogPresenter); await _contentDialogService.ShowAsync( new
/// ContentDialog(){ Title = "The cake?", Content = "IS A LIE!", PrimaryButtonText = "Save", SecondaryButtonText =
/// "Don't Save", CloseButtonText = "Cancel" } );
///
public interface IContentDialogService
{
///
/// Provides direct access to the
///
/// Reference to the currently selected which displays the 's.
ContentPresenter? GetDialogHost();
///
/// Sets the
///
///
/// inside of which the dialogue will be placed. The new will
/// replace the current .
///
void SetDialogHost(ContentPresenter dialogHost);
///
/// Asynchronously shows the specified dialog.
///
/// The dialog to be displayed.
/// A cancellation token that can be used to cancel the operation.
/// A task that represents the asynchronous operation. The task result contains the dialog result.
Task ShowAsync(ContentDialog dialog, CancellationToken cancellationToken);
}