Adding child controls to a KryptonGroup, KryptonHeaderGroup, or KryptonNavigator that had non-default Anchor properties values would get stuffed in the designer.
This is the first bug that was reported for release 2.0 of Krypton. Add a button inside a KryptonGroup and set the Anchor property to be Top|Bottom|Left|Right. So if the user resizes your group you get the button to grow and shrink in synch.
Everything looks good at design time, so you compile and run. Everything looks good at runtime. So you go back and reopen the form in the designer. Wow, my button just got huge!
Yep, it works fine at runtime and the FIRST time inside the designer but if you open up the designer a SECOND time it goes nuts. Well it took some time to track down and solve the problem and it highlights an irritation of mine with the designer.
It turns out that the designer does not execute the designer generated code in the same way the code is executed at runtime. This seems crazy to me, surely you would want the InitializeComponent code to run the same in either situation so you have the same scenario produced. But no, it just doesn’t work that way.
The order in which child controls are created, sized and added to the owning container are different. So I had to spend time fixing up my code so it would work in either ordering. I can only guess the difference is something to do with the designer parsing the code into a CodeDOM and then executing it.
Still, after much experimentation it seems to be working now. But I will not be completely comfortable until others have played around and found it is fine. Once I have finished fixing the current batch of bugs I will make a release so others can get their hands on it.