问题
I have the bindingnavigator control with 5 items including a toolstripdownbutton. I programmatically add a toolstripcontrolhost that contains a panel to the toolstripdownbutton. When I open the dropdown first time, it shows in the location (0,0).During second and third times of dropdown opening the correct position. How do I fix this error?
FormTest formTest = new FormTest();
formTest.TopLevel = false;
tsddbFormControl.DropDownItems.Clear();
formTest.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
ToolStripControlHost host = new ToolStripControlHost(formTest);
tsddbFormControl.DropDownItems.Add(host);
formTest.Show();
来源:https://stackoverflow.com/questions/20044855/c-sharp-winforms-toolstrip-dropdown-with-toolstripcontrolhost-opens-at-0-0-loc