编程那点事编程那点事

专注编程入门及提高
探究程序员职业规划之道!

DevExpress如何隐藏皮肤分组?

之前,我们学会了如何隐藏DevExpress的部分皮肤,但是还是看到3个分组?有没有什么办法隐藏3个分组呢?

我们直接看效果吧,看到了吗?DevExpress的皮肤分组直接没有了。

DevExpress隐藏皮肤分组

程序的运行效果如下图所示

DevExpress如何换肤

以下是具体代码

SkinContainerCollection skins;
        void InitSkinGallery()
        {
            skins = SkinManager.Default.Skins;
            for (int i = 0; i < 14; i++)
            {
                int index = ribbonGalleryBarItem1.Gallery.Groups[0].Items.Add(new GalleryItem());
                GalleryItem item = ribbonGalleryBarItem1.Gallery.Groups[0].Items[index];
                item.Description = skins[index].SkinName;
                item.Image = SkinCollectionHelper.GetSkinIcon(item.Description, SkinIconsSize.Small);
                item.Hint = skins[i].SkinName;
            }
        }

        private void rgbiSkins_GalleryInitDropDownGallery(object sender, InplaceGalleryEventArgs e)
        {
            e.PopupGallery.AllowHoverImages = false;
            for (int i = 0; i < e.PopupGallery.Groups[0].Items.Count; i++)
            {
                GalleryItem item = e.PopupGallery.Groups[0].Items[i];
                item.Description = skins[i].SkinName;
                item.Caption = skins[i].SkinName;
                item.Hint = skins[i].SkinName;

            }
        }


未经允许不得转载: 技术文章 » .NET编程 » DevExpress如何隐藏皮肤分组?