diff --git a/package/windows/ReactNativeXaml/XamlViewManager.cpp b/package/windows/ReactNativeXaml/XamlViewManager.cpp index 713b901..f1d632c 100644 --- a/package/windows/ReactNativeXaml/XamlViewManager.cpp +++ b/package/windows/ReactNativeXaml/XamlViewManager.cpp @@ -346,6 +346,12 @@ void XamlViewManager::RemoveChildAt(xaml::FrameworkElement parent, int64_t index return panel.Children().RemoveAt(static_cast(index)); } else if (auto itemsControl = e.try_as()) { return itemsControl.Items().RemoveAt(static_cast(index)); + } else if (auto wrapper = e.try_as()) { + if (auto parentContent = wrapper.WrappedObject()) { + if (auto menuFlyout = parentContent.try_as()) { + return menuFlyout.Items().RemoveAt(static_cast(index)); + } + } } else if (index == 0) { if (auto contentCtrl = e.try_as()) { return contentCtrl.Content(nullptr);