Skip to content

Commit

Permalink
Merge pull request #7576 from pr8x/button-flyout-diagnostics
Browse files Browse the repository at this point in the history
DevTools: Enable inspection for Button.Flyout
  • Loading branch information
maxkatz6 authored Feb 11, 2022
2 parents 572e91b + be6784d commit ec52383
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ public override void Dispose()
c.GetObservable(Control.ContextMenuProperty),
c.GetObservable(FlyoutBase.AttachedFlyoutProperty),
c.GetObservable(ToolTipDiagnostics.ToolTipProperty),
(ContextFlyout, ContextMenu, AttachedFlyout, ToolTip) =>
c.GetObservable(Button.FlyoutProperty),
(ContextFlyout, ContextMenu, AttachedFlyout, ToolTip, ButtonFlyout) =>
{
if (ContextMenu != null)
//Note: ContextMenus are special since all the items are added as visual children.
Expand All @@ -100,6 +101,9 @@ public override void Dispose()
if (ToolTip != null)
return GetPopupHostObservable(ToolTip, "ToolTip");
if (ButtonFlyout != null)
return GetPopupHostObservable(ButtonFlyout, "Flyout");
return Observable.Return<PopupRoot?>(null);
})
.Switch(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ void ProcessProperty<T>(IControl control, AvaloniaProperty<T> property)
ProcessProperty(control, ContextMenuProperty);
ProcessProperty(control, FlyoutBase.AttachedFlyoutProperty);
ProcessProperty(control, ToolTipDiagnostics.ToolTipProperty);
ProcessProperty(control, Button.FlyoutProperty);
}

return popupRoots;
Expand Down

0 comments on commit ec52383

Please sign in to comment.