diff --git a/demo/Sandbox/Views/MainWindow.axaml b/demo/Sandbox/Views/MainWindow.axaml
index d1f30fd..a4db4ff 100644
--- a/demo/Sandbox/Views/MainWindow.axaml
+++ b/demo/Sandbox/Views/MainWindow.axaml
@@ -7,27 +7,19 @@
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="Sandbox.Views.MainWindow"
x:DataType="vm:MainWindowViewModel"
+ xmlns:sys="using:System"
Icon="/Assets/avalonia-logo.ico"
Title="Sandbox">
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/demo/Sandbox/Views/MainWindow.axaml.cs b/demo/Sandbox/Views/MainWindow.axaml.cs
index 7430fad..937a796 100644
--- a/demo/Sandbox/Views/MainWindow.axaml.cs
+++ b/demo/Sandbox/Views/MainWindow.axaml.cs
@@ -1,4 +1,6 @@
using Avalonia.Controls;
+using Avalonia.Interactivity;
+using Ursa.Controls;
namespace Sandbox.Views;
@@ -8,4 +10,9 @@ public partial class MainWindow : Window
{
InitializeComponent();
}
+
+ private async void Button_OnClick(object? sender, RoutedEventArgs e)
+ {
+ var res = await OverlayDialog.ShowModal(new TextBlock() { Text = "sdfksjdl" }, "root");
+ }
}
\ No newline at end of file
diff --git a/demo/Sandbox/Views/PW.axaml b/demo/Sandbox/Views/PW.axaml
new file mode 100644
index 0000000..48b31a9
--- /dev/null
+++ b/demo/Sandbox/Views/PW.axaml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/demo/Sandbox/Views/PW.axaml.cs b/demo/Sandbox/Views/PW.axaml.cs
new file mode 100644
index 0000000..0cc6d85
--- /dev/null
+++ b/demo/Sandbox/Views/PW.axaml.cs
@@ -0,0 +1,42 @@
+using System;
+using System.IO;
+using Avalonia;
+using Avalonia.Controls;
+using Avalonia.Interactivity;
+using Avalonia.Markup.Xaml;
+using Irihi.Avalonia.Shared.Contracts;
+using Sandbox.ViewModels;
+using Ursa.Controls;
+
+namespace Sandbox.Views;
+
+public partial class PW : UserControl
+{
+ public PW()
+ {
+ InitializeComponent();
+ _overlayDialogHost.HostId = _hostid;
+ }
+
+ private string _hostid = Path.GetRandomFileName();
+
+ private async void Button_OnClick(object? sender, RoutedEventArgs e)
+ {
+ Drawer.ShowCustom(new PW(), new TestVM(), _hostid);
+ }
+
+ private void Close(object? sender, RoutedEventArgs e)
+ {
+ (DataContext as TestVM)?.Close();
+ }
+}
+
+public class TestVM : ViewModelBase, IDialogContext
+{
+ public void Close()
+ {
+ RequestClose?.Invoke(this, 12456789);
+ }
+
+ public event EventHandler