为什么我在 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);