diff --git a/src/Avalonia.Controls/Flyouts/MenuFlyoutPresenter.cs b/src/Avalonia.Controls/Flyouts/MenuFlyoutPresenter.cs index 12fa014fc6..594d7da2fb 100644 --- a/src/Avalonia.Controls/Flyouts/MenuFlyoutPresenter.cs +++ b/src/Avalonia.Controls/Flyouts/MenuFlyoutPresenter.cs @@ -1,5 +1,4 @@ using System; -using Avalonia.Controls.Generators; using Avalonia.Controls.Platform; using Avalonia.Controls.Primitives; using Avalonia.LogicalTree; @@ -47,15 +46,5 @@ namespace Avalonia.Controls } } } - - protected internal override void PrepareContainerForItemOverride(Control element, object? item, int index) - { - base.PrepareContainerForItemOverride(element, item, index); - - // Child menu items should not inherit the menu's ItemContainerTheme as that is specific - // for top-level menu items. - if ((element as MenuItem)?.ItemContainerTheme == ItemContainerTheme) - element.ClearValue(ItemContainerThemeProperty); - } } }