feat: add prism sample.
This commit is contained in:
@@ -1,6 +1,15 @@
|
||||
namespace Ursa.PrismExtension;
|
||||
using Avalonia.Controls;
|
||||
using Ursa.Controls;
|
||||
|
||||
namespace Ursa.PrismExtension;
|
||||
|
||||
public interface IUrsaDialogService
|
||||
{
|
||||
|
||||
public void ShowCustom(string viewName, object? vm, Window? owner = null, DialogOptions? options = null);
|
||||
|
||||
public Task<DialogResult> ShowModal(string viewName, object? vm, Window? owner = null,
|
||||
DialogOptions? options = null);
|
||||
|
||||
public Task<TResult?> ShowCustomModal<TResult>(string viewName, object? vm, Window? owner = null,
|
||||
DialogOptions? options = null);
|
||||
}
|
||||
@@ -1,6 +1,17 @@
|
||||
namespace Ursa.PrismExtension;
|
||||
using Avalonia.Controls;
|
||||
using Ursa.Controls;
|
||||
|
||||
public class IUrsaOverlayDialogService
|
||||
namespace Ursa.PrismExtension;
|
||||
|
||||
public interface IUrsaOverlayDialogService
|
||||
{
|
||||
|
||||
public void Show(string viewName, object? vm, string? hostId = null, OverlayDialogOptions? options = null);
|
||||
|
||||
public void ShowCustom(string viewName, object? vm, string? hostId = null, OverlayDialogOptions? options = null);
|
||||
|
||||
public Task<DialogResult> ShowModal(string viewName, object? vm, string? hostId = null,
|
||||
OverlayDialogOptions? options = null);
|
||||
|
||||
public Task<TResult?> ShowCustomModal<TResult>(string viewName, object? vm, string? hostId = null,
|
||||
OverlayDialogOptions? options = null);
|
||||
}
|
||||
@@ -7,7 +7,7 @@ public static class UrsaDialogServiceExtension
|
||||
{
|
||||
internal const string UrsaDialogViewPrefix = "URSA_DIALOG_VIEW_";
|
||||
|
||||
public static void RegisterDialogService(this IContainerRegistry containerRegistry)
|
||||
public static void RegisterUrsaDialogService(this IContainerRegistry containerRegistry)
|
||||
{
|
||||
containerRegistry.RegisterSingleton<IUrsaDialogService, UrsaDialogService>();
|
||||
containerRegistry.RegisterSingleton<IUrsaOverlayDialogService, UrsaOverlayDialogService>();
|
||||
|
||||
Reference in New Issue
Block a user