feat: basic position.

This commit is contained in:
rabbitism
2024-02-05 19:40:11 +08:00
parent 8e085bc264
commit fd85efd895
13 changed files with 222 additions and 46 deletions

View File

@@ -3,13 +3,18 @@ using System.Windows.Input;
using Avalonia.Controls;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using Ursa.Common;
using Ursa.Controls;
using Ursa.Controls.Options;
namespace Ursa.Demo.ViewModels;
public class DrawerDemoViewModel: ObservableObject
public partial class DrawerDemoViewModel: ObservableObject
{
public ICommand OpenDrawerCommand { get; set; }
[ObservableProperty] private Position _selectedPosition;
public DrawerDemoViewModel()
{
@@ -18,6 +23,6 @@ public class DrawerDemoViewModel: ObservableObject
private async Task OpenDrawer()
{
await Drawer.Show<Calendar, string, bool>("Hello World");
await Drawer.ShowCustom<Calendar, string, bool>("Hello World", new CustomDrawerOptions() { Position = SelectedPosition, MinWidth = 400 });
}
}