Hi Ashok,
Here is a demo I made.Maybe this is what you what:
The Xaml part:
<Page
x:Class="Popup1.MainPage"
xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation
xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml
xmlns:local="using:Popup1"
xmlns:d=http://schemas.microsoft.com/expression/blend/2008
xmlns:mc=http://schemas.openxmlformats.org/markup-compatibility/2006
mc:Ignorable="d">
<Page.Resources>
<MenuFlyout x:Name="menuflyout" x:Key="DeclarativeAttachedFlyout2">
<MenuFlyoutItem Text="b1" ></MenuFlyoutItem>
<MenuFlyoutItem Text="b2" ></MenuFlyoutItem>
<MenuFlyoutItem Text="b3" ></MenuFlyoutItem>
<MenuFlyoutItem Text="b4" ></MenuFlyoutItem>
</MenuFlyout>
</Page.Resources>
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Button Name="btn1" Content="Click me" RightTapped="Button_RightTapped_1"/>
</Grid>
</Page>
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()
{
this.InitializeComponent();
}
private void Button_RightTapped_1(object sender, RightTappedRoutedEventArgs e)
{
menuflyout.ShowAt(btn1);
}
}
}
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,
Barry
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.