I am designing a control (below) called ViewPanel
. Essentially it's just a panel that draws it's Text
property as a title. To do this, I adjust the DisplayRectangle
property to allow enough space at the top to draw some text.
The problem I am experiecing (and have been experiencing for a lot of owner-drawn controls that manipulate DisplayRectangle
) is that when the control is resized, it's child controls seem to lag behind a bit.
Example:
As you can see here, I have a ViewPanel
control, which has drawn a blue titlebar, also note that the ViewPanel
is padded 16px in every direction!
The ViewPanel
control has a single child (ListView
)
I have resized the control - notice how the ViewPanel
has drawn it's titlebar correctly, but the child has not repositioned itself accordingly.
Question:
What is responsible for updating the location of child controls? Do I need to override something?