|
- <UserControl x:Class="BPASmartClient.MilkWithTea.View.MessageLogInfo"
- 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:BPASmartClient.MilkWithTea.View"
- mc:Ignorable="d"
- d:DesignHeight="800" d:DesignWidth="1400" Background="Transparent">
- <UserControl.Resources>
- <Style TargetType="DataGridRow">
- <Setter Property="Background" Value="#F3F6F9 "/>
- </Style>
- </UserControl.Resources>
- <Grid Margin="20">
- <Grid.RowDefinitions>
- <RowDefinition Height="60"/>
- <RowDefinition Height="*"/>
- </Grid.RowDefinitions>
- <Grid Grid.Row="1">
- <Border Background="White" BorderBrush="#D5DFE5 " BorderThickness="12" CornerRadius="5">
- <DataGrid Margin="20" ItemsSource="{Binding LogDataGrid, UpdateSourceTrigger=PropertyChanged}" Grid.Row="2"
- AutoGenerateColumns="False"
- FrozenColumnCount="1"
- VerticalAlignment="Top"
- IsReadOnly="True"
- CanUserResizeColumns="False" CanUserResizeRows="False" SelectionMode="Single"
- CanUserReorderColumns="False" AlternationCount="2" RowHeaderWidth="0" CanUserAddRows="False">
- <DataGrid.Columns>
- <DataGridTemplateColumn Header="日志时间" Width="300">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <TextBlock HorizontalAlignment="Center" Text="{Binding time, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" FontSize="14" Foreground="{Binding foreground, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
-
- <DataGridTemplateColumn Header="日志类型" Width="200">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <TextBlock HorizontalAlignment="Center" Text="{Binding type, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" FontSize="14" Foreground="{Binding foreground, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <DataGridTemplateColumn Header="日志内容" Width="*">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <TextBlock HorizontalAlignment="Left" Text="{Binding message, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" FontSize="14" Foreground="{Binding foreground, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- </DataGrid.Columns>
- </DataGrid>
- </Border>
- </Grid>
- </Grid>
- </UserControl>
|