DevExpress Ribbongallerybaritem選擇性皮膚重組


 

本人開發的開發者技術變現資源聚集地,大家支持下,下面是網址

https://www.baiydu.com

 

 

 1 void InitSkinGallery()  ()       {         
 2 
 3         SkinHelper skinHelper = new SkinHelper();             RibbonControl masterRibbonControl = new RibbonControl();
 4 
 5             RibbonGalleryBarItem tempRibbonGalleryItem = new RibbonGalleryBarItem(new BarManager());             //  masterRibbonControl.ApplicationButtonDropDownControl = tempRibbonGalleryItem;             SkinHelper.InitSkinGallery(tempRibbonGalleryItem);   //初始化各種控件皮膚的方法             SkinHelper.InitSkinGallery(ribbonGalleryBarItem1);             //customRibbonGrallery.Gallery.Groups.RemoveAt(1);             //customRibbonGrallery.Gallery.Groups.RemoveAt(2);
 6 
 7             GalleryItemGroupCollection Collection = tempRibbonGalleryItem.Gallery.Groups;             //MessageBox.Show(Collection.Capacity.ToString());             int TempIndex = 0;
 8 
 9             GalleryItemGroup SkinGroup = new GalleryItemGroup();
10 
11             foreach (GalleryItemGroup singleItemGroup in Collection)             {                 TempIndex++;
12 
13                 for (int i = 0; i < singleItemGroup.Items.Count; i++)                 {                     GalleryItem item = singleItemGroup.Items[i];
14 
15                     // GalleryItem itemx = new GalleryItem();
16 
17                     //  itemx.Caption = "";                     if (TempIndex == 1)                     {                         if (i == 0 || i == 5)                         {                             //textEdit1.Text = textEdit1.Text + "|" + item.Caption;                             SkinGroup.Items.Add(item);                         }                     }                     else if (TempIndex == 2)                     {                         if (i == 1 || i == 11 || i == 14)                         {                             // textEdit2.Text = textEdit2.Text + "|" + item.Caption;                             SkinGroup.Items.Add(item);                         }                     }                     else if (TempIndex == 3)                     {                         if (i == 2 || i == 3 || i == 4)                         {                             //textEdit3.Text = textEdit3.Text + "|" + item.Caption;                             SkinGroup.Items.Add(item);                         }                     }                     else                     {                     }
18 
19                 }             }             recombinationSkin.Gallery.Groups.Add(SkinGroup);             DefaultLookAndFeel Custom = new DefaultLookAndFeel();             Custom.LookAndFeel.SetSkinStyle("Office 2010 Blue");
20 
21  
22 
23  
24 
25                      //RibbonGralleryBarItem控件皮膚選擇事件
26         private void recombinationSkin_GalleryItemClick(object sender, GalleryItemClickEventArgs e)
27         {
28             string SkinValue=e.Item.Caption;
29            DefaultLookAndFeel Custom = new DefaultLookAndFeel();
30            Custom.LookAndFeel.SetSkinStyle(SkinValue);
31            
32         }
33 
34  
35 
36  

 

 本人創業做的一款androidApp, 下載量已經有2000多萬,各種當前熱門的網絡手機獎勵紅包全部集成,另外還有熱門電影和淘寶高額優惠券!很適合各類型的用戶。

  

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM