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