Bug with Flyouts inside ItemsControls within another Flyout? RRS feed

  • Question

  • I've got an itemsControl and a ContentControl next to each other in a DataTemplate that is assigned to a single ContentControl that appears in an outer flyout.  In the template, the CC is bound to the DataContext ("Slot"), while the IC is bound to "Slot.Children").  The CC's ContentTemplate and the IC's ItemTemplate are both the same - a Button with a MenuFlyout.  What's weird is that the CC's Flyout works fine - it will appear and is clickable when the owning button is clicked, but the IC's Flyouts do not work - as soon as the button is clicked, the entire outer flyout closes.

    Anyone know what's going on here?  I don't see anything obviously incorrect that I'm doing (although it was like  pulling teeth to pull off a recursive DataTemplate in UWP).

    EDIT: It has something to do with the nested Flyouts (I'm calling the MenuFlyout from within an ItemsPanel that is within a Flyout).  The MenuFlyout within the sibling CC works, but not the IC.  If I take the contents of the Flyout outside of it, both the CC and the IC's MenuFlyouts work correctly.
    • Edited by RKPatrick Sunday, October 15, 2017 5:10 AM
    Sunday, October 15, 2017 5:06 AM

All replies

  • Hi RKPatrick

    I followed the steps you mentioned above.

    • I created a button with a flyout.
    • Put a contentcontrol in the flyout.
    • Added a itemscontrol called “IC” and a contentcontrol called “CC” next to each other in the original contentcontrol’s template.
    • Added a button with menuflyout to each template of IC and CC.
    • Bind some string to the menuflyout itmes.

    But when I run the app, the flyout of IC shows correctly and I could click the item too.

    I’m wondering if I missed something which caused different results. Could you please give me a sample to reproduce the problem? A simple demo which could reproduce the problem will be enough.

    Best regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, October 16, 2017 8:11 AM