aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/FSE/Tango.FSE.LogViewer.UI/Views/LogFileTabView.xaml
blob: 92064f9fdd730ed1265d718be094d071d19c29e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<UserControl x:Class="Tango.FSE.LogViewer.UI.Views.LogFileTabView"
             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:global="clr-namespace:Tango.FSE.LogViewer.UI"
             xmlns:material="http://materialdesigninxaml.net/winfx/xaml/themes"
             xmlns:vm="clr-namespace:Tango.FSE.LogViewer.UI.ViewModels"
             xmlns:local="clr-namespace:Tango.FSE.LogViewer.UI.Views"
             xmlns:components="clr-namespace:Tango.SharedUI.Components;assembly=Tango.SharedUI"
             xmlns:helpers="clr-namespace:Tango.SharedUI.Helpers;assembly=Tango.SharedUI"
             mc:Ignorable="d" 
             d:DesignHeight="720" 
             d:DesignWidth="1280"
             d:DataContext="{d:DesignInstance Type=vm:LogFileTabViewVM, IsDesignTimeCreatable=False}"
             Background="{StaticResource FSE_PrimaryBackgroundDarkBrush}" 
             Foreground="{StaticResource FSE_PrimaryForegroundBrush}">
    <Grid>
        <DataGrid Visibility="{Binding IsEmbedded,Converter={StaticResource BooleanToVisibilityInverseConverter}}" Margin="0 5 0 0" Style="{StaticResource FSE_LogsGridStyle}" ItemsSource="{Binding Logs}" SelectedItem="{Binding SelectedLog}" CellStyle="{StaticResource FSE_LogsGridCellStyle}" CanUserSortColumns="True" CanUserResizeColumns="True">
            <DataGrid.Resources>
                <components:BindingProxy x:Key="proxy" Data="{Binding}" />
            </DataGrid.Resources>
            <DataGrid.Columns>
                <DataGridTemplateColumn Header="#" Width="40" CellTemplate="{StaticResource FSE_LogIcon_Cell}"/>
                <DataGridTextColumn Header="DATE TIME" Binding="{Binding TimeStamp,StringFormat='HH:mm:ss.ff'}" Width="100" />
                <DataGridTextColumn Header="SERVICE" Binding="{Binding ClassName}" Width="200" />
                <DataGridTextColumn Header="LN" Binding="{Binding CallerLineNumber}" Width="60" />
                <DataGridTemplateColumn Header="MESSAGE" Width="1*" >
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <TextBlock TextWrapping="NoWrap" Text="{Binding Message,Converter={StaticResource StringToOneLineConverter},ConverterParameter='120'}"></TextBlock>
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
                </DataGridTemplateColumn>
            </DataGrid.Columns>
        </DataGrid>

        <DataGrid Visibility="{Binding IsEmbedded,Converter={StaticResource BooleanToVisibilityConverter}}" Margin="0 5 0 0" Style="{StaticResource FSE_LogsGridStyle}" ItemsSource="{Binding Logs}" SelectedItem="{Binding SelectedLog}" CellStyle="{StaticResource FSE_LogsGridCellStyle}" CanUserSortColumns="True" CanUserResizeColumns="True">
            <DataGrid.Resources>
                <components:BindingProxy x:Key="proxy" Data="{Binding}" />
            </DataGrid.Resources>
            <DataGrid.Columns>
                <DataGridTemplateColumn Header="#" Width="40" CellTemplate="{StaticResource FSE_LogIcon_Cell}"/>
                <DataGridTextColumn Header="DATE TIME" Binding="{Binding TimeStamp,StringFormat='HH:mm:ss.ff'}" Width="100" />
                <DataGridTextColumn Header="SERVICE" Binding="{Binding ClassName}" Width="200" />
                <DataGridTemplateColumn Header="MESSAGE" Width="1*" >
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <TextBlock TextWrapping="NoWrap" Text="{Binding Message,Converter={StaticResource StringToOneLineConverter},ConverterParameter='120'}"></TextBlock>
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
                </DataGridTemplateColumn>
            </DataGrid.Columns>
        </DataGrid>
    </Grid>
</UserControl>