diff --git a/demo/Ursa.PrismDialogDemo/MainWindow.axaml b/demo/Ursa.PrismDialogDemo/MainWindow.axaml index 904dce5..2f9c046 100644 --- a/demo/Ursa.PrismDialogDemo/MainWindow.axaml +++ b/demo/Ursa.PrismDialogDemo/MainWindow.axaml @@ -8,7 +8,8 @@ Title="Ursa.PrismDialogDemo"> - + + diff --git a/demo/Ursa.PrismDialogDemo/MainWindow.axaml.cs b/demo/Ursa.PrismDialogDemo/MainWindow.axaml.cs index 1b51033..6ae5519 100644 --- a/demo/Ursa.PrismDialogDemo/MainWindow.axaml.cs +++ b/demo/Ursa.PrismDialogDemo/MainWindow.axaml.cs @@ -1,28 +1,48 @@ using Avalonia.Controls; using Avalonia.Interactivity; using DryIoc; +using Ursa.Controls; +using Ursa.Controls.Options; using Ursa.PrismExtension; namespace Ursa.PrismDialogDemo; public partial class MainWindow : Window { - private IUrsaOverlayDialogService _dialogService; - private IUrsaDrawerService _drawerService; - public MainWindow(IUrsaOverlayDialogService dialogService, IUrsaDrawerService drawerService) + private readonly IUrsaOverlayDialogService _overlayDialogService; + private readonly IUrsaDialogService _aloneDialogService; + private readonly IUrsaDrawerService _drawerService; + + public MainWindow(IUrsaOverlayDialogService overlayDialogService, IUrsaDialogService aloneDialogService, + IUrsaDrawerService drawerService) { InitializeComponent(); - _dialogService = dialogService; + _overlayDialogService = overlayDialogService; + _aloneDialogService = aloneDialogService; _drawerService = drawerService; } - private void DialogButton_OnClick(object? sender, RoutedEventArgs e) + private void OverlayDialogButton_OnClick(object? sender, RoutedEventArgs e) { - _dialogService.ShowModal("Default", null, null, null); + _overlayDialogService.ShowModal("Default", null, null, new OverlayDialogOptions() + { + Title = "This is dialog title" + }); + } + + private void AloneDialogButton_OnClick(object? sender, RoutedEventArgs e) + { + _aloneDialogService.ShowModal("Default", null, null, new DialogOptions() + { + Title = "This is dialog title" + }); } private void DrawerButton_OnClick(object? sender, RoutedEventArgs e) { - _drawerService.ShowModal("Default", null, null, null); + _drawerService.ShowModal("Default", null, null, new DrawerOptions() + { + Title = "This is dialog title" + }); } } \ No newline at end of file