Ticket Q485876
Visible to All Users

Skin Gallery - How to remove skin grouping

created 12 years ago

Hi,
I'm using SkinHelper.InitSkinGallery to
initialize a skin selector ribbon gallery. I use only some specific skins from
the gallery, so I hide the skins i don't want to use - I have a gallery with 6
specific skins. All this works fine, but 6 the skins are shown i 3 different
groups (standard, bonus, etc.).
How do I eliminate the groups or put the skins
in the same group? I have eliminated the group caption, but the items are still
shown i groups?

Thanks
Henrik Skak Pedersen

Answers approved by DevExpress Support

created 12 years ago (modified 12 years ago)

Hi,
The easiest way to achieve your goal is to fill the In-Ribbon and In-Dropdown gallery with required skins manually. To obtain all available skins in your project, use the SkinManager.Skins property. To populate the In-Dropdown gallery, handle the RibbonGalleryBarItem.GalleryInitDropDownGallery event.
Here is a sample code snippet that demonstrates how this task can be accomplished:

C#
SkinContainerCollection skins; void InitSkinGallery() { //SkinHelper.InitSkinGallery(rgbiSkins, true); skins = SkinManager.Default.Skins; for (int i = 0; i < 14; i++) { int index = rgbiSkins.Gallery.Groups[0].Items.Add(new GalleryItem()); GalleryItem item = rgbiSkins.Gallery.Groups[0].Items[index]; item.Description = skins[index].SkinName; item.Image = galleryImageCollection.Images[i]; } } private void rgbiSkins_GalleryInitDropDownGallery(object sender, InplaceGalleryEventArgs e) { e.PopupGallery.AllowHoverImages = false; e.PopupGallery.ItemClick += new GalleryItemClickEventHandler(PopupGallery_ItemClick); 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; } } void PopupGallery_ItemClick(object sender, GalleryItemClickEventArgs e) { defaultBarAndDockingController1.Controller.LookAndFeel.SkinName = e.Item.Description; }

I have created a sample based on your description. Please find it in the attachment.
I hope this solution will be helpful to you. Feel free to contact us if you have further difficulties. We are happy to help you at any time.

    Show previous comments (1)
    DevExpress Support Team 12 years ago

      I have reproduced the error you mentioned. I have tried to reload the sample, and now it is available for download.
      I'm glad to hear that my assistance was helpful to you. Thank you for informing us. We greatly appreciate your response.

      H H
      Henrik Skak Pedersen 12 years ago

        Hi again,
        Perfect, thank you very much for your help :-)
        Thanks
        Henrik

        DevExpress Support Team 12 years ago

          Thank you for informing us that the issue has been solved. Please do not hesitate to contact us in case of any difficulty. We will be happy to help you!

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.