We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ed0ee65 commit a51aceaCopy full SHA for a51acea
src/Avalonia.Controls/MenuItem.cs
@@ -304,7 +304,7 @@ public bool StaysOpenOnClick
304
bool IMenuItem.IsPointerOverSubMenu => _popup?.IsPointerOverPopup ?? false;
305
306
/// <inheritdoc/>
307
- IMenuElement? IMenuItem.Parent => Parent as IMenuElement;
+ IMenuElement? IMenuItem.Parent => this.FindLogicalAncestorOfType<IMenuElement>();
308
309
protected override bool IsEnabledCore => base.IsEnabledCore && _commandCanExecute;
310
0 commit comments