Context MenuFlyout disappears upon deleting newest item or item at last index of StackPanel #3580
Unanswered
dhaval-ceva
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am new to WinAppSDK and WinUI 3 development. I am trying to create a list of elements within a StackPanel where each child element has a right-click context menu with two items: Insert and Delete. Insert adds a new element right after the target of the right-click, and Delete removes the target element.
The issue is that the context menu becomes blank/disappears in the following two cases:
I am creating the context menu in XAML using a MenuFlyout within the resources of the StackPanel:
I am adding the StackPanel items through code using a for-loop:
And below is my insertion/deletion code within the Click event function of the MenuFlyoutItems:
WinAppSDK 1.3.230331000
Windows 10 22H2 build 19045.2728
Here's a GitHub link to the MWE project: https://github.com/dhaval-ceva/winui3-context-menu-issue-mwe
Beta Was this translation helpful? Give feedback.
All reactions