zoukankan      html  css  js  c++  java
  • Dev控件 galleryControl

    发现一个规律,不会的控件先拖到界面上,右上角需要add 的就对应add一个。然后就是找属性和集合手动添加几个。

    然后把XXXForm.Designer.cs 里面的代码提取到逻辑代码中,就把常量换成变量就好了。

    以galleryControl 为例

    //DevExpress.XtraBars.Ribbon.GalleryItem item = new DevExpress.XtraBars.Ribbon.GalleryItem(global::WFInfoSetControlModule.Properties.Resources.u1136, "111asda", "dsafasdfsad");
    //item.ImageIndex = 0; item.HoverImageIndex = 0;
    //this.galleryControl1.Gallery.Groups[0].Items.Add(item);
    //DevExpress.XtraBars.Ribbon.GalleryItem itema = new DevExpress.XtraBars.Ribbon.GalleryItem(global::WFInfoSetControlModule.Properties.Resources.u1136, "111sfsafasda", "dsafassadfsadfsad");
    //itema.ImageIndex = 1; itema.HoverImageIndex = 1;
    //this.galleryControl1.Gallery.Groups[0].Items.Add(itema);
    //DevExpress.XtraBars.Ribbon.GalleryItem itemaa = new DevExpress.XtraBars.Ribbon.GalleryItem(global::WFInfoSetControlModule.Properties.Resources.u1136, "111sadfsadfasda", "dsafasdfsad");
    //itemaa.ImageIndex = 2; itemaa.HoverImageIndex = 2;
    //this.galleryControl1.Gallery.Groups[0].Items.Add(itemaa);
    DevExpress.XtraBars.Ribbon.GalleryItemGroup galleryItemGroup1 = new DevExpress.XtraBars.Ribbon.GalleryItemGroup();

    DevExpress.XtraBars.Ribbon.GalleryItem galleryItem1 = new DevExpress.XtraBars.Ribbon.GalleryItem();
    DevExpress.XtraBars.Ribbon.GalleryItem galleryItem2 = new DevExpress.XtraBars.Ribbon.GalleryItem();
    galleryItem1.Caption = "Item1";
    galleryItem1.Image = global::WFInfoSetControlModule.Properties.Resources.u1138;
    galleryItem2.Caption = "Item2";
    galleryItem2.Image = global::WFInfoSetControlModule.Properties.Resources.u1136;
    galleryItemGroup1.Items.AddRange(new DevExpress.XtraBars.Ribbon.GalleryItem[]
    {
    galleryItem1,
    galleryItem2});
    galleryItemGroup1.Caption = "Group1";

    this.galleryControl1.Gallery.Groups.AddRange(new DevExpress.XtraBars.Ribbon.GalleryItemGroup[] {
    galleryItemGroup1});

    上面注释的是自己猜的。始终搞不定。最后用了上面的方法。对您有用的点击下面该点的给个赞吧。

  • 相关阅读:
    如何将latex格式转换成word? Lei
    SEWM2012会议报告总结 Lei
    matlab图片到word的过程 Lei
    日记——有点郁闷的一天
    牛博国际开放了,等了一个月才能看牛博。
    做什么事都没有兴趣呢,怎么这么低调呢?
    读UML书
    firefox弹出窗口关闭时执行代码刷新父窗口
    终于关注了一下传说中的小强,firebug
    MOSS Export Site Column/Site Content Type
  • 原文地址:https://www.cnblogs.com/wwwzzg168/p/3808148.html
Copyright © 2011-2022 走看看