Failed to remove controls inside toolstripcontainer

I came across a strange issue while developing a winform. I have placed several controls inside the toolstripcontainer and now I cannot remove them. It is also not possible to delete the entire Toolstripcontainer. I am using Visual Studio 2008 SP1 plus some additional fixes. Is this a bug in Visual Studio? Is there a workaround? Or am I missing knowledge about VS? Best wishes, Tomo

+1


source to share


3 answers


Try to close the designer, clean your solution and open the designer window?



+3


source


Can you go into .Designer.Cs and delete the line manually?



0


source


I have Visual Studio 2014, but I think this will help.

Usually, you cannot remove the "toolStripContainer" when you set the value of the "Dock" property to "toolStripContainer" = "Fill".

In this situation:

  • You must right-click on the "toolStripContainer" to get the context menu.
  • In the context menu you will need to select → "Document structure".
  • After that, on the right toolbar, you get the Document Structure toolbar. Select the root "toolStripContainer" element to be removed from the form.
  • Right-click on it. Select "Delete" from the context menu. Or select it and just change the value of the "Dock" property in "toolStripContainer", then you can move this control again in the form designer.
0


source







All Articles