• datagrid Checkbox


    <DataGrid VirtualizingStackPanel.IsVirtualizing="True" VirtualizingStackPanel.VirtualizationMode="Recycling"  Name="dataGrid1" AutoGenerateColumns="False" ItemsSource="{Binding}" HorizontalGridLinesBrush= "{DynamicResource GridLinesBrush}" VerticalGridLinesBrush="{DynamicResource GridLinesBrush}"  AlternatingRowBackground="{DynamicResource RowBackgroundBrush}" CanUserAddRows="False"  CanUserResizeRows="False" CanUserDeleteRows="False" IsEnabled="True" Margin="0" RowHeight="20"   CellStyle="{DynamicResource DataGridCellStyle2}" ColumnHeaderStyle="{DynamicResource DataGridColumnHeaderStyle1}"  RowStyle="{DynamicResource DataGridRowStyle1}" RowHeaderStyle="{DynamicResource DataGridRowHeaderStyle1}"  ItemsPanel="{DynamicResource ItemsPanelTemplate1}" RowHeaderWidth="0" IsSynchronizedWithCurrentItem="True"  SelectionMode="Single" MinWidth="10" BorderThickness="0" GridLinesVisibility="Horizontal" ColumnHeaderHeight="22"  ScrollViewer.CanContentScroll="False" >   <DataGrid.Columns>     <DataGridTemplateColumn Header="选择" CanUserReorder="False">       <DataGridTemplateColumn.CellTemplate>         <DataTemplate>           <CheckBox IsChecked="{Binding IsChecked, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Cursor="Hand"/>         </DataTemplate>         </DataGridTemplateColumn.CellTemplate>     </DataGridTemplateColumn>     <DataGridTextColumn Header="标题" Binding="{Binding Title, Mode=OneWay}" />   </DataGrid.Columns> </DataGrid>

      IsChecked="{Binding IsChecked, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"

  • 相关阅读:
    阿里巴巴Java编码规范插件安装使用指南
    jhipster安装_Windows
    Linux 基本命令
    HTTPie命令介绍
    MySQL卸载
    Windows Phone8.1系统新特性
    SQL 游标知识整理
    浅析C#代理
    javascript 实现ajax
    jquery 之load post get
  • 原文地址:https://www.cnblogs.com/yuanchao/p/11137110.html
Copyright © 2020-2023  润新知