Dev Common settings

Source: Internet
Author: User

    1. TextEditor (Baredititem) fetching textstringEditValue = BarEditItem1.EditValue.ToString ();//error, return null           stringEditValue = ((DevExpress.XtraEditors.TextEdit) baredititem). Editvalue.tostring ();//correct, return text box contents          2. Comboboxedit (Baredititem) Add Itemstringitem ="comboboxItem1"; ((DevExpress.XtraEditors.Repository.RepositoryItemComboBox) This. Baredititem.edit).            Items.Add (item); 3. Comboboxedit (Baredititem) fetching textstringItemvalue = This. barEditItem.EditValue.ToString (); 4. Ribbon Controls//Add PageDevExpress.XtraBars.Ribbon.RibbonPage Ribbonpage =NewRibbonpage ();      RIBBONCONTROL.PAGES.ADD (Ribbonpage); //Add GroupDevExpress.XtraBars.Ribbon.RibbonPageGroup Ribbonpagegroup =NewRibbonpagegroup ();      RIBBONPAGE.GROUPS.ADD (Ribbonpagegroup); //Add buttonDevExpress.XtraBars.BarButtonItem Barbuttonitem =NewBarbuttonitem ();      RIBBONPAGEGROUP.ITEMLINKS.ADD (Barbuttonitem); //Add BarsubitemDevExpress.XtraBars.BarSubItem Barsubitem =NewBarsubitem ();      RIBBONPAGEGROUP.ITEMLINKS.ADD (Barsubitem); //Add button under BarsubitemBarsubitem.additem (Barbuttonitem); //Strange Removal of page problems     while( This. RibbonControl.Pages.Count >0) {ribbonControl.Pages.Remove (ribboncontrol.pages[0]);//Debug Normal, run report exception    }       while( This. RibbonControl.Pages.Count >0) {Ribboncontrol.selectedpage= ribboncontrol.pages[0]; RibbonControl.Pages.Remove (Ribboncontrol.selectedpage); //operating normally    }      //prohibit F10 Key TipsRibbonControl.Manager.UseF10KeyForMenu =false; //dx buttonApplicationIcon Property Change Icon Right-click Add Applicationmenu evExpress.XtraBars.Ribbon.ApplicationMenu5. Hitinfo//Right-click event response on the tab page    voidXtratabbedmdimanager_event (Objectsender, MouseEventArgs e) {           if(E.button = = Mousebuttons.right && Activemdichild! =NULL) {DevExpress.XtraTab.ViewInfo.BaseTabHitInfo hInfo=Xtratabbedmdimanager.calchitinfo (e.location); //Right-click location: on page and not inside the Close button              if(Hinfo.isvalid &&! =NULL&&!Hinfo.inpageclosebutton) { This. Popupmenu.showpopup (Control.mouseposition);//pop in the mouse position instead of E. Location              }           }      }      //Right-click event Response on the Ribbon    Private voidRibboncontrol1_showcustomizationmenu (Objectsender, Ribboncustomizationmenueventargs e) {          //disable the original system right-click menuE.showcustomizationmenu =false; //Right-click Position: on Barbuttonitem        if(E.hitinfo! =NULL&&E.hitinfo.initem&& E.hitinfo.item.item isBarbuttonitem) {                This. Popupmenu.showpopup (control.mouseposition); }          //Right-click: on Barbuttonitem in Barsubitem        Else if(! =NULL&&! =NULL&& isBarbuttonitem) {                This. Popupmenu.showpopup (control.mouseposition); }      }            6. Skin//registering skins after adding skin assembliesDevExpress.UserSkins.OfficeSkins.Register ();      DevExpress.UserSkins.BonusSkins.Register (); //Set SkinDevExpress.LookAndFeel.UserLookAndFeel.Default.SetSkinStyle ("Liquid Sky");//If the skin name is wrong, press system default settings (first skin)//Galleryfiltermenupopup Event Settings Pop-up Filter menu "All Groups" is Chinese    Private voidRgbiskins_galleryfiltermenupopup (Objectsender, Galleryfiltermenueventargs e) {E.filtermenu.itemlinks[n]. Caption="All Skin";//n= Number of groups +1    }      //galleryinitdropdowngallery Event Settings Popup Skin list Header "All Groups" for Chinese    Private voidRgbiskins_galleryinitdropdowngallery (Objectsender, Inplacegalleryeventargs e) {e.popupgallery.filtercaption="All Skin"; }            7. Dockmanager Save the view's state information to an XML file Dockmanager1.savelayouttoxml (".. Userconfig//viewinfo.xml"); Export saved state information in XML Dockmanager1.restorelayoutfromxml (".. Userconfig//viewinfo.xml"); 8. Barmanager set the bar font and system font BarAndDockingController1.AppearancesBar.ItemsFont=NewFont ( This.            Font.fontfamily, currentfontsize); 9. Set the system font DevExpress.Utils.AppearanceObject.DefaultFont=NewFont ( This.            Font.fontfamily, currentfontsize); Tenthe. TreeView adds a right-click menu to the tree node and selects the nodePrivate voidTreelist1_mousedown (Objectsender, MouseEventArgs e) {                  if(E.button = =mousebuttons.right) {DevExpress.XtraTreeList.TreeListHitInfo hi=Treelist1.calchitinfo (e.location); if(Hi. Node! =NULL&& hi. Node.imageindex = =5)//leaf node ImageIndex = = 5{treelistnode node=Treelist1.findnodebyid (hi.                ; Treelist1.focusednode=node;  This. Popupmenu1.showpopup (mouseposition); }                  }              }  

Dev Common settings

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: 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.