Пример #1
0
 private void panHelper_PanAnimationCompleted(object sender, PanAnimationEventArgs e)
 {
     Rectangle2D old = ViewBounds;
     if (MapManipulator == MapManipulator.Program)
     {
         this.MapStatus = MapStatus.PanCompleted;
     }
     TranslateTransform renderTransform = layerCollectionContainer.RenderTransform as TranslateTransform;
     renderTransform.X = e.Offset.X;
     renderTransform.Y = e.Offset.Y;
     Rectangle2D temp = GetFullViewBounds();
     LoadLayersInView(false, temp);
     if (MapStatus == MapStatus.PanCompleted)
     {
         RaiseViewBoundsChanged();
     }
     else
     {
         RaiseViewBoundsChanging(new ViewBoundsEventArgs(old, ViewBounds));
     }
     if (MapManipulator == MapManipulator.Program)
     {
         this.MapStatus = MapStatus.Still;
         this.MapManipulator = MapManipulator.None;
     }
     else if (MapManipulator == MapManipulator.Device && MapStatus == MapStatus.PanCompleted)
     {
         MapStatus = MapStatus.Still;
         MapManipulator = MapManipulator.None;
     }
 }
Пример #2
0
 private void panHelper_Panning(object sender, PanAnimationEventArgs e)
 {
     if (MapManipulator == MapManipulator.Program)
     {
         this.MapStatus = MapStatus.Panning;
     }
     Rectangle2D oldViewBounds = ViewBounds;
     TranslateTransform renderTransform = layerCollectionContainer.RenderTransform as TranslateTransform;
     renderTransform.X = e.Offset.X;
     renderTransform.Y = e.Offset.Y;
     this.LoadLayersInView(false, this.GetFullViewBounds());
     RaiseViewBoundsChanging(new ViewBoundsEventArgs(oldViewBounds, ViewBounds));
 }