1. texteditor (baredititem) takes the text
String editvalue = baredititem1.editvalue. tostring (); // error, return null
String editvalue = (devexpress. xtraeditors. textedit) baredititem). editvalue. tostring (); // correct, return the text box content 2. comboboxedit (baredititem) Add item
String item = "comboboxitem1 ";
(Devexpress. xtraeditors. repository. repositoryitemcombobox) This. baredititem. Edit). Items. Add (item); 3. comboboxedit (baredititem) Fetch text
String itemvalue = This. baredititem. editvalue. tostring (); 4. ribbon Control
// Add page
Devexpress. xtrabars. ribbon. ribbonpage = new ribbonpage ();
Ribboncontrol. pages. Add (ribbonpage );
// Add a group
Devexpress. xtrabars. ribbon. ribbonpagegroup = new ribbonpagegroup ();
Ribbonpage. Groups. Add (ribbonpagegroup );
// Add a button
Devexpress. xtrabars. barbuttonitem = new barbuttonitem ();
Ribbonpagegroup. itemlinks. Add (barbuttonitem );
// Add barsubitem
Devexpress. xtrabars. barsubitem = new barsubitem ();
Ribbonpagegroup. itemlinks. Add (barsubitem );
// Add a button under barsubitem
Barsubitem. additem (barbuttonitem );
// Strange page deletion Problem
While (this. ribboncontrol. pages. Count> 0)
{
Ribboncontrol. pages. Remove (ribboncontrol. Pages [0]); // The debugging is normal and an exception is reported during running.
}
While (this. ribboncontrol. pages. Count> 0)
{
Ribboncontrol. selectedpage = ribboncontrol. Pages [0];
Ribboncontrol. pages. Remove (ribboncontrol. selectedpage); // normal operation
}
// Disable the F10 Key Tips
Ribboncontrol. Manager. usef10keyformenu = false;
// DX button
Applicationicon attribute change icon
Right-click Add applicationmenu to add evexpress. xtrabars. ribbon. applicationmenu5.hitinfo
// Right-click the event response on the tab page
Void xtratabbedmdimanager_event (Object sender, mouseeventargs E)
{
If (E. Button = mousebuttons. Right & activemdichild! = NULL)
{
Devexpress. xtratab. viewinfo. basetabhitinfo HINFO = xtratabbedmdimanager. calchitinfo (E. Location );
// Right-click position: on the page and not in the close button
If (HINFO. isvalid & HINFO. Page! = NULL &&! HINFO. inpageclosebutton)
{
This. popupmenu. showpopup (control. mouseposition); // The cursor is displayed, instead of E. location.
}
}
}
// Right-click the Event Response on ribbon.
Private void ribboncontrol1_showcustomizationmenu (Object sender, ribboncustomizationmenueventargs E)
{
// Disable the context menu of the original system
E. showcustomizationmenu = false;
// Right-click on barbuttonitem
If (E. hitinfo! = NULL
& Amp; E. hitinfo. initem
& E. hitinfo. item. item is barbuttonitem)
{
This. popupmenu. showpopup (control. mouseposition );
}
// Right-click the position on the barbuttonitem
Else if (E. Link! = NULL
& Amp; E. Link. item! = NULL
& E. Link. item is barbuttonitem)
{
This. popupmenu. showpopup (control. mouseposition );
}
} 6. Skin
// Register the skin after adding the skin assembly
Devexpress. userskins. officeskins. Register ();
Devexpress. userskins. bonusskins. Register ();
// Set skin
Devexpress. lookandfeel. userlookandfeel. Default. setskinstyle ("liquid sky"); // If the skin name is incorrect, set it by default (the first skin)
// Set the galleryfiltermenupopup event to "all groups" in the pop-up filter menu to Chinese.
Private void rgbiskins_galleryfiltermenupopup (Object sender, galleryfiltermenueventargs E)
{
E. filtermenu. itemlinks [N]. Caption = "all skins"; // n = number of groups + 1
}
// Galleryinitdropdowngallery event settings
Private void rgbiskins_galleryinitdropdowngallery (Object sender, inplacegalleryeventargs E)
{
E. popupgallery. filtercaption = "all skins ";
7.doc kmanager
Save the view status information to an XML file.
Dockmanager1.savelayouttoxml (".. \ userconfig \ viewinfo. xml ");
Export the saved status information in XML
Dockmanager1.restorelayoutfromxml (".. \ userconfig \ viewinfo. xml"); 8. barmanager
Set the font and system font of Bar
Baranddockingcontroller1.appearancesbar. itemsfont = new font (this. Font. fontfamily, currentfontsize); 9. Set the system font
Devexpress. utils. appearanceobject. defaultfont = new font (this. Font. fontfamily, currentfontsize); 10. Treeview
Right-click the tree node and select the node
Private void treelist1_mousedown (Object sender, mouseeventargs E)
{
If (E. Button = mousebuttons. Right)
{
Devexpress. xtratreelist. treelisthitinfo HI = treelist1.calchitinfo (E. Location );
If (Hi. node! = NULL & hi. node. imageindex = 5) // The imageindex of the leaf node = 5
{
Treelistnode node = treelist1.findnodebyid (Hi. node. ID );
Treelist1.focusednode = node;
This. popupmenu1.showpopup (mouseposition );
}
}
}