We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to detect when a user add a BarItem in the XPToolBar?

Thread ID:

Created:

Updated:

Platform:

Replies:

17913 Aug 19,2004 12:46 PM UTC Aug 24,2004 12:42 PM UTC WinForms 5
loading
Tags: Tools
Antonio Ganci
Asked On August 19, 2004 12:46 PM UTC

I need to ask to the user some information when it add a BarItem in a XPToolBar during a customization. Thanks.

Administrator [Syncfusion]
Replied On August 19, 2004 06:05 PM UTC

Hi Antonio, 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) MessageBox.Show("BarItem Added"); else if (args.Action == CollectionChangeAction.Remove) MessageBox.Show("BarItem Removed"); } 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. Regards, Guru Patwal Syncfusion, Inc.

Antonio Ganci
Replied On August 20, 2004 04:53 AM UTC

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. Antonio Ganci.

Administrator [Syncfusion]
Replied On August 23, 2004 04:33 PM UTC

Hi Antonio, 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 v2.1.0.9 releases). Thanks for your continued interest in Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.

Antonio Ganci
Replied On August 24, 2004 10:54 AM UTC

Thank you. When do you think to release the next version of SyncFusion? Antonio Ganci

Administrator [Syncfusion]
Replied On August 24, 2004 12:42 PM UTC

Hi Antonio, 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. Regards, Guru Patwal Syncfusion, Inc.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;