Files
2026-08-27 11:23:13 -06:00

243 lines
13 KiB
XML

<Window x:Class="Raton.Windows.Preview"
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"
Title="Preview" Height="520" Width="820" Background="#161616" WindowStartupLocation="CenterScreen"
ResizeMode="NoResize">
<FrameworkElement.Resources>
<Style TargetType="{x:Type DataGridRow}">
<Setter Property="Control.Background" Value="Transparent"/>
<Setter Property="Control.Foreground" Value="White"/>
<Setter Property="Control.BorderThickness" Value="0"/>
<Style.Triggers>
<Trigger Property="UIElement.IsMouseOver" Value="true">
<Setter Property="Control.Background" Value="#252525"/>
</Trigger>
</Style.Triggers>
</Style>
<Style TargetType="{x:Type DataGridCell}">
<Setter Property="Control.BorderThickness" Value="0"/>
<Setter Property="FrameworkElement.FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="Control.Background" Value="Transparent"/>
<Setter Property="Control.Foreground" Value="#CCCCCC"/>
<Setter Property="FrameworkElement.HorizontalAlignment" Value="Stretch"/>
<Setter Property="FrameworkElement.VerticalAlignment" Value="Stretch"/>
<Setter Property="Control.VerticalContentAlignment" Value="Center"/>
<Style.Triggers>
<Trigger Property="DataGridCell.IsSelected" Value="true">
<Setter Property="Control.Background" Value="Transparent"/>
<Setter Property="Control.Foreground" Value="White"/>
<Setter Property="Control.BorderBrush" Value="Transparent"/>
</Trigger>
</Style.Triggers>
</Style>
<Style TargetType="{x:Type DataGridColumnHeader}">
<Setter Property="Control.Background" Value="#1E1E1E"/>
<Setter Property="Control.Foreground" Value="#888888"/>
<Setter Property="Control.FontWeight" Value="SemiBold"/>
<Setter Property="Control.FontSize" Value="11"/>
<Setter Property="Control.HorizontalContentAlignment" Value="Left"/>
<Setter Property="Control.Padding" Value="14,0"/>
<Setter Property="Control.BorderThickness" Value="0,0,0,1"/>
<Setter Property="Control.BorderBrush" Value="#2A2A2A"/>
</Style>
<Style TargetType="{x:Type ContextMenu}">
<Setter Property="UIElement.SnapsToDevicePixels" Value="true"/>
<Setter Property="FrameworkElement.OverridesDefaultStyle" Value="true"/>
<Setter Property="Control.Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ContextMenu}">
<Border Background="#242424" BorderBrush="#383838" BorderThickness="1" CornerRadius="6" Padding="0,4">
<UIElement.Effect>
<DropShadowEffect Color="Black" BlurRadius="14" ShadowDepth="3" Opacity="0.5" Direction="270"/>
</UIElement.Effect>
<ScrollViewer CanContentScroll="true" Background="Transparent" VerticalScrollBarVisibility="Auto">
<ItemsPresenter/>
</ScrollViewer>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type MenuItem}">
<Setter Property="FrameworkElement.OverridesDefaultStyle" Value="true"/>
<Setter Property="UIElement.SnapsToDevicePixels" Value="true"/>
<Setter Property="Control.Foreground" Value="#DDDDDD"/>
<Setter Property="Control.Background" Value="Transparent"/>
<Setter Property="Control.FontSize" Value="12.5"/>
<Setter Property="Control.Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type MenuItem}">
<Border x:Name="Bd" Background="{TemplateBinding Control.Background}" CornerRadius="3" Margin="4,1"
Padding="8,6">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="20"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<ContentPresenter Content="{TemplateBinding MenuItem.Icon}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<ContentPresenter Grid.Column="1" ContentSource="Header" VerticalAlignment="Center" Margin="6,0,0,0"/>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="MenuItem.IsHighlighted" Value="true">
<Setter TargetName="Bd" Property="Border.Background" Value="#333333"/>
</Trigger>
<Trigger Property="MenuItem.IsPressed" Value="true">
<Setter TargetName="Bd" Property="Border.Background" Value="#3E3E3E"/>
</Trigger>
<Trigger Property="UIElement.IsEnabled" Value="false">
<Setter Property="Control.Foreground" Value="#555555"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="MenuIcon" TargetType="{x:Type TextBlock}">
<Setter Property="TextBlock.FontFamily" Value="Segoe MDL2 Assets"/>
<Setter Property="TextBlock.FontSize" Value="13"/>
<Setter Property="TextBlock.Foreground" Value="#AAAAAA"/>
<Setter Property="FrameworkElement.VerticalAlignment" Value="Center"/>
<Setter Property="TextBlock.TextAlignment" Value="Center"/>
</Style>
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="#252525"/>
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}" Color="White"/>
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightBrushKey}" Color="#1E1E1E"/>
</FrameworkElement.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="135*"/>
<ColumnDefinition Width="272*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="32"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid Row="1" ColumnSpan="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="320"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Border Grid.Column="0" Background="#FF202020" BorderBrush="#2A2A2A" BorderThickness="0,0,1,0"
Margin="0,-31,0,0">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="260"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Border Grid.Row="0" Margin="16,16,16,0" CornerRadius="6" Background="#0D0D0D" BorderBrush="#2E2E2E"
BorderThickness="1">
<UIElement.Effect>
<DropShadowEffect Color="Black" BlurRadius="20" ShadowDepth="0" Opacity="0.6"/>
</UIElement.Effect>
<Grid>
<Image x:Name="PreviewImage" Stretch="Uniform" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
<StackPanel x:Name="PlaceholderPanel" VerticalAlignment="Center" HorizontalAlignment="Center">
<TextBlock Text="" FontFamily="Segoe MDL2 Assets" FontSize="38" Foreground="#2A2A2A"
HorizontalAlignment="Center"/>
<TextBlock Text="The connection may be slow" Foreground="#3A3A3A" FontSize="11" HorizontalAlignment="Center"
Margin="0,8,0,0"/>
</StackPanel>
</Grid>
</Border>
<Border Grid.Row="1" Margin="16,14,16,0" Background="#1A1A1A" CornerRadius="4" Padding="10,6">
<StackPanel Orientation="Horizontal">
<Border Width="3" Height="14" CornerRadius="2" Background="#4A94BC" Margin="0,0,8,0"
VerticalAlignment="Center"/>
<TextBlock Text="D E T A I L S" Foreground="#666" FontSize="10" FontWeight="Bold" VerticalAlignment="Center"/>
</StackPanel>
</Border>
<StackPanel Grid.Row="2" Margin="16,12,16,0" Orientation="Vertical">
<Border Background="#1A1A1A" CornerRadius="4" Padding="10,8" Margin="0,0,0,6">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal">
<TextBlock Text="" FontFamily="Segoe MDL2 Assets" FontSize="12" Foreground="#555" VerticalAlignment="Center"
Margin="0,0,7,0"/>
<TextBlock Text="Entries" Foreground="#666" FontSize="12" VerticalAlignment="Center"/>
</StackPanel>
<TextBlock x:Name="TbEntryCount" Grid.Column="1" Text="0" Foreground="#4A94BC" FontSize="13"
FontWeight="SemiBold" VerticalAlignment="Center"/>
</Grid>
</Border>
<Border Background="#1A1A1A" CornerRadius="4" Padding="10,8" Margin="0,0,0,6">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal">
<TextBlock Text="" FontFamily="Segoe MDL2 Assets" FontSize="12" Foreground="#555" VerticalAlignment="Center"
Margin="0,0,7,0"/>
<TextBlock Text="Right click to update the preview" Foreground="#666" FontSize="12" VerticalAlignment="Center"/>
</StackPanel>
<TextBlock x:Name="sdadsad" Grid.Column="1" Text=" " Foreground="#4A94BC" FontSize="13" FontWeight="SemiBold"
VerticalAlignment="Center"/>
</Grid>
</Border>
</StackPanel>
</Grid>
</Border>
<Grid Column="1" Background="#161616">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Border Grid.Row="0" Background="#1A1A1A" BorderBrush="#2A2A2A" BorderThickness="0,0,0,1" Padding="16,10"
Margin="0,-34,0,34">
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
<TextBlock Text="" FontFamily="Segoe MDL2 Assets" FontSize="13" Foreground="White" VerticalAlignment="Center"
Margin="0,0,8,0"/>
<TextBlock Text="Preview data" Foreground="#CCCCCC" FontSize="13" FontWeight="SemiBold"
VerticalAlignment="Center"/>
</StackPanel>
</Border>
<DataGrid x:Name="InfoGrid" Background="Transparent" BorderThickness="0" AutoGenerateColumns="false"
GridLinesVisibility="Horizontal" HorizontalGridLinesBrush="#1F1F1F" HeadersVisibility="Column"
RowHeight="44" MinRowHeight="44" ColumnHeaderHeight="34" SelectionMode="Single"
CanUserAddRows="false" CanUserDeleteRows="false" CanUserReorderColumns="false"
CanUserResizeRows="false" IsReadOnly="true" IsSynchronizedWithCurrentItem="False" Grid.RowSpan="2">
<FrameworkElement.ContextMenu>
<ContextMenu>
<MenuItem Click="MenuItemReload_Click" Header="Reload">
<MenuItem.Icon>
<TextBlock Text="" Style="{StaticResource MenuIcon}" Foreground="#4A94BC"/>
</MenuItem.Icon>
</MenuItem>
</ContextMenu>
</FrameworkElement.ContextMenu>
<DataGrid.Columns>
<DataGridTemplateColumn Header="RESOURCE" Width="200">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center" MinHeight="44"
Margin="14,0">
<TextBlock Text="" FontFamily="Segoe MDL2 Assets" FontSize="11" Foreground="#4A94BC"
VerticalAlignment="Center" Margin="0,0,7,0"/>
<TextBlock Foreground="#AAAAAA" FontSize="12" VerticalAlignment="Center" Text="{Binding Resource}"/>
</StackPanel>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Header="INFORMATION" Width="*">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Border MinHeight="44" VerticalAlignment="Stretch">
<TextBlock Foreground="#E0E0E0" FontSize="12" HorizontalAlignment="Left" VerticalAlignment="Center"
TextTrimming="CharacterEllipsis" Margin="14,0" Text="{Binding Information}"/>
</Border>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</Grid>
</Grid>
</Grid>
</Window>