You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Aucma.Scada/Aucma.Scada.UI/RecordControl.xaml

61 lines
4.2 KiB
XML

<UserControl x:Class="Aucma.Scada.UI.RecordControl"
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:Aucma.Scada.UI"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800" Background="Transparent">
<Grid Margin="10,10">
<Grid.RowDefinitions>
<RowDefinition Height="100"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Border Grid.Row="0" BorderBrush="#007DFA" BorderThickness="0" CornerRadius="10" Background="Transparent">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="40"/>
<RowDefinition Height="40"/>
</Grid.RowDefinitions>
<StackPanel Margin="15,0" Grid.Row="0" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="用户名称" VerticalAlignment="Center" Foreground="Black" FontSize="15"/>
<TextBox Width="200" Height="25" Margin="10 0 0 0" Text="{Binding Search}" Foreground="White" VerticalAlignment="Center" FontSize="15"/> <!--resourceStyle 413行修改边框颜色-->
<Button Content="查询" Command="{Binding QueryCommand}" Background="#007DFA" Foreground="White" Margin="20,0,0,0" Height="30" BorderBrush="DeepSkyBlue" BorderThickness="1" Width="80" />
<Button Content="重置" Command="{Binding ResetCommand}" Background="#007DFA" Foreground="White" Margin="20,0,0,0" Height="30" BorderBrush="DeepSkyBlue" BorderThickness="1" Width="80" />
</StackPanel>
</Grid>
</Border>
<Border Grid.Row="1" Margin="0,5,0,0" BorderBrush="#007DFA" BorderThickness="0" CornerRadius="0" Background="Transparent">
<DataGrid ItemsSource="{Binding GridModelList}" Background="Transparent"
FontSize="15" ColumnHeaderHeight="35"
RowHeight="30" AutoGenerateColumns="False" RowHeaderWidth="0"
GridLinesVisibility="None" ScrollViewer.HorizontalScrollBarVisibility="Hidden"
ScrollViewer.VerticalScrollBarVisibility="Hidden" BorderThickness="0" CanUserAddRows="False"
Foreground="Black" ><!--resourceStyle 399行修改选中字体颜色-->
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding userId}" Header="用户编号" Width="100" IsReadOnly="True"/>
<DataGridTextColumn Binding="{Binding userName}" Header="用户名称" Width="*" IsReadOnly="True"/>
<DataGridTextColumn Binding="{Binding password}" Header="用户密码" Width="*" IsReadOnly="True"/>
<!--<DataGridTemplateColumn Header="操作" Width="*">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<Button Content="编辑" CommandParameter="{Binding objId}" Background="#007DFA" Foreground="White" Margin="20,0,0,0" Height="25" BorderBrush="DeepSkyBlue" BorderThickness="1" Width="80" Command="{Binding DataContext.EditCommand, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=DataGrid }}"/>
<Button Content="删除" CommandParameter="{Binding objId}" Background="Gray" Foreground="White" Margin="20,0,0,0" Height="25" BorderBrush="DeepSkyBlue" BorderThickness="1" Width="80" Command="{Binding DataContext.DelCommand, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=DataGrid }}" />
</StackPanel>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>-->
</DataGrid.Columns>
</DataGrid>
</Border>
</Grid>
</UserControl>