Hi,
I was wondering if it was expected behavior for a Flow Layout Panel or a Panel Resize Event to Fire Twice?
I started with a Flowlayout panel on a Window with it anchored to all 4 sides. I then use the FlowLayoutPanel width to calculate how many controls to put inside the Panel. The window starts in a Normal Window state and then when I maximum the window, I want to redraw the controls with their new width.
When attaching to the Resize or SizeChanged event, the event seems to fire twice.
When my window is first created, it has a width = 961. Confirmed with MessageBoxPopUp showing Width.
Then when attaching to either the Resize / Size Changed or even WindowStateChanged (as Im not allowing manual resize, the window is fixed border with only the Maximize button showing). I get two messages (via MessageBox showing Width), first is 963 (2 pixels wide) and then the final value of 1875.
As there is no EndSizeChanged or similar to get the final value, I was wondering if this was expected for it to fire twice and if so, does anyone have any recommendations on how they handle these events rather than just redrawing everything twice on each resize?
I also tried a Panel with FlowLayoutPanel docked inside incase it made a difference but the same behaviour persisted.
Thanks,
Brayden.
