Reputation: 1827
I just opened a TabPage control I have and found this surprise--a list of control names but no designer or layout. Has anyone see this happen? How can I fix it?
EDIT: Here is an MCVE https://dl.dropboxusercontent.com/u/357882/GForceMCVE.zip
Upvotes: 0
Views: 377
Reputation: 941218
public partial class GForceV2TabPage : TabPage
There is nothing wrong but this is what produced your screenshot. The TabPage class does not have a document designer so you are just seeing the fallback designer view. Which doesn't do anything but list the components that were added to the tab page in the InitializeComponent() method.
It is unclear to me how this happened, but there's a reasonable guess. Whomever first created this control started out by designing a UserControl. And then modified the code, changing the inheritance to TabPage instead of UserControl. Surely because he meant to use it in a TabControl.
You can trivially get the design view back, change TabPage
to UserControl
. Double-click it again and you'll now see the design view you expected. And modify it. You can keep it that way but then you have to change the code that uses GForceV2TabPage, simply drop the control on a normal tab page. Technically you can create your own designer for the control (inherit DocumentDesigner) but that's probably more time than you want to invest.
Upvotes: 3