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

ParentBarItem - Selected item

Thread ID:





119314 Jun 4,2015 10:04 AM UTC Jun 5,2015 10:42 AM UTC WinForms 1
Tags: FAQ
Shiri T
Asked On June 4, 2015 10:04 AM UTC

I have ParentBarItem with several items, how do i know which item is currently selected?

Shiri T

Senthil Kumaran Rajan [Syncfusion]
Replied On June 5, 2015 10:42 AM UTC

Hi Shiri,

Thank you for using Syncfusion products.

This reported requirement can be achieved by handling below events.

·         MouseDown – This event triggers when user click on the ParentBarItem.

·         Selected – This Event triggers when the user selects a ParentBarItem using Mouse or Keyboard.

·         ItemClicked – This Event fires when user click on the BarItem

Please make use of the code snippets given below for your reference. We have also prepared a sample for your reference that can be downloaded from the following location.

Code Snippet[C#]:

   //This event triggers while we click on any parentBarItems in MainFrameBarManager

        void ParentBarItem_MouseDown(object sender, MouseEventArgs e)


            if (sender is ParentBarItem)

                listBox1.Items.Add((sender as ParentBarItem).Text);


        //It is handled when the user selects a BarItem during menu navigation using mouse or keyboard.        

        void ParentBarItem_Selected(object sender, EventArgs e)


              if (sender is ParentBarItem)

                listBox1.Items.Add((sender as ParentBarItem).Text);


        void mainFrameBarManager1_ItemClicked(object sender, Syncfusion.Windows.Forms.Tools.XPMenus.BarItemClickedEventArgs args)


            //ItemClicked event get triggered when we select any BarItem in MainFrameBarManager



Sample Location : http://www.syncfusion.com/downloads/support/directtrac/139886/ze/CheckParentBarItem-1414253171

Please refer the below UG documentation link for your further reference.

UG Link : http://help.syncfusion.com/ug/windows%20forms/index.html#!Documents/eventsofparentbaritem.htm

Could you please check with the above solution and let us know if it matches your requirement? Otherwise please share us more details about this reported requirement. That will be helpful for us to analyze and provide prompt solution as earlier as possible.

Please let us know if you need further assistance.



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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

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