Skip to content

DevExpress-Examples/winforms-richedit-customize-insert-merge-field-menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rich Text Editor for WinForms - How to customize the "Insert Merge Field" menu

This example illustrates how to customize the Insert Merge Field menu to group merge field names with identical prefixes (Employees and Customers in this example) into submenus.

image

Implementation Details

The DataBindingController class generates menu items/subitems from the mail merge data source on the fly. These items are added to a popup menu.

When a custom menu item is clicked, the CustomInsertMergeFieldMenuItem.OnClick method is executed to insert the current merge field.

When you click the Insert Merge Field Ribbon item, the built-in Insert Merge Field form is shown.

Note that the custom Insert Merge Field Ribbon item uses resources (images) from the project's Images folder to initialize the BarButtomItem.LargeGlyph and BarButtonItem.Glyph properties. Customize the LargeGlyph and Glyph properties of the CustomInsertMergeFieldItem class to use another source for images.

Files to Review

Documentation

About

Customize the "Insert Merge Field" menu to group merge field names with identical prefixes into submenus.

Topics

Resources

License

Stars

Watchers

Forks