If your context menu ContexMenuStrip, you can create an element this way:
[ToolStripItemDesignerAvailability(ToolStripItemDesignerAvailability.MenuStrip |
ToolStripItemDesignerAvailability.ContextMenuStrip)]
public class TrackBarMenuItem : ToolStripControlHost
{
private TrackBar trackBar;
public TrackBarMenuItem():base(new TrackBar())
{
this.trackBar = this.Control as TrackBar;
}
}
Thanks to the attribute, ToolStripItemDesignerAvailabilityyou can even see an element in Forms Designer, as shown in the figure below:

PS
This solution comes from this MSDN example
source
share