aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/FSE/Tango.FSE.Common/Dialogs/ApplicationLogItemView.xaml
blob: 6abda9b6dd7719547c4fda53e26dbe9aa893eb52 (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
<UserControl x:Class="Tango.FSE.Common.Dialogs.ApplicationLogItemView"
             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:material="http://materialdesigninxaml.net/winfx/xaml/themes"
             xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
             xmlns:local="clr-namespace:Tango.FSE.Common.Dialogs"
             mc:Ignorable="d" 
             Width="800" Height="500" d:DataContext="{d:DesignInstance Type=local:ApplicationLogItemViewVM, IsDesignTimeCreatable=False}" Background="{StaticResource FSE_PrimaryBackgroundLightBrush}" Foreground="{StaticResource FSE_PrimaryForegroundBrush}">
    <DockPanel Margin="10">

        <StackPanel DockPanel.Dock="Top" Orientation="Horizontal">
            <material:PackIcon DataContext="{Binding LogItem}" Width="42" Height="42" VerticalAlignment="Center" Style="{StaticResource FSE_LogIcon}" />
            <TextBlock VerticalAlignment="Center" Text="{Binding LogItem.Message}" TextWrapping="NoWrap" Height="22" TextTrimming="CharacterEllipsis" Width="700" Margin="10 0 0 0" FontSize="{StaticResource FSE_LargeFontSize}"></TextBlock>
        </StackPanel>

        <Grid Margin="0 10 0 0" DockPanel.Dock="Top">
            <controls:TableGrid RowHeight="30">
                <TextBlock Text="Time Stamp:" FontWeight="SemiBold" />
                <TextBlock Text="{Binding LogItem.TimeStamp,StringFormat='HH:mm:ss.fff'}"></TextBlock>
                <TextBlock Text="Category:" FontWeight="SemiBold" />
                <TextBlock Text="{Binding LogItem.Category}"></TextBlock>
                <TextBlock Text="File:" FontWeight="SemiBold" />
                <TextBlock Text="{Binding LogItem.RelativeCallerFile}"></TextBlock>
                <TextBlock Text="Method:" FontWeight="SemiBold" />
                <TextBlock Text="{Binding LogItem.CallerMethodName}"></TextBlock>
                <TextBlock Text="Line:" FontWeight="SemiBold" />
                <TextBlock Text="{Binding LogItem.CallerLineNumber}"></TextBlock>
            </controls:TableGrid>
        </Grid>

        <Border Padding="5" BorderThickness="1" BorderBrush="{StaticResource FSE_BorderBrush}">
            <TextBox Foreground="{StaticResource FSE_PrimaryForegroundBrush}" BorderThickness="0" Text="{Binding LogItem.Message}" Style="{x:Null}" TextWrapping="Wrap" IsReadOnly="True" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto" Background="Transparent" />
        </Border>
    </DockPanel>
</UserControl>