How to: Add and Customize the Ribbon Skin List and Skin Gallery

皮肤列表和皮肤库允许用户选择皮肤。本文介绍如何在功能区中显示“皮肤列表”或“皮肤库”并对其进行自定义。
DevExpress演示中心中的大多数应用程序都允许您选择皮肤。例如,运行XtraGrid演示并导航到皮肤功能区页面以更改当前皮肤。
在这里插入图片描述

在功能区UI中显示皮肤列表或皮肤库

使用以下栏项将相应的UI元素添加到功能区UI:“Skin List, Skin Gallery”、“Skin Palette List”和“Skin Palette Gallery”。在RibbonPageGroup上单击鼠标右键,然后调用相应的命令在设计时添加“ Skin List ”或“Skin Gallery”。
在这里插入图片描述

Skin List

A Skin List (SkinDropDownButtonItem) is a drop-down menu that displays application skins.
在这里插入图片描述

Skin Gallery

A Skin Gallery (SkinRibbonGalleryBarItem) is an in-ribbon gallery that displays skins. Skins in the gallery are grouped into categories.
在这里插入图片描述

Skin Palette List

A Skin Palette List (SkinPaletteDropDownButtonItem) allows users to select a color palette for a vector skin.
在这里插入图片描述

Skin Palette Gallery

A Skin Palette Gallery (SkinPaletteRibbonGalleryBarItem) allows users to select a color palette in an embedded or dropdown gallery.
在这里插入图片描述

Example

在这里插入图片描述

using DevExpress.XtraBars;
using DevExpress.XtraBars.Ribbon;

namespace DXApplication20 {
   
    public partial class Form1 : RibbonForm {
   
        public Form1() {
   
            InitializeComponent();
            skinPageGroup.ItemLinks.Add(new SkinDropDownButtonItem());
            skinPageGroup.ItemLinks.Add(new SkinRibbonGalleryBarItem());
            colorPalettePageGroup.ItemLinks.Add(new SkinPaletteDropDownButtonItem());
            colorPalettePageGroup.ItemLinks.Add(new SkinPaletteRibbonGalleryBarItem());
        }
    }
}

Display Advanced Skin Options

显示高级skin选项

以下示例演示如何显示与高级皮肤设置相对应的预先设计的功能区UI命令:

在这里插入图片描述

using DevExpress.XtraBars;
using DevExpress.XtraBars.Helpers;

namespace DXRibbonSkinSekector {
   
    public partial class Form1 : DevExpress.XtraBars.Ribbon.RibbonForm {
   
        BarCheckItem bciTrackWindowsAppMode, bciOriginalPalette, bciTrackWindowsAccentColor;
        BarButtonItem bbiSystemAccentColor, bbiAccentCustomColor2;
        public Form1() {
   
            InitializeComponent();

            bciTrackWindowsAppMode = new BarCheckItem();
            bciOriginalPalette = new BarCheckItem();
            bciTrackWindowsAccentColor = new BarCheckItem()
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值