Select the tab control Click event, click the tab header, navigate to the options in the navigation bar, select the option for the DevExpress.XtraNavBar.NavBarControl navigation control to navigate or check the status of another navigation.

Source: Internet
Author: User

         /// <summary>        ///Select the tab control Click event, click the tab header, navigate to the options in the navigation bar, select the state/// </summary>        /// <param name= "Sender" ></param>        /// <param name= "E" ></param>        Private voidXtratabcontrol1_click (Objectsender, EventArgs e) {Xtratabcontrol obj= Sender asXtratabcontrol; DevExpress.XtraTab.XtraTabPage page=obj.            Selectedtabpage; stringswitch_on = page. Tag.tostring ();//tab, code for each tab            Switch(switch_on) { Case "2001": SelectItem (switch_on);  Break;  Case "2002": SelectItem (switch_on);  Break;  Case "2003": SelectItem (switch_on);  Break;  Case "2004": SelectItem (switch_on);  Break;  Case "2005": SelectItem (switch_on);  Break;  Case "2006": SelectItem (switch_on);  Break;  Case " -": SelectItem (switch_on);  Break; default:                     Break; }        }        /// <summary>        ///DevExpress.XtraNavBar.NavBarControl navigation controls to position or select States///Another option to navigate is selected/// </summary>        /// <param name= "Functioncode" >tag code, navigation items that need to be positioned</param>        Private voidSelectItem (stringFunctioncode)            {Console.WriteLine (Functioncode); varLength = This. NavBarControl1.Groups.Count;  for(intGroupindex =0; Groupindex < length; groupindex++)            {                varItemlength = This. Navbarcontrol1.groups[groupindex].                             Itemlinks.count;  for(intItemIndex =0; ItemIndex < Itemlength; itemindex++)                {                    varresult = This. Navbarcontrol1.groups[groupindex]. Itemlinks[itemindex].                     Item.Tag.ToString (); if(Result = =Functioncode) {                         This. Navbarcontrol1.groups[groupindex]. Expanded =true; Navbarcontrol1.groups[groupindex]. Selectedlinkindex=ItemIndex; return; }                                 }            }        }

Select the tab control Click event, click the tab header, navigate to the options for the navigation bar, select the option to navigate the DevExpress.XtraNavBar.NavBarControl navigation control, or select the state in which navigation is selected.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.