|
@@ -1,62 +0,0 @@
|
|
|
-<UserControl x:Class="BlankApp1.Views.TestTwoView"
|
|
|
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
- xmlns:local="clr-namespace:BlankApp1.Views"
|
|
|
- mc:Ignorable="d"
|
|
|
- d:DesignHeight="450" d:DesignWidth="800">
|
|
|
- <Grid >
|
|
|
- <Grid.RowDefinitions>
|
|
|
- <RowDefinition Height="80"/>
|
|
|
- <RowDefinition/>
|
|
|
- <RowDefinition Height="80"/>
|
|
|
- </Grid.RowDefinitions>
|
|
|
- <StackPanel Grid.Row="0" Orientation="Horizontal">
|
|
|
- <TextBlock Text="测试项名称" Height="28" FontSize="15" Margin="30,0,15,0"/>
|
|
|
- <TextBox Height="28" Width="150" />
|
|
|
- <Button Content="查询" Width="80" Margin="15,0" Command="{Binding QueryCommand}" Style="{StaticResource NormalButtonStyle}" />
|
|
|
- <Button Content="新增" Width="80" Margin="15,0" Command="{Binding PopCommand}" Style="{StaticResource NormalButtonStyle}"/>
|
|
|
- <Button Content="导出Excel" Width="80" Margin="15,0" Command="{Binding QueryCommand}" Style="{StaticResource NormalButtonStyle}" />
|
|
|
- </StackPanel>
|
|
|
- <Border Grid.Row="1" Margin="5">
|
|
|
- <DataGrid ColumnWidth="*" AutoGenerateColumns="False" HeadersVisibility="All" CanUserAddRows="False" SelectionUnit="FullRow" SelectionMode="Single" RowHeaderWidth="0"
|
|
|
- ColumnHeaderStyle="{StaticResource ColumnHeaderStyle}" x:Name="DeviceDataGrid" RowHeaderStyle="{StaticResource RowHeaderStyle}" RowStyle="{StaticResource DataGridRowtyle}" AlternationCount="2"
|
|
|
- ItemsSource="{Binding BaseConfigList}" IsReadOnly="True" >
|
|
|
- <DataGrid.Columns >
|
|
|
- <DataGridTextColumn Header="测试项名称" Binding="{Binding Id}" CellStyle="{StaticResource DataGridCellStyle}" />
|
|
|
- <DataGridTextColumn Header="测试项类型" Binding="{Binding Name}" CellStyle="{StaticResource DataGridCellStyle}"/>
|
|
|
-
|
|
|
- <DataGridTemplateColumn Header="操作" CellStyle="{StaticResource DataGridCellStyle}">
|
|
|
- <DataGridTemplateColumn.CellTemplate>
|
|
|
- <DataTemplate>
|
|
|
- <UniformGrid Columns="3">
|
|
|
- <Button Width="80" Background="Transparent" HorizontalContentAlignment ="Left" Foreground="Black" Height="25" BorderThickness="0"
|
|
|
- Command="{Binding DataContext.EditCommand, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=DataGrid}}"
|
|
|
- Cursor="Hand" >
|
|
|
-
|
|
|
- <StackPanel Orientation="Horizontal">
|
|
|
- <TextBlock Text="编辑" VerticalAlignment="Center" Foreground="Blue"/>
|
|
|
- </StackPanel>
|
|
|
- </Button>
|
|
|
- <Button Width="80" Background="Transparent" HorizontalContentAlignment ="Left" Foreground="Black" Height="25" BorderThickness="0"
|
|
|
- Command="{Binding DataContext.DeleteCommand, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=DataGrid}}"
|
|
|
- Cursor="Hand" >
|
|
|
-
|
|
|
- <StackPanel Orientation="Horizontal">
|
|
|
- <TextBlock Text="删除" VerticalAlignment="Center" Foreground="Blue"/>
|
|
|
- </StackPanel>
|
|
|
- </Button>
|
|
|
-
|
|
|
- </UniformGrid>
|
|
|
- </DataTemplate>
|
|
|
- </DataGridTemplateColumn.CellTemplate>
|
|
|
- </DataGridTemplateColumn>
|
|
|
-
|
|
|
- </DataGrid.Columns>
|
|
|
-
|
|
|
- </DataGrid>
|
|
|
- </Border>
|
|
|
-
|
|
|
- </Grid>
|
|
|
-</UserControl>
|