If you like to have it “Auto Dropdown” whenever you are hover above the Main Button,
try add the following to the original code:
// Overrided this Method to support “Auto Dropdown”
protected override void OnMouseEnter(EventArgs e)
{
if (_AlwaysDropDown || MouseInSplit())
{
if (Enabled)
{
SetSplit(_ClickedImage);if (this.ContextMenuStrip != null && this.ContextMenuStrip.Items.Count > 0)
{
this.ContextMenuStrip.Show(this, new Point(0, Height));
}
}
}
else
{
if (Enabled)
{
SetSplit(_NormalImage);
}
}base.OnMouseEnter(e);
}
Via CodeProject: SplitButton: an XP style dropdown split button. Free source code and programming help
Advertisements