private void OnRenderedSplitButtonBackground(object sender, ToolStripItemRenderEventArgs e)
        {
            // inject drawing of a checked 'button' into the rendering pipeline
            DropDownButtonToolbarItem clickItem = e.Item as DropDownButtonToolbarItem;

            if (clickItem != null && _fakeButton.Checked)
            {
                base.Parent.Renderer.DrawButtonBackground(new ToolStripItemRenderEventArgs(e.Graphics, clickItem._fakeButton));
            }
        }
Exemple #2
0
 public static IActionView CreateDropDownButtonActionView()
 {
     return(new StandardWinFormsActionView(
                delegate(IActionViewContext context)
     {
         DropDownButtonToolbarItem item = new DropDownButtonToolbarItem((IClickAction)context.Action, context.IconSize);
         context.IconSizeChanged += delegate { item.IconSize = context.IconSize; };
         return item;
     }));
 }
 public FakeToolstripButton(DropDownButtonToolbarItem owner)
 {
     _owner = owner;
 }