Back to Devexpress

MapControl.ScreenPointToCoordPoint(Point) Method

wpf-devexpress-dot-xpf-dot-map-dot-mapcontrol-dot-screenpointtocoordpoint-x28-system-dot-windows-dot-point-x29.md

latest2.5 KB
Original Source

MapControl.ScreenPointToCoordPoint(Point) Method

Converts a specified screen point to a corresponding coordinate point.

Namespace : DevExpress.Xpf.Map

Assembly : DevExpress.Xpf.Map.v25.2.dll

NuGet Package : DevExpress.Wpf.Map

Declaration

csharp
public CoordPoint ScreenPointToCoordPoint(
    Point screenPoint
)
vb
Public Function ScreenPointToCoordPoint(
    screenPoint As Point
) As CoordPoint

Parameters

NameTypeDescription
screenPointPoint

A Point object containing a map coordinate on the screen.

|

Returns

TypeDescription
CoordPoint

A CoordPoint class descendant object.

|

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ScreenPointToCoordPoint(Point) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-map-use-ray-casting-algorithm-to-check-if-point-is-inside-polygon/CS/DXMapShapeFile1/MainWindow.xaml.cs#L26

csharp
private void vLayer_MouseDoubleClick(object sender, MouseButtonEventArgs e) {
    GeoPoint point = (GeoPoint)mapControl.ScreenPointToCoordPoint(e.GetPosition(mapControl));
    var hi = mapControl.CalcHitInfo(e.GetPosition(mapControl));

See Also

MapControl Class

MapControl Members

DevExpress.Xpf.Map Namespace