Skip to content

UIElement.RectFromScreen method

Converts a rectangle from screen coordinates in device pixels to element coordinates in DIPs.

public Rect RectFromScreen(Rect rect)
parameter description
rect The rectangle in screen coordinates in device pixels.

The bounding box of the rectangle in element coordinates.

exception condition
InvalidOperationException The element is not connected to a shown window.