首页 新闻 会员 周边 捐助

DevExpress 皮肤设置问题

0
[已关闭问题] 关闭于 2010-03-23 17:04

为什么我在 program.cs里面加了 这段代码 在SkinManager.Default.Skins里还是只有默认的7个皮肤 没有office的几个皮肤

DevExpress.UserSkins.OfficeSkins.Register();
DevExpress.UserSkins.BonusSkins.Register();
DevExpress.Skins.SkinManager.EnableFormSkins();

我的代码是这样

代码
RibbonPageGroup rpg1 = new RibbonPageGroup();
rpg1.Name
= "rpg2";
rpg1.ShowCaptionButton
= false;
rpg1.Text
= "皮肤设置";
GalleryItemGroup gi
= new GalleryItemGroup();
gi.Caption
= "所有皮肤";
RibbonGalleryBarItem rgb
= new RibbonGalleryBarItem();
rgb.Caption
= "rgbi1";
rgb.Gallery.RowCount
= 4;
rgb.Gallery.AllowHoverImages
= true;
rgb.Gallery.FixedHoverImageSize
= false;
rgb.Gallery.Groups.AddRange(
new GalleryItemGroup[] { gi });
rgb.Gallery.ImageSize
= new System.Drawing.Size(32, 17);
rgb.Gallery.Appearance.ItemCaption.Options.UseFont
= true;
rgb.Gallery.ItemImageLocation
= DevExpress.Utils.Locations.Top;
rgb.Gallery.ColumnCount
= 4;
rgb.Gallery.InitDropDownGallery
+= new InplaceGalleryEventHandler(Gallery_InitDropDownGallery);
rgb.Gallery.ItemClick
+= new GalleryItemClickEventHandler(Gallery_ItemClick);
rgb.Name
= "rgbiSkin";

SimpleButton button
= new SimpleButton();
foreach (SkinContainer container in SkinManager.Default.Skins)
{
button.LookAndFeel.SetSkinStyle(container.SkinName);
GalleryItem item2
= new GalleryItem();
rgb.Gallery.Groups[
0].Items.Add(item2);
item2.Caption
= container.SkinName;
item2.Image
= this.GetSkinImage(button, 70, 36, 5);
item2.HoverImage
= this.GetSkinImage(button, 70, 36, 5);
item2.Caption
= container.SkinName;
item2.Hint
= container.SkinName;
}
rpg1.ItemLinks.Add(rgb);

 

 

Drin Chan的主页 Drin Chan | 初学一级 | 园豆:6
提问于:2010-03-20 10:20
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册