When I try to run your example, it doesn't even compile. I get this error message pointing on the line with ContextFlyout:
The XAML Binary Format (XBF) generator reported syntax error '0x09c5'
Perhaps MapControl isn't allowed to have ContextFlyout? So alternatively, you can achieve same result with this code:
<maps:MapControl Name="MapaElementov" HorizontalAlignment="Left" Margin="10,47,0,0" VerticalAlignment="Top" Height="663" Width="1260" MapServiceToken="some-code"
ZoomLevel="9" RotateInteractionMode="Disabled" TiltInteractionMode="Disabled" MapRightTapped="MapaElementov_MapRightTapped">
<FlyoutBase.AttachedFlyout>
<MenuFlyout x:Name="MapFlyout">
<MenuFlyoutItem Text="Item 1"/>
<MenuFlyoutItem Text="Item 2"/>
</MenuFlyout>
</FlyoutBase.AttachedFlyout>
</maps:MapControl>
...
private void MapaElementov_MapRightTapped(MapControl sender, MapRightTappedEventArgs args)
{
MapFlyout.ShowAt(sender, new Point(args.Position.X, args.Position.Y));
}
I think you can also easily pack this into your own attached property, if you want.
EDIT: I couldn't compile your example because, apparantely, ContextFlyout was introduced in Anniversary Update, so I had to set min and target version to build 14393 to run it.