I am trying to get the rendered location of the corners of a textblock. I can't seem to find out how to do it. The textblock is bound by a border, which in turn in bound by a grid. Therefore the textblock and the border have no dimensions that I can pull in relation to the rest of the Window. I tried the following code, but only part of it works. The margin is 0 and the ActualWidth is 13.2. By the time that this line has been reached, the window and textblocks have been rendered.
double rightBound = textBlock.Margin.Left + textBlock.ActualWidth;
Update: I have the following code which mostly does what I want. However, the points DO NOT line up with the UI elements well; they appear to be arbitrarily placed near the elements. The points do not line up with the boundaries of the block.
Point blockPoint = textBlock.TranslatePoint(new Point(0, 0), myMainWindow);