Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created January 2, 2017 20:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjoerntx/8e52597a7c0df63321a0e7262923b9b2 to your computer and use it in GitHub Desktop.
Save bjoerntx/8e52597a7c0df63321a0e7262923b9b2 to your computer and use it in GitHub Desktop.
// create a new RibbonItem
RibbonButton rbMyButton = new RibbonButton()
{
Text = "My RibbonButton",
LargeIcon = Image.FromFile("icons/clipboard.png"),
SmallIcon = Image.FromFile("icons/checkmark.png")
};
// attach Click event
rbMyButton.Click += RbMyButton_Click;
// create a new RibbonGroup
HorizontalRibbonGroup rgMyRibbonGroup = new HorizontalRibbonGroup()
{
Text = "My RibbonGroup",
ShowSeperator = false,
SmallIcon = Image.FromFile("icons/checkmark.png"),
LargeIcon = Image.FromFile("icons/clipboard.png"),
};
// add the RibbonItem to the RibbonGroup
rgMyRibbonGroup.RibbonItems.Add(rbMyButton);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment