public MapControl() { _scale = 1; // Scale is always 1 in WPF Children.Add(RenderCanvas); Children.Add(RenderElement); Children.Add(_selectRectangle); RenderElement.PaintSurface += SKElementOnPaintSurface; RenderingWeakEventManager.AddHandler(CompositionTargetRendering); Map = new Map(); Loaded += MapControlLoaded; MouseLeftButtonDown += MapControlMouseLeftButtonDown; MouseLeftButtonUp += MapControlMouseLeftButtonUp; TouchUp += MapControlTouchUp; MouseMove += MapControlMouseMove; MouseLeave += MapControlMouseLeave; MouseWheel += MapControlMouseWheel; SizeChanged += MapControlSizeChanged; ManipulationStarted += OnManipulationStarted; ManipulationDelta += OnManipulationDelta; ManipulationCompleted += OnManipulationCompleted; ManipulationInertiaStarting += OnManipulationInertiaStarting; IsManipulationEnabled = true; }
public MapControl() { Children.Add(RenderCanvas); Children.Add(RenderElement); Children.Add(_attributionPanel); Children.Add(_bboxRect); RenderElement.PaintSurface += SKElementOnPaintSurface; RenderingWeakEventManager.AddHandler(CompositionTargetRendering); Map = new Map(); Loaded += MapControlLoaded; MouseLeftButtonDown += MapControlMouseLeftButtonDown; MouseLeftButtonUp += MapControlMouseLeftButtonUp; TouchUp += MapControlTouchUp; MouseMove += MapControlMouseMove; MouseLeave += MapControlMouseLeave; MouseWheel += MapControlMouseWheel; SizeChanged += MapControlSizeChanged; ManipulationStarted += OnManipulationStarted; ManipulationDelta += OnManipulationDelta; ManipulationCompleted += OnManipulationCompleted; ManipulationInertiaStarting += OnManipulationInertiaStarting; //!!!Dispatcher.ShutdownStarted += DispatcherShutdownStarted; IsManipulationEnabled = true; }