2024-09-10 00:09:07 +08:00
|
|
|
using AtomUI.Demo.Desktop.ViewModels;
|
2024-06-19 18:46:29 +08:00
|
|
|
using Avalonia.Controls;
|
|
|
|
using Avalonia.Controls.Primitives;
|
|
|
|
using Avalonia.Threading;
|
|
|
|
|
|
|
|
namespace AtomUI.Demo.Desktop.ShowCase;
|
|
|
|
|
|
|
|
public partial class PaletteShowCase : UserControl
|
|
|
|
{
|
|
|
|
public PaletteShowCase()
|
|
|
|
{
|
|
|
|
InitializeComponent();
|
|
|
|
}
|
|
|
|
|
2024-09-10 00:09:07 +08:00
|
|
|
protected override async void OnApplyTemplate(TemplateAppliedEventArgs e)
|
2024-06-19 18:46:29 +08:00
|
|
|
{
|
|
|
|
base.OnApplyTemplate(e);
|
2024-09-10 00:09:07 +08:00
|
|
|
var vm = new PaletteDemoViewModel();
|
|
|
|
await Dispatcher.UIThread.InvokeAsync(() => { vm.InitializeResources(); });
|
2024-06-19 18:46:29 +08:00
|
|
|
DataContext = vm;
|
|
|
|
}
|
|
|
|
}
|