ArcGISRuntime.Samples.Desktop.Pages.SnapToGeometryPage.mapView_MouseMove C# (CSharp) Method

mapView_MouseMove() private method

マウス移動時のイベント ハンドラ
private mapView_MouseMove ( object sender, System.Windows.Input.MouseEventArgs e ) : void
sender object
e System.Windows.Input.MouseEventArgs
return void
        private void mapView_MouseMove(object sender, MouseEventArgs e)
        {
            //マウスの位置を座標値に変換
            var mouseLocation = mapView.ScreenToLocation(e.GetPosition(mapView));

            //マウスの位置(座標値)に許容範囲表示用グラフィックを移動
            this.toleranceOverlay.Graphics[0].Geometry = mouseLocation;

            //現在のマウス位置(座標値)でスナップ処理を実行
            Snap(mouseLocation, mapView.UnitsPerPixel);
        }