ADAdministrator Syncfusion Team August 19, 2004 01:05 PM
You could use the XPToolBar.Items'' CollectionChanged event for this purpose as shown in the code below :
this.xpToolBar1.Items.CollectionChanged += new CollectionChangeEventHandler(BarItemsCollection_Changed);
private void BarItemsCollection_Changed (object sender, CollectionChangeEventArgs args)
if (args.Action == CollectionChangeAction.Add)
else if (args.Action == CollectionChangeAction.Remove)
Please refer to the sample attached here that shows how this can be done, and let me know if you need further assistance. We appreciate your interest in Syncfusion products.
AGAntonio GanciAugust 19, 2004 11:53 PM
Thanks for the answer but when I add a BarItem from the CustomizationDialog by drag and drop the collection fire the message with Action = Refresh so I don''t know which item is added. If I remove or add an Item from the ''Add or Remove Buttons'' menu it doesn''t fire the event.
ADAdministrator Syncfusion Team August 23, 2004 11:33 AM
To accomodate your request, we have now changed the following public methods to public virtual methods in the MainFrameBarManager.
/* This will be called when the user toggles the visibility of a BarItem through the “Add Remove Buttons” menu */
public virtual void SetUserVisibilityPreferenceInBar(BarItem barItem, Bar bar, bool showOrHide)
/* This will be called when the user adds a BarItem to a Bar or ParentBarItem */
public virtual void RecordInsert(BarItem sourceItem, BarItem adjacentItem, IBarItemContainer destination, bool beforeOrAfter)
/* This will be called when the user removes a BarItem from a Bar or ParentBarItem */
public virtual void RecordRemove(BarItem sourceItem, IBarItemContainer destination)
So, if these methods are overridden they will be called when the you perform the respective actions. Note that these changes are still internal and will be available in the next release of Essential Suite (post v126.96.36.199 releases). Thanks for your continued interest in Syncfusion products.
AGAntonio GanciAugust 24, 2004 05:54 AM
Thank you. When do you think to release the next version of SyncFusion?
ADAdministrator Syncfusion Team August 24, 2004 07:42 AM
Typically, we release a new build of Essential Suite once in every 3-4 weeks. The above features will be available in our next release. Please create a Direct-Trac incident in this regard, and I will update you when our next build is available. We appreciate your continued interest inSyncfusion products.