Hi,
I am using DevExpress Bonus skins to change the skin of my app,i dont want all the themes listed in the group,is any way to restrict skins provided or is any way to change the name of provided skins.
Thanks.
How to remove certain skins from the bonus skins collection
Answers approved by DevExpress Support
Hello,
To accomplish this task you can remove necessary items from RibbonGalleryBarItem.Gallery based on your own logic. To rename objects you can use an approach from the How to use a Skin Helper to populate a RibbonGalleryBarItem and PopupMenu with items corresponding to the DevExpress skins example. I hope this will be helpful for you. Should you have any further questions, feel free to contact me at any time.
can you please be more specific,how to remove/skip specific themes from the list,can u provide a sample solution to do this.
Thanks.
Hi,
You can use the following code to hide items in GalleryBarItem:
C#string[] skinsToHide = {"Black","Blue","Seven","Sharp" };
private void button1_Click(object sender, EventArgs e) {
for (int i = 0; i < ribbonGalleryBarItem1.Gallery.Groups.Count; i++) {
GalleryItemGroup group = ribbonGalleryBarItem1.Gallery.Groups[i];
for (int j = 0; j < group.Items.Count; j++) {
GalleryItem item = group.Items[j];
foreach (var skin in skinsToHide) {
if (item.Caption == skin) {
item.Visible = false;
}
}
}
}
}
Please try it and let me know if you have additional questions.
Hi Rajeev,
Would you please clarify what group you're talking about? Please record a video or make a screenshot of the issue you've faced. I hope to hear from you soon.
Attaching the screenshot of bonus skins provided,there are 3 groups in the listings,standard skins,bonus skins and theme skins,i want to restrict some of the skins from the list,and also i want to change the name of the skin while displaying it.any help is appreciated.
Thanks.