WPF: How to get the bounds of a control in an automatic layout container, in the container coordinate space

Posted by Bart Read on Simple Talk See other posts from Simple Talk or by Bart Read
Published on Wed, 24 Nov 2010 13:41:00 GMT Indexed on 2010/12/06 16:58 UTC
Read the original article Hit count: 336

Filed under:
Googling this the other day, I started to get the impression that this might be annoyingly tricky. You might wonder why this is necessary at all, given that WPF implements layout for you in most cases (except for containers such as Canvas), but trust me, if you're developing custom elements, at some point you're probably going to need it. If you're adding controls to a Canvas you can always use the attached Left, Right, etc., properties to get the bounds. Fortunately it's really no more difficult...(read more)

© Simple Talk or respective owner

Related posts about .NET