Black: Parent Control
Red: Resizable Child Control
Blue: Fixed-size Child Control
The black control sits on a Canvas.
I can easily adorn the black control to resize and move, but what I'm trying to do is adorn the red control so that when 开发者_StackOverflow中文版it resizes, it resizes the red control and the black control as well, shifting the blue control so that its position remains "docked" to the right side of the red control. Also, moving the red control would move the entire grouping (i.e. the black control) across the canvas.
Do you adorn the black control but adjust the position of the adorners such that they are aligned with the edges of the red control? Adorn the red control but somehow do the calculations to adjust the size/position of the black control? I'm not sure what the best approach to this would be. Any code/good ideas/places to start would be appreciated. I'm at a bit of a loss as to the best approach.
精彩评论