Map inside Panorama moves the panorama when panning map

后端 未结 3 554
北恋
北恋 2021-01-20 05:56

Well basically, I have this bing map control inside my Panorama view, when I pan left or right, the panorama changes columns. Is there a way to avoid this?

Video of

相关标签:
3条回答
  • 2021-01-20 06:07

    It's advisable to not use the map in a panorama for this reason. If you are able to lock the map, then Jobi's suggestion should work for you.

    This from Jeff Wilcox for reference:

    - "Using a map control inside a Panorama or Pivot is not recommended for a number of UX and technical reasons. Navigate to a subpage."

    0 讨论(0)
  • 2021-01-20 06:20

    Try setting IsEnabled=False on the Map will do the trick Provided you don't need to manipulate that map you show in the Panorama

    0 讨论(0)
  • 2021-01-20 06:32

    Put the map within your own control or make a control that inherits from the map (if possible).

    Then in the Control's code-behind file, put this. It worked for me:

        protected override void OnManipulationStarted(ManipulationStartedEventArgs e)
        {
            e.Handled = true;
        }
    
        protected override void OnManipulationDelta(ManipulationDeltaEventArgs e)
        {
            e.Handled = true;
        }
    
        protected override void OnManipulationCompleted(ManipulationCompletedEventArgs e)
        {
            e.Handled = true;
        }
    
        private void Control_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            e.Handled = true;
        }
    
        private void Control_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            e.Handled = true;
        }
    
    0 讨论(0)
提交回复
热议问题