feat: setup demo.

This commit is contained in:
rabbitism
2024-01-20 22:46:23 +08:00
parent 0e91c844a7
commit 497a8c2d02
10 changed files with 143 additions and 4 deletions

View File

@@ -0,0 +1,29 @@
<UserControl
x:Class="Ursa.Demo.Pages.DialogDemo"
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:u="https://irihi.tech/ursa"
xmlns:vm="using:Ursa.Demo.ViewModels"
d:DesignHeight="450"
d:DesignWidth="800"
x:CompileBindings="True"
x:DataType="vm:DialogDemoViewModel"
mc:Ignorable="d">
<Grid ColumnDefinitions="Auto, *">
<StackPanel Grid.Column="0">
<Button Command="{Binding ShowLocalOverlayDialogCommand}">Show Local Overlay Dialog</Button>
<Button Command="{Binding ShowGlobalOverlayDialogCommand}"> Show Global Overlay Dialog </Button>
</StackPanel>
<Grid Grid.Column="1">
<Button
HorizontalAlignment="Center"
VerticalAlignment="Center"
Command="{Binding ShowLocalOverlayDialogCommand}">
Show Local Overlay Dialog
</Button>
<u:OverlayDialogHost HostId="LocalHost" />
</Grid>
</Grid>
</UserControl>

View File

@@ -0,0 +1,13 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
namespace Ursa.Demo.Pages;
public partial class DialogDemo : UserControl
{
public DialogDemo()
{
InitializeComponent();
}
}