Exemplo n.º 1
0
 public MapCanvas()
 {
     _mapControlFactory = 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;
 }
Exemplo n.º 2
0
 public MapCanvas()
 {
     _mapControlFactory = 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;
 }