Files
8damon-Blackbird-Platform/Client/analysis/Windows/SimpleEventDetailWindow.xaml
T
2026-04-03 14:23:15 +10:00

162 lines
7.3 KiB
XML

<Window x:Class="BlackbirdInterface.SimpleEventDetailWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Event Detail"
Width="840"
Height="520"
MinWidth="620"
MinHeight="420"
WindowStartupLocation="CenterOwner"
WindowStyle="None"
ResizeMode="CanResize"
Background="{DynamicResource WinBgBrush}">
<Window.Resources>
<Style TargetType="GridViewColumnHeader">
<Setter Property="Background" Value="{DynamicResource WinHeaderBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource WinTextBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource WinBorderBrush}"/>
<Setter Property="BorderThickness" Value="0,0,0,1"/>
<Setter Property="Padding" Value="6,3"/>
<Setter Property="HorizontalContentAlignment" Value="Left"/>
</Style>
<Style TargetType="ListView">
<Setter Property="Background" Value="{DynamicResource WinPanelBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource WinTextBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource WinBorderBrush}"/>
<Setter Property="BorderThickness" Value="0"/>
</Style>
<Style TargetType="ListViewItem">
<Setter Property="Background" Value="{DynamicResource WinPanelBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource WinTextBrush}"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Padding" Value="2"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListViewItem">
<Border x:Name="ItemBorder"
Background="{TemplateBinding Background}"
BorderBrush="Transparent"
BorderThickness="0">
<GridViewRowPresenter VerticalAlignment="Center"
Content="{TemplateBinding Content}"
Columns="{Binding RelativeSource={RelativeSource AncestorType=ListView}, Path=View.Columns}"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="ItemBorder" Property="Background" Value="#1E303030"/>
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter TargetName="ItemBorder" Property="Background" Value="#33323232"/>
<Setter Property="Foreground" Value="#FFF1F1F1"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="#33323232"/>
<Setter Property="Foreground" Value="#FFF1F1F1"/>
</Trigger>
</Style.Triggers>
</Style>
</Window.Resources>
<Grid Margin="10">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1.3*"/>
<RowDefinition Height="5"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Border Grid.Row="0"
BorderBrush="{DynamicResource WinSubtleBorderBrush}"
BorderThickness="0,0,0,1"
Background="{DynamicResource WinHeaderBrush}"
Padding="8,3"
Margin="0,0,0,8"
MouseLeftButtonDown="Root_MouseLeftButtonDown">
<DockPanel LastChildFill="False">
<TextBlock x:Name="TitleBlock"
Text="Event Detail"
FontSize="14"
FontWeight="SemiBold"
VerticalAlignment="Center"/>
<Button DockPanel.Dock="Right"
Content="✕"
Width="22"
Height="20"
Margin="8,0,0,0"
VerticalAlignment="Top"
Click="Close_Click"/>
</DockPanel>
</Border>
<TextBlock x:Name="SummaryBlock"
Grid.Row="1"
Margin="0,0,0,8"
TextWrapping="Wrap"
Foreground="{DynamicResource WinMutedTextBrush}"/>
<Border Grid.Row="2"
BorderBrush="{DynamicResource WinBorderBrush}"
BorderThickness="1"
Background="{DynamicResource WinPanelBrush}"
Margin="0,0,0,8">
<ListView x:Name="DetailList"
Background="{DynamicResource WinPanelBrush}"
Foreground="{DynamicResource WinTextBrush}"
BorderThickness="0"
SelectionChanged="DetailList_SelectionChanged">
<ListView.View>
<GridView>
<GridViewColumn Width="130" Header="Timestamp" DisplayMemberBinding="{Binding Timestamp}"/>
<GridViewColumn Width="140" Header="Event" DisplayMemberBinding="{Binding Event}"/>
<GridViewColumn Width="76" Header="Severity" DisplayMemberBinding="{Binding Severity}"/>
<GridViewColumn Width="430" Header="Path / Target" DisplayMemberBinding="{Binding Detection}"/>
</GridView>
</ListView.View>
</ListView>
</Border>
<GridSplitter Grid.Row="3"
Height="5"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Background="{DynamicResource WinSubtleBorderBrush}"/>
<Border Grid.Row="4"
BorderBrush="{DynamicResource WinBorderBrush}"
BorderThickness="1"
Background="{DynamicResource WinPanelBrush}"
Margin="0,0,0,0">
<TextBox x:Name="DetailTextBox"
IsReadOnly="True"
AcceptsReturn="True"
TextWrapping="Wrap"
VerticalScrollBarVisibility="Auto"
HorizontalScrollBarVisibility="Auto"
FontFamily="Consolas"
FontSize="11"
BorderThickness="0"
Margin="0"/>
</Border>
<StackPanel Grid.Row="5"
Orientation="Horizontal"
HorizontalAlignment="Right"
Margin="0,10,0,0">
<Button Content="Close"
Padding="12,4"
Height="26"
Click="Close_Click"/>
</StackPanel>
</Grid>
</Window>