Esempio n. 1
0
        private void OnOffsetChanged(object sender, EventArgs e)
        {
            this.BeginUpdate();
            MapOffset offset = (MapOffset)sender;

            offset.Property.SetValue(_translate, offset.Offset, null);
            this.EndUpdate();
        }
Esempio n. 2
0
 public MapCanvas()
 {
     _mapControlFactory = UIControls.Maps.Control.MapControlFactoryToUse;
     if (_mapControlFactory != null)
     {
         _offsetX   = _mapControlFactory.GetMapOffset(_translate.GetType().GetProperty("X"), this.OnOffsetChanged);
         _offsetY   = _mapControlFactory.GetMapOffset(_translate.GetType().GetProperty("Y"), this.OnOffsetChanged);
         _tilePanel = _mapControlFactory.TilePanel;
         _tilePanel.RenderTransform = _translate;
     }
     this.Background = Brushes.Transparent; // Register all mouse clicks
     this.Children.Add(_cache);
     if (_mapControlFactory != null)
     {
         this.Children.Add(_tilePanel);
     }
     this.ClipToBounds        = true;
     this.Focusable           = true;
     this.FocusVisualStyle    = null;
     this.SnapsToDevicePixels = true;
 }
Esempio n. 3
0
 public MapCanvas()
 {
     _mapControlFactory = UIControls.Maps.Control.MapControlFactoryToUse;
     if (_mapControlFactory != null)
     {
         _offsetX = _mapControlFactory.GetMapOffset(_translate.GetType().GetProperty("X"), this.OnOffsetChanged);
         _offsetY = _mapControlFactory.GetMapOffset(_translate.GetType().GetProperty("Y"), this.OnOffsetChanged);
         _tilePanel = _mapControlFactory.TilePanel;
         _tilePanel.RenderTransform = _translate;
     }
     this.Background = Brushes.Transparent; // Register all mouse clicks
     this.Children.Add(_cache);
     if (_mapControlFactory != null)
     {
         this.Children.Add(_tilePanel);
     }
     this.ClipToBounds = true;
     this.Focusable = true;
     this.FocusVisualStyle = null;
     this.SnapsToDevicePixels = true;
 }