This commit is contained in:
Sakura
2023-11-22 23:55:50 +08:00
parent 25ce5d78ba
commit 313f8fd79b
8 changed files with 110 additions and 38 deletions

View File

@@ -65,6 +65,16 @@ namespace CPF.Toolkit.Demo
Content = "关闭窗体",
Commands = { { nameof(Button.Click),(s,e) => vm.Test() } }
},
new Button
{
Content = "关闭窗体",
Commands = { { nameof(Button.Click),(s,e) => vm.Test() } }
},
new Button
{
Content = "loading",
Commands = { { nameof(Button.Click),(s,e) => vm.LoadingTest() } }
},
}
}));
}

View File

@@ -24,5 +24,18 @@ namespace CPF.Toolkit.Demo
e.Cancel = !this.isClose;
base.OnClose(e);
}
public async void LoadingTest()
{
await this.ShowLoading(Task.Delay(3000));
this.Dialog.Sucess("test");
//var result = await this.ShowLoading(async () =>
//{
// await Task.Delay(5000);
// return "test";
//});
//this.Dialog.Sucess(result);
}
}
}