aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/MainWindow.xaml
blob: a4fc6a62843753a266e312bc85eec66e1ebab29a (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
pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
.highlight .c1 { color: #888888 } /* Comment.Single */
.highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #333333 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #666666 } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #008800 } /* Keyword.Pseudo */
.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */
.highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */
.highlight .na { color: #336699 } /* Name.Attribute */
.highlight .nb { color: #003388 } /* Name.Builtin */
.highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */
.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */
.highlight .nd { color: #555555 } /* Name.Decorator */
.highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */
.highlight .nl { color: #336699; font-style: italic } /* Name.Label */
.highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */
.highlight .py { color: #336699; font-weight: bold } /* Name.Property */
.highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #336699 } /* Name.Variable */
.highlight .ow { color: #008800 } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */
.highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */
.highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */
.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */
.highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */
.highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */
.highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */
.highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */
.highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */
.highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */
.highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */
.highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */
.highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */
.highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */
.highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */
.highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */
.highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */
.highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */
.highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */
.highlight .vc { color: #336699 } /* Name.Variable.Class */
.highlight .vg { color: #dd7700 } /* Name.Variable.Global */
.highlight .vi { color: #3333bb } /* Name.Variable.Instance */
.highlight .vm { color: #336699 } /* Name.Variable.Magic */
.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.BL;
using Tango.BL.Entities;

namespace Tango.MachineStudio.Dispensers.Models
{
    public class DispenserModel
    {
        private ObservablesContext _context;

        public Dispenser Dispenser { get; set; }

        public DispenserModel(Dispenser dispenser, ObservablesContext context)
        {
            Dispenser = dispenser;
            _context = context;
        }


    }
}
0 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326
<mahapps:MetroWindow x:Class="Tango.LogViewer.UI.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:System="clr-namespace:System;assembly=mscorlib"
        xmlns:local="clr-namespace:Tango.LogViewer.UI"
        xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
        xmlns:fa="http://schemas.fontawesome.io/icons/"
        xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
        mc:Ignorable="d"
        Title="Tango Log Viewer" WindowState="Maximized" ShowTitleBar="True" ShowCloseButton="True" DataContext="{StaticResource MainViewVM}" AllowDrop="True" Drop="FileWindow_Drop" Foreground="Gainsboro">
    <Window.Resources>
        <converters:EnumToDescriptionConverter x:Key="EnumToDescriptionConverter"></converters:EnumToDescriptionConverter>
        <converters:BooleanToVisibilityConverter x:Key="BoolToVisibilityConverter"/>
        <converters:BooleanToVisibilityInverseConverter x:Key="BooleanToVisibilityInverseConverter"/>
        <converters:BooleanInverseConverter x:Key="BooleanInverseConverter" />

        <SolidColorBrush x:Key="GrayBrush5" Color="#464646"/>
        <SolidColorBrush x:Key="BorderGrayBrush" Color="#464646"/>
        <SolidColorBrush x:Key="SelectedItemBrush" Color="#007ACC"/>

        <Style x:Key="LogDataGridCellStyle" TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}">
            <Setter Property="BorderThickness" Value="0"/>
            <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
            <Setter Property="VerticalContentAlignment" Value="Center"/>
            <Setter Property="VerticalAlignment" Value="Center"/>
            <Setter Property="TextBlock.VerticalAlignment" Value="Center" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type DataGridCell}">
                        <Grid Background="{TemplateBinding Background}">
                            <ContentPresenter VerticalAlignment="Bottom" />
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
            <Style.Triggers>
                <Trigger Property="IsSelected" Value="True">
                    <Setter Property="Background" Value="Transparent"></Setter>
                    <Setter Property="Foreground" Value="{StaticResource SelectedItemBrush}" />
                </Trigger>
                <MultiTrigger>
                    <MultiTrigger.Conditions>
                        <Condition Property="IsFocused" Value="False" />
                        <Condition Property="DataGridCell.IsSelected" Value="True" />
                    </MultiTrigger.Conditions>
                    <MultiTrigger.Setters>
                        <Setter Property="Foreground" Value="{StaticResource SelectedItemBrush}" />
                    </MultiTrigger.Setters>
                </MultiTrigger>
            </Style.Triggers>
        </Style>

        <Style x:Key="LogDataGridRowStyle"  TargetType="DataGridRow" BasedOn="{StaticResource {x:Type DataGridRow}}">
            <Setter Property="VerticalContentAlignment" Value="Center"/>
            <Style.Triggers>
                <Trigger Property="IsMouseOver" Value="True">
                    <Setter Property="Background" Value="Transparent"></Setter>
                    <Setter Property="Foreground" Value="{StaticResource SelectedItemBrush}" />
                    <Setter Property="Cursor" Value="Hand"></Setter>
                </Trigger>
                <Trigger Property="IsSelected" Value="True">
                    <Setter Property="Background" Value="Transparent"></Setter>
                    <Setter Property="Foreground" Value="{StaticResource SelectedItemBrush}" />
                </Trigger>
                <Trigger Property="IsFocused" Value="True">
                    <Setter Property="Background" Value="Transparent"></Setter>
                </Trigger>
                <DataTrigger Binding="{Binding CallerMethodName}" Value="OnStartup">
                    <Setter Property="Background" Value="#3F3F49"></Setter>
                    <Setter Property="Foreground" Value="Gainsboro" />
                    <Setter Property="FontWeight" Value="SemiBold"></Setter>
                    <Setter Property="Cursor" Value="Arrow"></Setter>
                </DataTrigger>
                <DataTrigger Binding="{Binding LogObject}" Value="External Bridge">
                    <Setter Property="Foreground" Value="#28A805" />
                </DataTrigger>
            </Style.Triggers>
        </Style>

        <Style  x:Key="EmLogDataGridRowStyle" TargetType="DataGridRow" BasedOn="{StaticResource {x:Type DataGridRow}}">
            <Setter Property="VerticalContentAlignment" Value="Center"/>
            <Style.Triggers>
                <Trigger Property="IsMouseOver" Value="True">
                    <Setter Property="Background" Value="Transparent"></Setter>
                    <Setter Property="Foreground" Value="{StaticResource SelectedItemBrush}" />
                    <Setter Property="Cursor" Value="Hand"></Setter>
                </Trigger>
                <Trigger Property="DataGridCell.IsSelected" Value="True">
                    <Setter Property="Background" Value="Transparent"></Setter>
                    <Setter Property="Foreground" Value="{StaticResource SelectedItemBrush}" />
                </Trigger>
                <Trigger Property="IsFocused" Value="True">
                    <Setter Property="Background" Value="Transparent"></Setter>
                </Trigger>

                <DataTrigger Binding="{Binding LogObject}" Value="External Bridge">
                    <Setter Property="Foreground" Value="#28A805" />
                </DataTrigger>
            </Style.Triggers>
        </Style>
        
        <DataTemplate x:Key="LogIconStyle">
            <fa:ImageAwesome  Height="16" Width="14" Margin="0 0 0 0" VerticalAlignment="Top">
                <fa:ImageAwesome.Style>
                    <Style TargetType="fa:ImageAwesome">
                        <Setter Property="Icon" Value="ExclamationTriangle"></Setter>
                        <Style.Triggers>
                            <DataTrigger Binding="{Binding Category}" Value="Info">
                                <Setter Property="Icon" Value="InfoCircle"></Setter>
                                <Setter Property="Foreground" Value="Gainsboro"></Setter>
                            </DataTrigger>
                            <DataTrigger Binding="{Binding Category}" Value="Warning">
                                <Setter Property="Icon" Value="ExclamationTriangle"></Setter>
                                <Setter Property="Foreground" Value="DarkOrange"></Setter>
                            </DataTrigger>
                            <DataTrigger Binding="{Binding Category}" Value="Error">
                                <Setter Property="Icon" Value="ExclamationTriangle"></Setter>
                                <Setter Property="Foreground" Value="Red"></Setter>
                            </DataTrigger>
                            <DataTrigger Binding="{Binding Category}" Value="Critical">
                                <Setter Property="Icon" Value="Bell"></Setter>
                                <Setter Property="Foreground" Value="Red"></Setter>
                            </DataTrigger>
                            <DataTrigger Binding="{Binding Category}" Value="Debug">
                                <Setter Property="Icon" Value="Bug"></Setter>
                                <Setter Property="Foreground" Value="Gray"></Setter>
                            </DataTrigger>
                            <DataTrigger Binding="{Binding CallerMethodName}" Value="OnStartup">
                                <Setter Property="Icon" Value="ClockOutline"></Setter>
                                <Setter Property="Foreground" Value="{StaticResource SelectedItemBrush}"></Setter>
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>
                </fa:ImageAwesome.Style>
            </fa:ImageAwesome>
        </DataTemplate>

        <Style x:Key="DataGridTextColumnElementStyle"  TargetType="{x:Type TextBlock}">
            <Setter Property="Margin" Value="5" />
            <Setter Property="Padding" Value="5" />
        </Style>

    </Window.Resources>
    <Grid IsEnabled="{Binding Loading,Converter={StaticResource BooleanInverseConverter}}">
        <Grid.RowDefinitions>
            <RowDefinition Height="28" />
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="1*"/>
            <RowDefinition Height="28"/>
            <RowDefinition Height="5"/>
        </Grid.RowDefinitions>

        <Menu Grid.Row="0" HorizontalAlignment="Stretch" VerticalAlignment="Center" Margin="10,0,0,0" BorderBrush="Transparent" Background="Transparent">
            <MenuItem Header="File" Background="Transparent">
                <MenuItem Header="Open" Command="{Binding OpeFileLogCommand}"/>
                <MenuItem Header="Exit" Click="Exit_MenuItem_Click" />
            </MenuItem>

        </Menu>
       
        <Grid Grid.Row="1" Margin="0 20 0 20">
            <DockPanel>
                <StackPanel  Orientation="Vertical" HorizontalAlignment="Left" Margin="10 0 0 0">
                    <TextBlock FontSize="10">Start Time:</TextBlock>
                    <Border BorderThickness="1" BorderBrush="{StaticResource BorderGrayBrush}" VerticalAlignment="Center"  CornerRadius="5" >
                        <mahapps:TimePicker x:Name="startTimePicker" SelectedTime="{Binding StartSelectedTime}"  Width="160" VerticalAlignment="Center" FontSize="16" IsClockVisible="False" Culture="{Binding Culture}" BorderBrush="{StaticResource BorderGrayBrush}" BorderThickness="0" Margin="1" Foreground="Gainsboro" />
                    </Border>
                </StackPanel>
                <StackPanel  Orientation="Vertical" HorizontalAlignment="Left" Margin="20 0 0 0">
                    <TextBlock FontSize="10">End Time:</TextBlock>
                    <Border BorderThickness="1" BorderBrush="{StaticResource BorderGrayBrush}" VerticalAlignment="Center"  CornerRadius="5" >
                        <mahapps:TimePicker x:Name="enddatePicker" SelectedTime="{Binding EndSelectedTime}"  Width="160" VerticalAlignment="Center" FontSize="16" IsClockVisible="False" Culture="{Binding Culture}" PickerVisibility="HourMinute"  BorderBrush="{StaticResource BorderGrayBrush}" BorderThickness="0" Margin="1" Foreground="Gainsboro"/>
                    </Border>
                </StackPanel>
                <Border BorderThickness="1" BorderBrush="{StaticResource BorderGrayBrush}" VerticalAlignment="Center" Padding="10 7" CornerRadius="5" Margin="30 10 0 0">
                    <StackPanel>
                        <ItemsControl VerticalAlignment="Center" ItemsSource="{Binding SelectedLogCategories}">
                            <ItemsControl.ItemsPanel>
                                <ItemsPanelTemplate>
                                    <StackPanel Orientation="Horizontal" />
                                </ItemsPanelTemplate>
                            </ItemsControl.ItemsPanel>
                            <ItemsControl.ItemTemplate>
                                <DataTemplate>
                                    <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
                                        <CheckBox IsChecked="{Binding IsSelected}" VerticalAlignment="Center" BorderBrush="{StaticResource BorderGrayBrush}"></CheckBox>
                                        <TextBlock Text="{Binding Data}" Margin="5 0 0 0" VerticalAlignment="Center"></TextBlock>
                                    </StackPanel>
                                </DataTemplate>
                            </ItemsControl.ItemTemplate>
                        </ItemsControl>
                    </StackPanel>
                </Border>
                <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="20 10 30 0">
                    <fa:ImageAwesome Icon="Search"  Width="24" Height="24" Foreground="#7A7A7A"/>
                    <TextBox VerticalAlignment="Center" Margin="10 0 0 0" Width="300" Text="{Binding Filter,UpdateSourceTrigger=PropertyChanged, Delay=1000}"  />
                </StackPanel>
                
            </DockPanel>
        </Grid>
        <Grid Grid.Row="2" >
            <Grid Margin="10">
                <Grid.RowDefinitions>
                    <RowDefinition Height="28"/>
                    <RowDefinition Height="1*"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="2.5*"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="1*"/>
                </Grid.ColumnDefinitions>
                <TextBlock FontSize="14" Grid.Row="0" FontFamily="Segoe UI">Log</TextBlock>
                <StackPanel Orientation="Horizontal" Margin="0" Grid.Row="0" Grid.Column="2">
                    <TextBlock FontSize="14"  Margin="10 0 0 0" FontFamily="Segoe UI">Message</TextBlock>
                    <CheckBox x:Name="WrapMessgeTextCheckBox"  VerticalAlignment="Center" BorderBrush="{StaticResource BorderGrayBrush}" Margin="30 -5 0 0"></CheckBox>
                    <TextBlock Text="Wrap message text" Margin="5 -5 0 0" VerticalAlignment="Center"></TextBlock>
                </StackPanel>
                
                <Border Visibility="{Binding IsEmbeddedLog, Converter={StaticResource BooleanToVisibilityInverseConverter}}" Grid.Column="0" Grid.Row="1" BorderThickness="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" BorderBrush="{StaticResource BorderGrayBrush}" Margin="0 0 10 0">
                    <DataGrid  x:Name="ActionGrid" HorizontalScrollBarVisibility="Disabled" Background="Transparent" RenderOptions.EdgeMode="Aliased" RenderOptions.BitmapScalingMode="LowQuality" MaxWidth="{Binding RelativeSource={RelativeSource AncestorType=Grid},Path=ActualWidth}" AutoGenerateColumns="False" SelectionMode="Single"  ItemsSource="{Binding LogsViewSource}" SelectedItem="{Binding SelectedLog}" RowHeight="40" CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="True" IsReadOnly="True"
                               CellStyle="{StaticResource LogDataGridCellStyle}" RowStyle="{StaticResource LogDataGridRowStyle}" Foreground="Gainsboro">
                        <DataGrid.Resources>
                            <Style  BasedOn="{StaticResource MetroDataGridColumnHeader}"  TargetType="{x:Type DataGridColumnHeader}">
                                <Setter Property="Foreground" Value="Gainsboro" />
                            </Style>
                        </DataGrid.Resources>
                        <DataGrid.Columns>
                            <DataGridTemplateColumn Header="" CellTemplate="{StaticResource LogIconStyle}"/>
                            <DataGridTextColumn Header="DATE TIME" Binding="{Binding TimeStamp,StringFormat=' HH:mm:ss.ff '}" Foreground="Gainsboro"/>
                            <DataGridTextColumn Header="FILE" Binding="{Binding RelativeCallerFile}" ElementStyle="{StaticResource DataGridTextColumnElementStyle}"/>
                            <DataGridTextColumn Header="METHOD" Binding="{Binding CallerMethodName}" ElementStyle="{StaticResource DataGridTextColumnElementStyle}"/>
                            <DataGridTextColumn Header="LINE" Binding="{Binding CallerLineNumber}" />
                            <DataGridTemplateColumn Header="MESSAGE" Width="1*" >
                                <DataGridTemplateColumn.CellTemplate>
                                    <DataTemplate>
                                        <Grid VerticalAlignment="Center" Margin="0 5 0 5">
                                            <Border  Height="Auto" BorderThickness="0" >
                                                <TextBlock Text="{Binding Message}" TextTrimming="CharacterEllipsis" VerticalAlignment="Center" ></TextBlock>
                                            </Border>
                                        </Grid>
                                    </DataTemplate>
                                </DataGridTemplateColumn.CellTemplate>
                            </DataGridTemplateColumn>
                        </DataGrid.Columns>
                    </DataGrid>
                </Border>
                <StackPanel Orientation="Vertical" Grid.Column="0" Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="{Binding Loading,Converter={StaticResource BoolToVisibilityConverter}}">
                    <mahapps:ProgressRing Foreground="LightGray" Width="80" Height="80"></mahapps:ProgressRing>
                    <TextBlock Text="Loading..." FontStyle="Italic" Margin="0 40 0 0" FontSize="18" VerticalAlignment="Center"></TextBlock>
                </StackPanel>
                <Border Visibility="{Binding IsEmbeddedLog, Converter={StaticResource BoolToVisibilityConverter}}" Grid.Column="0" Grid.Row="1" BorderThickness="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" BorderBrush="{StaticResource BorderGrayBrush}" Margin="0 0 10 0">
                    <DataGrid x:Name="embededGrid" HorizontalScrollBarVisibility="Disabled"  Background="Transparent" RenderOptions.EdgeMode="Aliased" RenderOptions.BitmapScalingMode="LowQuality" MaxWidth="{Binding RelativeSource={RelativeSource AncestorType=Grid},Path=ActualWidth}" AutoGenerateColumns="False" SelectionMode="Single"  ItemsSource="{Binding LogsViewSource}" SelectedItem="{Binding SelectedLog}" RowHeight="40" CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="True" IsReadOnly="True"
                              CellStyle="{StaticResource LogDataGridCellStyle}" RowStyle="{StaticResource EmLogDataGridRowStyle}" Foreground="Gainsboro">
                        <DataGrid.Resources>
                            <Style  BasedOn="{StaticResource MetroDataGridColumnHeader}"  TargetType="{x:Type DataGridColumnHeader}">
                                <Setter Property="Foreground" Value="Gainsboro" />
                            </Style>
                        </DataGrid.Resources>
                        <DataGrid.Columns>
                            <DataGridTemplateColumn Header="ICON" CellTemplate="{StaticResource LogIconStyle}"/>
                            <DataGridTextColumn Header="DATE TIME" Binding="{Binding TimeStamp,StringFormat=' HH:mm:ss.ff '}" Foreground="Gainsboro"/>
                            <DataGridTextColumn Header="FILE" Binding="{Binding DebugLogResponse.FileName}" ElementStyle="{StaticResource DataGridTextColumnElementStyle}"/>
                            <DataGridTextColumn Header="LINE" Binding="{Binding DebugLogResponse.LineNumber}" ElementStyle="{StaticResource DataGridTextColumnElementStyle}"/>
                            <DataGridTextColumn Header="MODULE" Binding="{Binding DebugLogResponse.ModuleId}" ElementStyle="{StaticResource DataGridTextColumnElementStyle}"/>
                            <DataGridTextColumn Header="FILTER" Binding="{Binding DebugLogResponse.Filter}" />
                            <DataGridTemplateColumn Header="MESSAGE" Width="1*" >
                                <DataGridTemplateColumn.CellTemplate>
                                    <DataTemplate>
                                        <Grid VerticalAlignment="Center" Margin="0 5 0 5">
                                            <Border  Height="Auto" BorderThickness="0" >
                                                <TextBlock Text="{Binding MessagePlusRepeated}" TextTrimming="CharacterEllipsis" VerticalAlignment="Center" ></TextBlock>
                                            </Border>
                                        </Grid>
                                    </DataTemplate>
                                </DataGridTemplateColumn.CellTemplate>
                            </DataGridTemplateColumn>
                        </DataGrid.Columns>
                    </DataGrid>
                </Border>
                <Border Margin="10 0 0 0" Grid.Column="2" Grid.Row="1" BorderThickness="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" BorderBrush="{StaticResource BorderGrayBrush}">
                    <TextBox BorderThickness="0" Text="{Binding Message}" IsReadOnly="True" AcceptsReturn="False" VerticalScrollBarVisibility="Auto" Foreground="Gainsboro">
                        <TextBox.Style>
                            <Style TargetType="TextBox" BasedOn="{StaticResource MetroTextBox}">
                                <Setter Property="TextWrapping" Value="NoWrap"></Setter>
                                <Setter Property="HorizontalScrollBarVisibility" Value="Auto"></Setter>
                                <Style.Triggers>
                                    <DataTrigger Binding="{Binding ElementName=WrapMessgeTextCheckBox, Path=IsChecked}" Value="True">
                                        <Setter Property="TextWrapping" Value="Wrap"></Setter>
                                        <Setter Property="HorizontalScrollBarVisibility" Value="Hidden"></Setter>
                                    </DataTrigger>
                                </Style.Triggers>
                            </Style>
                        </TextBox.Style>
                    </TextBox>
                </Border>
                <GridSplitter Grid.Column="1" Grid.Row="1" ResizeDirection="Columns" ResizeBehavior="PreviousAndNext" HorizontalAlignment="Center" VerticalAlignment="Stretch" Width="4" Background="{StaticResource BorderGrayBrush}"/>
            </Grid>
        </Grid>
        <StatusBar Grid.Row="3" Grid.ColumnSpan="2" Background="Transparent">
            <StatusBar.ItemsPanel>
                <ItemsPanelTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="10" />
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                    </Grid>
                </ItemsPanelTemplate>
            </StatusBar.ItemsPanel>
            <StatusBarItem Grid.Column="1">
                <TextBlock Text="{Binding FileName}"></TextBlock>
            </StatusBarItem>
            <Separator Grid.Column="2" Visibility="{Binding IsSet, Converter={StaticResource BoolToVisibilityConverter}}"/>
            <StatusBarItem Grid.Column="3" Visibility="{Binding IsSet, Converter={StaticResource BoolToVisibilityConverter}}">
                <TextBlock>
                        <Run Text="Set: "></Run>
                        <Run Text="{Binding CountOfSet}"></Run>
                </TextBlock>
            </StatusBarItem>
        </StatusBar>
    </Grid>
</mahapps:MetroWindow>