EditorButtonCollection.Assign(EditorButtonCollection) Method
Copies buttons from the specified EditorButtonCollection object to the current button collection.
Namespace: DevExpress.XtraEditors.Controls
Assembly: DevExpress.XtraEditors.v24.2.dll
Declaration
Parameters
Name | Type | Description |
---|---|---|
collection | EditorButtonCollection | The source button collection. |
Remarks
You can use the Assign method in order to have different button edit controls with the same buttons. For instance, if you have a button editor with customized buttons and you want to add these to another editor, then you can call Assign rather than adding the buttons one by one via the EditorButtonCollection.Add method.
The Assign method removes all buttons from the current button collection and then creates new buttons by copying button properties from the specified collection.
The following code copies buttons from the buttonEdit1 control to buttonEdit2: