${mapping_ViewBoundsEventArgs_Title}
${mapping_ViewBoundsEventArgs_Exception}
Inheritance: System.EventArgs
 private void MyMap_ViewBoundsChanged(object sender, ViewBoundsEventArgs e)
 {
     if (Rectangle2D.IsNullOrEmpty(e.OldViewBounds))
     {
         this.MyMap.ScreenContainer.Children.Add(window);
     }
 }
Example #2
0
 private void Map_ViewBoundsChanged(object sender, ViewBoundsEventArgs e)
 {
     SuppressSlider();
     this.isThumbDragging = false;
 }
Example #3
0
 private void Map_ViewBoundsChanging(object sender, ViewBoundsEventArgs e)
 {
     SuppressSlider();
 }
Example #4
0
 private void newValue_ViewBoundsChanging(object sender , ViewBoundsEventArgs e)
 {
     ToUpdateMagnifierMapCenterPosition();
 }
Example #5
0
 private void newValue_ViewBoundsChanged(object sender , ViewBoundsEventArgs e)
 {
     if (Map.Resolution != lastResolution)
     {
         ToSetMagnifierLevel();
     }
     ToUpdateMagnifierMapCenterPosition();
 }
 void MyMap_ViewBoundsChanged(object sender, ViewBoundsEventArgs e)
 {
     this.resolution.Text = "Resolution: " + MyMap.Resolution.ToString();
 }
 void MyMap_ViewBoundsChanged(object sender, ViewBoundsEventArgs e)
 {
     this.scale.Text = "scale: " + MyMap.Scale.ToString();
     this.viewBounds.Text = "viewBounds: " + MyMap.ViewBounds.ToString();
 }
Example #8
0
 private void RaiseViewBoundsChanging(ViewBoundsEventArgs args)
 {
     if (this.ViewBoundsChanging != null)
     {
         this.ViewBoundsChanging(this, args);
     }
     this.raisePropertyChanged("ViewBounds");
 }
        void MyMap_ViewBoundsChanged(object sender, ViewBoundsEventArgs e)
        {
            #region Ellipse
            Ellipse myellipse = new Ellipse();
            myellipse.Fill = new SolidColorBrush(Colors.Red);
            Rectangle2D ellbounds = new Rectangle2D(119.5, 21, 122.5, 26);
            this.elementsLayer.AddChild(myellipse, ellbounds);
            MyEllipseStory.Stop();

            Storyboard.SetTarget(myDoubleAnimation, myellipse);
            MyEllipseStory.Begin();

            #endregion

            #region Pushpin
            Pushpin beijing = new Pushpin();
            beijing.Location = new Point2D(116.2, 39.6);
            this.elementsLayer.AddChild(beijing);

            Pushpin ulanBator = new Pushpin();
            ulanBator.Location = new Point2D(106.5, 47.6);
            ulanBator.Background = new SolidColorBrush(Colors.Blue);
            this.elementsLayer.AddChild(ulanBator);

            Pushpin moscow = new Pushpin();
            moscow.Location = new Point2D(37.4, 55.5);
            moscow.Background = new SolidColorBrush(Colors.Yellow);
            this.elementsLayer.AddChild(moscow);


            Pushpin prague = new Pushpin();
            prague.Location = new Point2D(14.3, 50.1);
            prague.Background = new SolidColorBrush(Colors.Orange);
            this.elementsLayer.AddChild(prague);

            Pushpin berlin = new Pushpin();
            berlin.Location = new Point2D(13.3, 52.3);
            berlin.Background = new SolidColorBrush(Colors.Purple);
            this.elementsLayer.AddChild(berlin);
            #endregion

            #region Polylinebase
            PolygonElement line = new PolygonElement();
            line.Stroke = new SolidColorBrush(Colors.Yellow);
            line.StrokeThickness = 3;
            line.Opacity = 1;
            line.StrokeDashArray = new DoubleCollection { 3, 3 };
            line.StrokeEndLineCap = PenLineCap.Triangle;
            Point2DCollection points = new Point2DCollection();
            points.Add(new Point2D(121.3, 25));
            points.Add(new Point2D(116.2, 39.6));
            points.Add(new Point2D(106.5, 47.6));
            points.Add(new Point2D(37.4, 55.5));
            points.Add(new Point2D(14.3, 50.1));
            points.Add(new Point2D(13.3, 52.3));
            points.Add(new Point2D(0.1, 51.3));
            line.Point2Ds = points;
            this.elementsLayer.AddChild(line);
            #endregion

            #region PolygonElement
            PolygonElement polygon = new PolygonElement();
            polygon.Stroke = new SolidColorBrush(Colors.Purple);
            polygon.Opacity = 0.5;
            polygon.Fill = this.British;
            Point2DCollection gonpoints = new Point2DCollection();
            gonpoints.Add(new Point2D(-8, 61));
            gonpoints.Add(new Point2D(-6, 55));
            gonpoints.Add(new Point2D(-8, 50));
            gonpoints.Add(new Point2D(2, 50));
            gonpoints.Add(new Point2D(1, 61));
            polygon.Point2Ds = gonpoints;
            this.elementsLayer.AddChild(polygon);
            #endregion

            #region Button
            Button btn = new Button();
            btn.Content = "点击";
            Brush btnbackground = new SolidColorBrush(Colors.Blue);
            btn.SetValue(Button.BackgroundProperty, btnbackground);
            btn.Click += new RoutedEventHandler(btn_Click);
            Rectangle2D btnbounds = new Rectangle2D(95, 29, 115, 43);
            btn.SetValue(ElementsLayer.BBoxProperty, btnbounds);
            this.elementsLayer.AddChild(btn);
            #endregion

            MyMap.ViewBoundsChanged -= MyMap_ViewBoundsChanged;
        }
        private void Map_ViewBoundsChanged(object sender, ViewBoundsEventArgs e)
        {
            if (Rectangle2D.IsNullOrEmpty(e.OldViewBounds) && preViewButton != null && nextViewButton != null)
            {
                MapHistoryManager._viewBoundsHistory.Add(e.NewViewBounds);
            }
            else if (_newViewBounds && preViewButton != null && nextViewButton != null)
            {
                _currentViewBoundsIndex++;
                if (_viewBoundsHistory.Count - _currentViewBoundsIndex > 0)
                {
                    _viewBoundsHistory.RemoveRange(_currentViewBoundsIndex, _viewBoundsHistory.Count - _currentViewBoundsIndex);
                }
                if (nextViewButton.IsEnabled)
                {
                    nextViewButton.IsEnabled = false;
                }

                _viewBoundsHistory.Add(e.NewViewBounds);

                if (!preViewButton.IsEnabled)
                {
                    preViewButton.IsEnabled = true;
                }
            }
            else
            {
                Map.IsHitTestVisible = true;
                _newViewBounds = true;
            }
        }
Example #11
0
 private void newMap_ViewBoundsChanged(object sender, ViewBoundsEventArgs e)
 {
     RefreshScaleBar();
 }