相关文章推荐
完美的苹果  ·  tkinter Scale滑块 - ...·  1 年前    · 
儒雅的煎饼  ·  ubuntu16.04+cuda8.0安装p ...·  1 年前    · 
<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>