zoukankan      html  css  js  c++  java
  • WPF:ListView数据绑定及Style

    DrugRecordsWin.xaml

    <ListView Grid.Row="4" Grid.Column="1" Name="list_DrugDetails" Style="{StaticResource ListViewStyle}">
    <ListView.View>
    <GridView>

    <!--列头style-->
    <GridView.ColumnHeaderContainerStyle>
    <Style TargetType="GridViewColumnHeader">
    <Setter Property="Background" Value="CadetBlue"/>
    <Setter Property="Foreground" Value="White"/>
    <Setter Property="FontSize" Value="25"/>
    <Setter Property="Foreground" Value="White"/>
    <Setter Property="Padding" Value="5"/>
    </Style>
    </GridView.ColumnHeaderContainerStyle>

    <!--列头数据及绑定-->

    <GridViewColumn Header="药品Id" DisplayMemberBinding="{Binding Idm}"/>
    <GridViewColumn Header="药品名称" DisplayMemberBinding="{Binding DrugName}"/>
    <GridViewColumn Header="药品规格" DisplayMemberBinding="{Binding DrugSpec}"/>
    <GridViewColumn Header="数量" DisplayMemberBinding="{Binding Quantity}"/>
    <GridViewColumn Header="批次序号" DisplayMemberBinding="{Binding BatchXh}"/>
    <GridViewColumn Header="批号" DisplayMemberBinding="{Binding BatchNo}"/>
    </GridView>
    </ListView.View>
    </ListView>

    DrugRecordsWin.xaml.cs

    list_DrugDetails.ItemsSource=源

             /// <summary> 
            /// 双击list的某列时获取该列发要单的详细药品列表 
            /// </summary> 
            /// <param name="sender"></param> 
            /// <param name="e"></param> 
            private void list_BillDetails_MouseDoubleClick(object sender, MouseButtonEventArgs e) 
            { 
                var drugDetails = list_BillDetails.SelectedItem as WPF_OPDrug.DataOP.OutBillInfor; 
                int xh = drugDetails.Xh; 
                list_DrugDetails.ItemsSource = dataOP.GetOPDrugOutBillDataByBillXh(xh); 
            }
     
  • 相关阅读:
    xen4.4.2/xen-4.4.2/stubdom/vtpmmgr/README
    安装xen上的Ubuntu虚拟机的配置文件
    xen平台中vtpm的使用说明
    TPM学习笔记1-1
    通过TSS软件栈使用TPM——获取并改变TPM寄存器-学习笔记1
    安装TPMemulator
    unik compilers-返回可用于目标unik后端的编译器列表。
    构建一个Java语言的unikernel,(基于OSv的 unikernel)
    Ubuntu14.04下安装maven
    学习笔记2-了解unik的设计
  • 原文地址:https://www.cnblogs.com/YunGy/p/3304772.html
Copyright © 2011-2022 走看看