| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 | <wpf:ThemableWindow x:Class="PRSDesktop.Console"        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:local="clr-namespace:PRSDesktop"		xmlns:wpf="clr-namespace:InABox.Wpf;assembly=InABox.Wpf"        mc:Ignorable="d"        Title="Console" Height="450" Width="800" Loaded="Window_Loaded" Closing="Window_Closing">    <Window.Resources>        <Style TargetType="ItemsControl" x:Key="LogViewerStyle">            <Setter Property="Template">                <Setter.Value>                    <ControlTemplate>                        <ScrollViewer CanContentScroll="True">                            <ItemsPresenter />                        </ScrollViewer>                    </ControlTemplate>                </Setter.Value>            </Setter>            <Setter Property="ItemsPanel">                <Setter.Value>                    <ItemsPanelTemplate>                        <VirtualizingStackPanel IsItemsHost="True" />                    </ItemsPanelTemplate>                </Setter.Value>            </Setter>        </Style>        <DataTemplate DataType="{x:Type local:LogEntry}">            <Grid IsSharedSizeScope="True">                <Grid.ColumnDefinitions>                    <ColumnDefinition SharedSizeGroup="Date" Width="120" />                    <ColumnDefinition SharedSizeGroup="Type" Width="60" />                    <ColumnDefinition SharedSizeGroup="User" Width="120" />                    <ColumnDefinition />                </Grid.ColumnDefinitions>                <TextBlock Text="{Binding DateTime}" Grid.Column="0" FontFamily="Courier New"                           Margin="5,0,5,0" />                <TextBlock Text="{Binding Type}" Grid.Column="1" FontFamily="Courier New"                           Margin="5,0,5,0" />                <TextBlock Text="{Binding User}" Grid.Column="2" FontFamily="Courier New"                           Margin="0,0,2,0" />                <TextBlock Text="{Binding Message}" Grid.Column="3" FontFamily="Courier New"                           TextWrapping="Wrap" />            </Grid>        </DataTemplate>        <DataTemplate DataType="{x:Type local:CollapsibleLogEntry}">            <Grid IsSharedSizeScope="True">                <Grid.ColumnDefinitions>                    <ColumnDefinition SharedSizeGroup="Date" Width="120" />                    <ColumnDefinition SharedSizeGroup="Type" Width="60" />                    <ColumnDefinition SharedSizeGroup="User" Width="120" />                    <ColumnDefinition />                </Grid.ColumnDefinitions>                <Grid.RowDefinitions>                    <RowDefinition Height="Auto" />                    <RowDefinition />                </Grid.RowDefinitions>                <TextBlock Text="{Binding DateTime}" Grid.Column="0" FontFamily="Courier New"                           Margin="5,0,5,0" />                <TextBlock Text="{Binding Type}" Grid.Column="1" FontFamily="Courier New"                           Margin="5,0,5,0" />                <TextBlock Text="{Binding User}" Grid.Column="2" FontFamily="Courier New"                           Margin="0,0,2,0" />                <TextBlock Text="{Binding Message}" Grid.Column="3" FontFamily="Courier New"                           TextWrapping="Wrap" />                <ToggleButton x:Name="Expander" Grid.Row="1" Grid.Column="0"                              VerticalAlignment="Top" Content="+" HorizontalAlignment="Right" />                <ItemsControl ItemsSource="{Binding Contents}" Style="{StaticResource LogViewerStyle}"                              Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2"                              x:Name="Contents" Visibility="Collapsed" />            </Grid>            <DataTemplate.Triggers>                <Trigger SourceName="Expander" Property="IsChecked" Value="True">                    <Setter TargetName="Contents" Property="Visibility" Value="Visible" />                    <Setter TargetName="Expander" Property="Content" Value="-" />                </Trigger>            </DataTemplate.Triggers>        </DataTemplate>    </Window.Resources>    <Grid>        <Grid.RowDefinitions>            <RowDefinition Height="Auto" />            <RowDefinition Height="*" />        </Grid.RowDefinitions>        <DockPanel Grid.Row="0" Margin="5,5,5,0">            <Label Content="Search" VerticalContentAlignment="Center" />            <TextBox x:Name="Search" Margin="5,0,0,0" DockPanel.Dock="Left" Background="LightYellow"                     VerticalContentAlignment="Center" TextChanged="Search_TextChanged" />        </DockPanel>        <Border BorderBrush="Gray" Grid.Row="1" BorderThickness="0.75" Margin="5" Padding="2" Background="LightYellow">            <ItemsControl x:Name="Log" ItemsSource="{Binding}" Style="{StaticResource LogViewerStyle}" />        </Border>    </Grid></wpf:ThemableWindow>
 |