button默认原生样式

This commit is contained in:
luxiaoqi
2023-11-23 16:36:19 +08:00
parent bc5e6be81e
commit a6fc04e737
4 changed files with 76 additions and 10 deletions

View File

@@ -28,6 +28,7 @@ namespace CPF.Toolkit.Demo
Height = 400;
Background = null;
this.DataContext = this.CommandContext = vm;
this.CanResize = true;
Children.Add(new WindowFrame(this, new WrapPanel
{
@@ -73,11 +74,15 @@ namespace CPF.Toolkit.Demo
new Button
{
Content = "AsyncButton",
Commands =
{
{ nameof(Button.AsyncClick),async (s,e) => await this.vm.AsyncClick() }
}
}.Assign(out var asyncButton),
}
}));
asyncButton.AsyncClick += AsyncButton_AsyncClick;
//asyncButton.AsyncClick += AsyncButton_AsyncClick;
}
private async Task AsyncButton_AsyncClick(object sender, RoutedEventArgs e)