添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
<DataGrid AutoGenerateColumns="False" ItemsSource="{Binding Items}"  CanUserAddRows="False" CanUserResizeColumns="False" CanUserReorderColumns="False" CanUserSortColumns="False" ColumnWidth="*">
            <DataGrid.Columns>
                <DataGridCheckBoxColumn Header="" Binding="{Binding IsSelected,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Width="auto">
                    <DataGridCheckBoxColumn.ElementStyle>
                        <Style TargetType="CheckBox">
                            <Setter Property="HorizontalAlignment" Value="Center"></Setter>
                            <Setter Property="VerticalAlignment" Value="Center"></Setter>
                            <Setter Property="Margin" Value="3"></Setter>
                        </Style>
                    </DataGridCheckBoxColumn.ElementStyle>
                </DataGridCheckBoxColumn>
                <DataGridTemplateColumn Header="加分项" IsReadOnly="True" Width="*">
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <TextBlock TextWrapping="Wrap" Text="{Binding Name}" ToolTip="{Binding Name}" Margin="3"/>
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
                </DataGridTemplateColumn>
                <DataGridTextColumn Header="分值" IsReadOnly="True" MinWidth="100" Width="auto" Binding="{Binding Score}">
                    <DataGridTextColumn.ElementStyle>
                        <Style TargetType="TextBlock">
                            <Setter Property="HorizontalAlignment" Value="Center"></Setter>
                            <Setter Property="VerticalAlignment" Value="Center"></Setter>
                            <Setter Property="Margin" Value="3"></Setter>
                        </Style>
                    </DataGridTextColumn.ElementStyle>
                </DataGridTextColumn>
                <DataGridTextColumn Header="备注" IsReadOnly="True" MinWidth="100" Width="auto" Binding="{Binding Note}">
                    <DataGridTextColumn.ElementStyle>
                        <Style TargetType="TextBlock">
                            <Setter Property="HorizontalAlignment" Value="Center"></Setter>
                            <Setter Property="VerticalAlignment" Value="Center"></Setter>
                            <Setter Property="Margin" Value="3"></Setter>
                        </Style>
                    </DataGridTextColumn.ElementStyle>
                </DataGridTextColumn>
            </DataGrid.Columns>
            <DataGrid.ColumnHeaderStyle>
                <Style TargetType="DataGridColumnHeader">
                    <Setter Property="HorizontalContentAlignment" Value="Center"></Setter>
                </Style>
            </DataGrid.ColumnHeaderStyle>
        </DataGrid>