Map inside Panorama moves the panorama when panning map

后端 未结 3 558
北恋
北恋 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: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;
        }
    

提交回复
热议问题