Canvas provides the coordinates of each control with Canvas.Left and Canvas.Top attached properties, which you know if you yourself positioned them yourself. This way, the (slightly) more complex part gets a different coordinate, and for that you want to know the height / width of the rendering. ActualHeight and ActualWidth give you this, assuming the control is already laid out:
double top = Canvas.GetTop(control) double bottom = top + control.ActualHeight double left = Canvas.GetLeft(control) double right = left + control.ActualWidth
If you do this before the controls were able to display on the screen, you can first do control.UpdateLayout() (or control.Measure() ) so that the layout system estimates their size.
source share