Back to Devexpress

How To: Add Custom Buttons to the Breadcrumb Edit Control

windowsforms-114782-controls-and-libraries-editors-and-simple-controls-breadcrumb-edit-control-how-to-add-custom-buttons-to-the-breadcrumb-edit-control.md

latest1.3 KB
Original Source

How To: Add Custom Buttons to the Breadcrumb Edit Control

  • Oct 29, 2020
  • 2 minutes to read

This tutorial will demonstrate how to populate the Breadcrumb Edit Control with custom buttons.

  1. Create three EditorButton objects and customize their settings. Set the EditorButton.Kind property to Glyph if you want your buttons to use custom icons.

  2. Add your custom buttons to the editor’s RepositoryItemButtonEdit.Buttons collection. To remove the predefined button that invokes the editor history, call the Clear method for the button collection.

  3. To respond to an end-user clicking your buttons handle the RepositoryItemButtonEdit.ButtonClick event. Use button captions to identify which button was clicked and perform required actions. In this examples, the first button serves to navigate back to the previous path, the second button adds the current path to the editor’s history and the third button invokes the editor’s drop-down menu with history items.

  4. Launch your application. The animation below illustrates the result.