feat: enhance PopConfirm with async command support and improve binding. add more demo.
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}" />
|
||||
<Popup
|
||||
IsLightDismissEnabled="True"
|
||||
IsOpen="{TemplateBinding IsDropdownOpen, Mode=TwoWay}"
|
||||
IsOpen="{Binding IsDropdownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
OverlayInputPassThroughElement="{Binding #PART_ContentPresenter}"
|
||||
Name="{x:Static u:PopConfirm.PART_Popup}"
|
||||
Placement="{TemplateBinding Placement}" >
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user