We have a very large child control which does a lot of rendering to display its detail, but since only a portion of that control is actually visible (it's clipped by something further up the hierarchy, not necessarily its immediate parent) we only want to render the visible portion during the OnRender call.
Consider the following picture. The child is 100x50 but the visible area is a rectangle with corners at (10,5) and (100,50) in child coordinates. That's the area we're looking for.
Note: You can't simply do coordinate conversions from the child to the parent and test for clipping because it may not be the parent that's doing the clipping.
Consider nested Canvas controls inside a ScrollViewer. The inner Canvas may very well lay completely within the bounds of the outer Canvas, but the outer Canvas may be clipped by the ScrollViewer, thus the inner Canvas is visually clipped by it as well.
Walking the visual tree and testing each parent would kill performance.
So is there anything built in to WPF that can get the bounds of the visible area of a control?