0

Is there an easy/good way to bring control into view (make it visible on screen) ?

So far I have tried to do it manually by walking component trees and invoking relevant methods (BringIntoView) and properties (Visibility) but it is rather complicated due to multiplicity of base types (FrameworkElement vs FrameworkContentElement, there is also Visual3D and maybe more?), parent relationships (visual, logical, template) and necessity of customized handling of certain types (e.g. TabItem.IsSelected, Expander.IsExpanded - and ideally that should not assume that control is inside Content). There are probably many edge cases that are not covered by this.

UPDATE

The code I'm using currently: https://gist.github.com/2761622

4

0 回答 0