private void OpenButtonMenu(MessageBoxExButton b) { if (b.Button is Button btnCtl) { if (b.DropDownPlacement == DropDownPlacement.Left) { b.ContextMenu.Show(btnCtl, new Point(0, btnCtl.Height)); } else if (b.DropDownPlacement == DropDownPlacement.Right) { b.ContextMenu.Show(btnCtl, new Point(btnCtl.Width, btnCtl.Height), LeftRightAlignment.Left); } } }
private void OpenButtonMenu(MessageBoxExButton b) { if (b.Button is Button btnCtl) { if (b.DropDownPlacement == DropDownPlacement.Left) { b.ContextMenu.Show(btnCtl, new Point(0, btnCtl.Height)); } else if (b.DropDownPlacement == DropDownPlacement.Right) { b.ContextMenu.Show(btnCtl, new Point(btnCtl.Width, btnCtl.Height), ToolStripDropDownDirection.BelowLeft); } } }