mirror of
https://gitee.com/chinware/atomui.git
synced 2024-12-02 03:47:52 +08:00
22 lines
572 B
C#
22 lines
572 B
C#
using AtomUI.Demo.Desktop.ViewModels;
|
|
using Avalonia.Controls;
|
|
using Avalonia.Controls.Primitives;
|
|
using Avalonia.Threading;
|
|
|
|
namespace AtomUI.Demo.Desktop.ShowCase;
|
|
|
|
public partial class PaletteShowCase : UserControl
|
|
{
|
|
public PaletteShowCase()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
protected override async void OnApplyTemplate(TemplateAppliedEventArgs e)
|
|
{
|
|
base.OnApplyTemplate(e);
|
|
var vm = new PaletteDemoViewModel();
|
|
await Dispatcher.UIThread.InvokeAsync(() => { vm.InitializeResources(); });
|
|
DataContext = vm;
|
|
}
|
|
} |