Exemplo n.º 1
0
 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);
         }
     }
 }
Exemplo n.º 2
0
 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);
         }
     }
 }