[UWP][C#]How to open the popup in pointer curent position in uwp RRS feed

  • Question

  • Hi,

    In my requirement how to open the popup in pointer current position when right tapped in uwp.

    Can you please provide the example

     private void SfTabItem_RightTapped(object sender, RightTappedRoutedEventArgs e)
                 Part_Tabitem.Part_ContextMenu.IsOpen = true;
    How to implement above code

    • Edited by Barry Wang Wednesday, July 27, 2016 8:14 AM title tag
    Tuesday, July 26, 2016 6:26 PM


  • Hi Ashok,

    Here is a demo I made.Maybe this is what you what:

    The Xaml part:

            <MenuFlyout x:Name="menuflyout" x:Key="DeclarativeAttachedFlyout2">
                <MenuFlyoutItem Text="b1" ></MenuFlyoutItem>
                <MenuFlyoutItem Text="b2" ></MenuFlyoutItem>
                <MenuFlyoutItem Text="b3" ></MenuFlyoutItem>
                <MenuFlyoutItem Text="b4" ></MenuFlyoutItem>
        <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
            <Button Name="btn1" Content="Click me" RightTapped="Button_RightTapped_1"/>

    The code behind:

    namespace Popup1
        /// <summary>
        /// An empty page that can be used on its own or navigated to within a Frame.
        /// </summary>
        public sealed partial class MainPage : Page
            public MainPage()
            private void Button_RightTapped_1(object sender, RightTappedRoutedEventArgs e)

    Please notice that I don't know which kind of "popup" is what you want. I only see that you want to open a contextmenu, which is a desktop scenario. If this is not what you want please share us more details.

    Best regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Proposed as answer by Barry Wang Wednesday, August 3, 2016 10:11 AM
    • Marked as answer by Barry Wang Thursday, August 4, 2016 10:36 AM
    Wednesday, July 27, 2016 11:07 AM