Search code examples
c#winformsdesigner

Change Panel Type in Design Mode


I have designed a Form class using a TableLayoutPanel. It is looking how I want it too, but I realized while running the application that it flickers when re-sizing and swapping out panels. So I created a new class, DoubleBufferedTableLayoutPanel using TableLayoutPanel as a base class. I'm wondering if there is an easy way in the Visual Studio 2012 designer to swap out the two panels without having to completely redesign the form again.


Solution

  • You can go into the designer.cs file and change the types manually. Since the new type derives from the old type, it should work flawlessly.