zoukankan      html  css  js  c++  java
  • 如何一个方法响应多个控件

    private void BarButtonItem_ItemClick(object sender, DevExpress.Xpf.Bars.ItemClickEventArgs e) {
                BarButtonItem barItem = sender as BarButtonItem;
                if(barItem == null) return;
                string groupName = barItem.Content as string;
    
                treeList.BeginDataUpdate();
                foreach(Employee empl in view.SelectedRows)
                    empl.GroupName = groupName;
                treeList.EndDataUpdate();
            }
    <dxg:TreeListView.RowCellMenuCustomizations>
                            <dxb:BarButtonItem Content="Executive General and Administration" Glyph="/TreeListDemo;component/Images/Categories/Administration.png"
                                               ItemClick="BarButtonItem_ItemClick" />
                            <dxb:BarButtonItem Content="Sales and Marketing" Glyph="/TreeListDemo;component/Images/Categories/Sales.png" 
                                               ItemClick="BarButtonItem_ItemClick" />
                            <dxb:BarButtonItem Content="Inventory Management" Glyph="/TreeListDemo;component/Images/Categories/Inventory.png" 
                                               ItemClick="BarButtonItem_ItemClick" />
                            <dxb:BarButtonItem Content="Research and Development" Glyph="/TreeListDemo;component/Images/Categories/Research.png" 
                                               ItemClick="BarButtonItem_ItemClick" />
                            <dxb:BarButtonItem Content="Manufacturing" Glyph="/TreeListDemo;component/Images/Categories/Manufacturing.png" 
                                               ItemClick="BarButtonItem_ItemClick" />
                            <dxb:BarButtonItem Content="Quality Assurance" Glyph="/TreeListDemo;component/Images/Categories/Quality.png" 
                                               ItemClick="BarButtonItem_ItemClick" />
                        </dxg:TreeListView.RowCellMenuCustomizations>

    看到就应该明白了吧

  • 相关阅读:
    cmd 窗口中运行 Java 程序
    局部变量保证线程安全
    AQS源码详细解读
    理解 Java 内存模型的因果性约束
    高性能Java序列化框架Fse发布
    心跳与超时:高并发高性能的时间轮超时器
    支持内部晋升的无锁并发优先级线程池
    最终一致性:BASE论文笔记
    Activiti架构分析及源码详解
    理解OAuth2
  • 原文地址:https://www.cnblogs.com/rarator/p/3197848.html
Copyright © 2011-2022 走看看