feat: enhance PopConfirm with async command support and improve binding. add more demo.

This commit is contained in:
Dong Bin
2025-04-18 17:54:16 +08:00
parent 2a081c0f95
commit 67025dca9c
4 changed files with 52 additions and 20 deletions

View File

@@ -201,8 +201,11 @@ public class PopConfirm : ContentControl
protected override bool RegisterContentPresenter(ContentPresenter presenter)
{
var result = base.RegisterContentPresenter(presenter);
_childChangeDisposable = presenter.GetPropertyChangedObservable(ContentPresenter.ChildProperty)
.Subscribe(OnChildChanged);
if (result)
{
_childChangeDisposable = presenter.GetPropertyChangedObservable(ContentPresenter.ChildProperty)
.Subscribe(OnChildChanged);
}
return result;
}