Beispiel #1
0
        private void Map_SizeChanged(object sender, SizeChangedEventArgs e)
        {
            currentSize = e.NewSize;

            ScreenContainer.Width = e.NewSize.Width;
            ScreenContainer.Height = e.NewSize.Height;
            if (this.mapResizeThrottler == null)
            {
                this.mapResizeThrottler = new ThrottleTimer(250, delegate
                {
                    if (this.isDesignMode)
                    {
                        this.zoomTo(this.designViewBounds, true);
                    }
                    else
                    {
                        this.LoadLayersInView(false, this.GetFullViewBounds());
                    }
                    this.RaiseViewBoundsChanged();
                });
            }
            this.mapResizeThrottler.Invoke();
        }
Beispiel #2
0
 private void RaiseAngleChanged(DependencyPropertyChangedEventArgs e)
 {
     if (this.AngleChanged != null)
     {
         this.AngleChanged(this, e);
     }
     this.LoadContinuousLayersInView(false);
     if (this.mapRotateThrottler == null)
     {
         this.mapRotateThrottler = new ThrottleTimer(250, delegate
         {
             this.LoadLayersInView(false, this.GetFullViewBounds());
         });
     }
     this.mapRotateThrottler.Invoke();
 }