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文件存取功能 ...
随机推荐
- BZOJ 2631 [国家集训队]Tree II (LCT)
题目大意:给你一棵树,让你维护一个数据结构,支持 边的断,连 树链上所有点点权加上某个值 树链上所有点点权乘上某个值 求树链所有点点权和 (辣鸡bzoj又是土豪题,洛谷P1501传送门) LCT裸题, ...
- Spring IoC简介及使用
Spring根本任务 Spring的根本任务就是简化Java开发. 目前许多框架如果要使用他们,就必须要继承或实现这些框架的各种类.这使得框架与我们的程序耦合度过高.由于在我们的程序中加入了过多的框架 ...
- java的反射机制(重要)
1,反射的概念 JAVA反射机制是在运行状态中,对于任意一个类,都能够知道这个类的所有属性和方法:对于任意一个对象,都能够调用它的任意一个方法和属性:这种动态获取的信息以及动态调用对象的方法的功能称为 ...
- NYIST 1070 诡异的电梯【Ⅰ】
诡异的电梯[Ⅰ]时间限制:1000 ms | 内存限制:65535 KB难度:3 描述新的宿舍楼有 N(1≤N≤100000) 层 and M(1≤M≤100000)个学生. 在新的宿舍楼里, 为了节 ...
- spring boot约定优于配置的这种做法在如今越来越流行了
约定优于配置的这种做法在如今越来越流行了,它的特点是简单.快速.便捷.但是这是建立在程序员熟悉这些约定的前提上.而 Spring 拥有一个庞大的生态体系,刚开始转到 Spring Boot 完全舍弃 ...
- Springmvc Get请求Tomcat、WebLogic中文乱码问题
Springmvc Get请求Tomcat.WebLogic中文乱码问题 学习了:http://www.cnblogs.com/qingdaofu/p/5633225.html http://www. ...
- [ReactVR] Start a Virtual Reality Project Using the React VR CLI
We will learn how to set up a React VR project, run the development mode with hot reloading, and tak ...
- Linux网络编程(3)——多进程、多线程
在我的里面已经介绍了linux以下c的进程.线程接口,这里就不做过多阐述了. 多进程 这里多进程採用传统的多进程模型.每当有client发来的连接时创建一个进程来处理连接,一个子进程相应一个连接. 有 ...
- GCC 优化选项 -O1 -O2 -O3 -OS 优先级,-FOMIT-FRAME-POINTER(O3的优化很小,只增加了几条优化而已)
四种编译优化类型的解释: `-O ' `-O1 ' Optimize. Optimizing compilation takes somewhat ...
- Making ViewState More Secure
Unencrypted view state in ASP.NET 2.0 could leak sensitive information https://www.rapid7.com/db/vul ...