How to customize Skin Gallery - Remove / rename skins and groups
1. REMOVE (HIDE) A SPECIFIC SKIN
Traverse through the gallery group collection, then through its gallery item collection and hide a corresponding item:
private void InitRibbonSkinGallery() {
SkinHelper.InitSkinGallery(skinGalleryBarItem);
} string[] skinsToHide = {"Black","Blue","Seven","Sharp" }; // populate with names of unnecessary skins
private void HideSkins(string[] skinsToHide) {
for(var i = ; i < skinGalleryBarItem.Gallery.Groups.Count; i++) {
var group = skinGalleryBarItem.Gallery.Groups[i];
if(group == null) {
continue;
}
for(var j = ; j < group.Items.Count; j++) {
var item = group.Items[j];
if(item == null) {
continue;
}
foreach(var skin in skinsToHide) {
if(String.Equals(item.Caption, skin)) {
item.Visible = false;
}
}
}
}
}
Private Sub InitRibbonSkinGallery()
SkinHelper.InitSkinGallery(skinGalleryBarItem)
End Sub Private skinsToHide() As String = {"Black","Blue","Seven","Sharp" } 'populate with names of unnecessary skins
Private Sub HideSkins(ByVal skinsToHide() As String)
For i = To skinGalleryBarItem.Gallery.Groups.Count -
Dim group = skinGalleryBarItem.Gallery.Groups(i)
If group Is Nothing Then
Continue For
End If
For j = To group.Items.Count -
Dim item = group.Items(j)
If item Is Nothing Then
Continue For
End If
For Each skin In skinsToHide
If String.Equals(item.Caption, skin) Then
item.Visible = False
End If
Next skin
Next j
Next i
End Sub
This is discussed in the How to remove certain skins from the bonus skins collection ticket.
2. REMOVE A SPECIFIC SKIN GROUP
Remove a required group from the collection:
string skinGroup = "Standard Skins";
RemoveSkinGroups(skinGroup); void RemoveSkinGroups(string skinGroup) {
skinGalleryBarItem.Gallery.Groups.Remove(skinGalleryBarItem.Gallery.Groups.OfType<GalleryItemGroup>().First(x => String.Equals(x.Caption, skinGroup)));
}
Private skinGroup As String = "Standard Skins"
RemoveSkinGroups(skinGroup) void RemoveSkinGroups(String skinGroup)
skinGalleryBarItem.Gallery.Groups.Remove(skinGalleryBarItem.Gallery.Groups.OfType(Of GalleryItemGroup)().First(Function(x) String.Equals(x.Caption, skinGroup)))
This issue is discussed in the How to remove the "Theme Skin" skin group from the In-Ribbon gallery populated with available skins thread.
3. REMOVE GROUPING
Fill the In-Ribbon and In-Dropdown gallery with required skins manually.
To obtain all available skins in your project, use the SkinManager.Skinsproperty. To populate the In-Dropdown gallery, handle theRibbonGalleryBarItem.GalleryInitDropDownGalleryevent:
DevExpress.XtraBars.RibbonGalleryBarItem skinGalleryBarItem;
SkinContainerCollection skins; void InitSkinGallery() {
//SkinHelper.InitSkinGallery(skinGalleryBarItem, true);
skins = SkinManager.Default.Skins; for (int i = ; i < ; i++) {
int index = rgbiSkins.Gallery.Groups[].Items.Add(new GalleryItem());
GalleryItem item = skinGalleryBarItem.Gallery.Groups[].Items[index];
item.Description = skins[index].SkinName;
item.Image = galleryImageCollection.Images[i];
}
} private void skinGalleryBarItem_GalleryInitDropDownGallery(object sender, InplaceGalleryEventArgs e) {
e.PopupGallery.AllowHoverImages = false;
e.PopupGallery.ItemClick += new GalleryItemClickEventHandler(PopupGallery_ItemClick);
for (int i = ; i < e.PopupGallery.Groups[].Items.Count; i++) {
GalleryItem item = e.PopupGallery.Groups[].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;
}
Private skinGalleryBarItem As DevExpress.XtraBars.RibbonGalleryBarItem
Private skins As SkinContainerCollection Private Sub InitSkinGallery()
'SkinHelper.InitSkinGallery(skinGalleryBarItem, true);
skins = SkinManager.Default.Skins For i As Integer = To
Dim index As Integer = rgbiSkins.Gallery.Groups().Items.Add(New GalleryItem())
Dim item As GalleryItem = skinGalleryBarItem.Gallery.Groups().Items(index)
item.Description = skins(index).SkinName
item.Image = galleryImageCollection.Images(i)
Next i
End Sub Private Sub skinGalleryBarItem_GalleryInitDropDownGallery(ByVal sender As Object, ByVal e As InplaceGalleryEventArgs)
e.PopupGallery.AllowHoverImages = False
AddHandler e.PopupGallery.ItemClick, AddressOf PopupGallery_ItemClick
For i As Integer = To e.PopupGallery.Groups().Items.Count -
Dim item As GalleryItem = e.PopupGallery.Groups().Items(i)
item.Description = skins(i).SkinName
item.Caption = skins(i).SkinName
Next i
End Sub
Private Sub PopupGallery_ItemClick(ByVal sender As Object, ByVal e As GalleryItemClickEventArgs)
defaultBarAndDockingController1.Controller.LookAndFeel.SkinName = e.Item.Description
End Sub
See Skin Gallery - How to remove skin grouping ticket to learn more.
4. CHANGE A SKIN NAME
Traverse through the gallery group collection, then through its gallery item collection, obtain a required GalleryItem and change the GalleryItem.Caption property for this purpose.
See How to change/remove the DevExpress Style caption from the Skin Menu/Drop-down gallery for more information.
5. CHANGE A SKIN ICON
Traverse through the gallery group collection, then through its gallery item collection, obtain a required GalleryItem and set the Image and HoverImage properties.
See Skin Gallery - How to change a skin icon (image) and name (caption) for more information.
How to customize Skin Gallery - Remove / rename skins and groups的更多相关文章
- link,unlink,remove, rename函数
link函数:创建一个指向现有文件的链接的方法是使用 个人理解为cp命令 #include <unistd.h> int link( const char *existingpath, c ...
- COC建筑拖动的实现
最近在玩COC,多体验一下手游的体验,因为自己毕竟一直是做页游的,有些观念需要转变一下. 好像偏了,玩了几次之后突然想起COC那个地图拖动的自己之前实现过,那是2010年左右的时候,模拟经营类页游大行 ...
- 01:adminLTE2基本使用
1.1 adminLTE介绍 1.adminLTE 介绍 1.基于Bootstrap3高度可定制的响应式管理模板,免去前端架构师大量的js和css的编写 2.adminLTE除了可以使用bootstr ...
- 巨蟒python全栈开发-第11阶段 ansible_project2
一个NB的网站: https://www.toolfk.com/ CDN:将用户的需求送到最近的节点:内容分发网络 有些是专门做CDN的工具 常用的markdown是需要知道的,短信有字数限制. we ...
- Python标准模块--import
1 模块简介 作为一个Python初学者,你首先要学会的知识就是如何引入其它模块或者包.但是,我发现有些开发者虽然使用Python很多年,依然不了解Python引入机制的灵活性.这篇文章,我们就会研究 ...
- git版本控制管理实践-4
vcs: version control system 版本控制系统 local vcs, 集中式版本控制系统: centralized vcs; 分布式vcs: distributed vcs Lo ...
- DataTables样式
Styling 官方链接 AdminLTE HTML代码 <div class="row"> <div class="col-xs-12"&g ...
- Mysql 关键字及保留字
Table 10.2 Keywords and Reserved Words in MySQL 5.7 ACCESSIBLE (R) ACCOUNT[a] ACTION ADD (R) AFTER A ...
- NFS工作原理及配置文件详解
nfs工作原理流程 如上图所示,当访问程序通过NFS客户端向NFS服务端存取文件时,其请求数据流程如下几点: 1.首先用户访问网站程序,由程序在NFS客户端上发出NFS文件存取功能 ...
随机推荐
- RabbitMQ消息可靠性分析 - 简书
原文:RabbitMQ消息可靠性分析 - 简书 有很多人问过我这么一类问题:RabbitMQ如何确保消息可靠?很多时候,笔者的回答都是:说来话长的事情何来长话短说.的确,要确保消息可靠不只是单单几句就 ...
- 2015 Multi-University Training Contest 7 hdu 5372 Segment Game
Segment Game Time Limit: 3000/1500 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Tota ...
- 洛谷 P2932 [USACO09JAN]地震造成的破坏Earthquake Damage
P2932 [USACO09JAN]地震造成的破坏Earthquake Damage 题目描述 Wisconsin has had an earthquake that has struck Farm ...
- 浅析Mysql InnoDB存储引擎事务原理
浅析Mysql InnoDB存储引擎事务原理 大神:http://blog.csdn.net/tangkund3218/article/details/47904021
- [debug]重定义默认參数
编敲代码过程中遇到重定义默认參数的错误,例如以下例所看到的: #include<iostream> #include<stdlib.h> using namespace std ...
- Linux 截图
方法一:快捷键截图 对整个屏幕截图: PrintScreen 对活动窗体截图: Alt+PrintScreen 对随意矩形截图: Shift+PrintScreen 以上三个快捷键再加上Ctrl.就会 ...
- 浅谈SaaS应用开发的难度
近期做SaaS应用的非常多,这样的模式是未来的一种趋势,这样的模式的最大优点就是云计算的优点--节约资源.网上有非常多人觉得SaaS非常easy,就是一个多用户租赁模式.这样的认识也不能说不正确.由于 ...
- nyoj--514--1的个数(贪心)
1的个数 时间限制:1000 ms | 内存限制:65535 KB 难度:3 描述 给你两个数a和b,你的任务是计算出1在a和b之间出现的次数,比如说,如果a=1024,b=1032,那么a ...
- CodeForces ---596B--Wilbur and Array(贪心模拟)
Wilbur and Array Time Limit: 2000MS Memory Limit: 262144KB 64bit IO Format: %I64d & %I64u Su ...
- Defining and using constants from PySide in QML
Defining and using constants from PySide in QML This PySide tutorial shows you how to define constan ...