ViewRealLogDlg.xaml 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <Window x:Class="MeterVision.Dlg.ViewRealLogDlg"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:local="clr-namespace:MeterVision.Dlg"
  7. mc:Ignorable="d"
  8. Background="WhiteSmoke"
  9. ShowInTaskbar="False"
  10. WindowStartupLocation="CenterOwner"
  11. ResizeMode="CanResizeWithGrip"
  12. Title="查看实时记录的日志" Height="768" Width="1024">
  13. <Grid>
  14. <Grid.RowDefinitions>
  15. <RowDefinition Height="*" />
  16. <RowDefinition Height="40" />
  17. </Grid.RowDefinitions>
  18. <Grid Grid.Row="0" Margin="10">
  19. <Grid.ColumnDefinitions>
  20. <ColumnDefinition Width="220" />
  21. <ColumnDefinition Width="10" />
  22. <ColumnDefinition Width="*" />
  23. </Grid.ColumnDefinitions>
  24. <Grid.RowDefinitions>
  25. <RowDefinition Height="30" />
  26. <RowDefinition Height="*" />
  27. </Grid.RowDefinitions>
  28. <TextBlock Grid.Row="0" Grid.Column="0" Text="{Binding TotalRecords,StringFormat='已记录的实时日志列表({0})'}" VerticalAlignment="Center" FontSize="14px" />
  29. <ListView Grid.Row="1" Grid.Column="0" x:Name="lvFileName" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
  30. Foreground="#000000" FontSize="13px"
  31. SelectedItem="{Binding SelectedFileInfo,Mode=TwoWay}"
  32. SelectionChanged="LvFileName_SelectionChanged">
  33. <ListView.ItemContainerStyle>
  34. <Style TargetType="ListViewItem">
  35. <!-- 设置行高 -->
  36. <Setter Property="Height" Value="30"/>
  37. <!-- 设置字体大小 -->
  38. <Setter Property="FontSize" Value="14"/>
  39. <Setter Property="BorderBrush" Value="#D3D3D3"/>
  40. <Setter Property="BorderThickness" Value="0,0,0,1"/>
  41. </Style>
  42. </ListView.ItemContainerStyle>
  43. <ListView.View>
  44. <GridView>
  45. <GridView.ColumnHeaderContainerStyle>
  46. <Style TargetType="GridViewColumnHeader">
  47. <Setter Property="FontSize" Value="14"/>
  48. <!-- 字体大小 -->
  49. <Setter Property="Height" Value="30"/>
  50. <!-- 高度 --><!--
  51. <Setter Property="Background" Value="LightGray"/>
  52. --><!-- 背景色 --><!--
  53. <Setter Property="Foreground" Value="Black"/>
  54. --><!-- 文字颜色 --><!--
  55. <Setter Property="HorizontalContentAlignment" Value="Center"/>
  56. --><!-- 居中对齐 -->
  57. </Style>
  58. </GridView.ColumnHeaderContainerStyle>
  59. <GridViewColumn Header="文件名称" Width="200" DisplayMemberBinding="{Binding Name}" />
  60. </GridView>
  61. </ListView.View>
  62. </ListView>
  63. <TextBlock Grid.Row="0" Grid.Column="2" Text="{Binding SelectedFileInfo.Name,StringFormat='文件名称: {0}'}" VerticalAlignment="Center" FontSize="14px" />
  64. <Border Grid.Row="1" Grid.Column ="2">
  65. <RichTextBox Name="RichTxtContentBox" Grid.Column="1" IsReadOnly="True"
  66. VerticalScrollBarVisibility="Auto"
  67. FontSize="14px" BorderThickness="1"
  68. Margin="0"/>
  69. </Border>
  70. </Grid>
  71. <Border Grid.Row="1" Background="WhiteSmoke" BorderThickness="0 1 0 0" BorderBrush="#D3D3D3">
  72. <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center">
  73. <!--<Button Name="btnOK" Content="确定" HorizontalAlignment="Center" Margin="0 0 20 0"
  74. VerticalAlignment="Center" Width="80" Height="26" Click="BtnOK_Click" />-->
  75. <Button Name="btnClose" Content="关闭" HorizontalAlignment="Center"
  76. VerticalAlignment="Center" Width="80" Height="26" Click="BtnClose_Click" />
  77. </StackPanel>
  78. </Border>
  79. </Grid>
  80. </Window>