249 lines
13 KiB
XML
249 lines
13 KiB
XML
<Window x:Class="Raton.Windows.Tools"
|
|
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:Raton.Windows"
|
|
Loaded="Window_Loaded" Title="Tools" Width="640" Height="520" MinWidth="420" MinHeight="340"
|
|
Background="#FF202020" WindowStartupLocation="CenterOwner" ResizeMode="CanResize"
|
|
Icon="/Raton;component/RATA.ico">
|
|
<FrameworkElement.Resources>
|
|
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="#3A2D5A"/>
|
|
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}" Color="White"/>
|
|
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightBrushKey}" Color="#2E2240"/>
|
|
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightTextBrushKey}" Color="White"/>
|
|
<SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="#1E1E1E"/>
|
|
<Style TargetType="{x:Type TextBlock}">
|
|
<Setter Property="TextBlock.Foreground" Value="#CCCCCC"/>
|
|
<Setter Property="FrameworkElement.VerticalAlignment" Value="Center"/>
|
|
</Style>
|
|
<Style TargetType="{x:Type DataGridColumnHeader}">
|
|
<Setter Property="Control.Background" Value="#2A2A2A"/>
|
|
<Setter Property="Control.Foreground" Value="#888888"/>
|
|
<Setter Property="Control.FontSize" Value="11"/>
|
|
<Setter Property="Control.FontWeight" Value="SemiBold"/>
|
|
<Setter Property="FrameworkElement.Height" Value="28"/>
|
|
<Setter Property="Control.Padding" Value="10,0"/>
|
|
<Setter Property="Control.BorderBrush" Value="#333333"/>
|
|
<Setter Property="Control.BorderThickness" Value="0,0,1,1"/>
|
|
<Setter Property="FrameworkElement.Cursor" Value="Arrow"/>
|
|
<Setter Property="Control.Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type DataGridColumnHeader}">
|
|
<Border Background="{TemplateBinding Control.Background}"
|
|
BorderBrush="{TemplateBinding Control.BorderBrush}"
|
|
BorderThickness="{TemplateBinding Control.BorderThickness}"
|
|
Padding="{TemplateBinding Control.Padding}">
|
|
<ContentPresenter VerticalAlignment="Center"/>
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
<Style TargetType="{x:Type DataGridRow}">
|
|
<Setter Property="Control.Background" Value="Transparent"/>
|
|
<Setter Property="Control.Foreground" Value="#CCCCCC"/>
|
|
<Setter Property="Control.BorderThickness" Value="0"/>
|
|
<Setter Property="FrameworkElement.Height" Value="38"/>
|
|
<Setter Property="FrameworkElement.Cursor" Value="Hand"/>
|
|
<Setter Property="Control.Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type DataGridRow}">
|
|
<Border x:Name="Bd" Background="{TemplateBinding Control.Background}" BorderBrush="#2A2A2A"
|
|
BorderThickness="0,0,0,1">
|
|
<SelectiveScrollingGrid>
|
|
<DataGridCellsPresenter/>
|
|
</SelectiveScrollingGrid>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="UIElement.IsMouseOver" Value="true">
|
|
<Setter TargetName="Bd" Property="Border.Background" Value="#2A2A2A"/>
|
|
</Trigger>
|
|
<Trigger Property="DataGridRow.IsSelected" Value="true">
|
|
<Setter TargetName="Bd" Property="Border.Background" Value="#3A2D5A"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
<Style TargetType="{x:Type DataGridCell}">
|
|
<Setter Property="Control.BorderThickness" Value="0"/>
|
|
<Setter Property="FrameworkElement.FocusVisualStyle" Value="{x:Null}"/>
|
|
<Setter Property="Control.Padding" Value="4,0"/>
|
|
<Setter Property="Control.Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type DataGridCell}">
|
|
<Border Background="Transparent" Padding="{TemplateBinding Control.Padding}">
|
|
<ContentPresenter VerticalAlignment="Center"/>
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
<Style x:Key="ToolsGrid" TargetType="{x:Type DataGrid}">
|
|
<Setter Property="Control.Background" Value="#252525"/>
|
|
<Setter Property="Control.BorderBrush" Value="#333333"/>
|
|
<Setter Property="Control.BorderThickness" Value="1"/>
|
|
<Setter Property="DataGrid.GridLinesVisibility" Value="None"/>
|
|
<Setter Property="DataGrid.RowHeaderWidth" Value="0"/>
|
|
<Setter Property="DataGrid.CanUserAddRows" Value="false"/>
|
|
<Setter Property="DataGrid.CanUserDeleteRows" Value="false"/>
|
|
<Setter Property="DataGrid.CanUserResizeRows" Value="false"/>
|
|
<Setter Property="DataGrid.AutoGenerateColumns" Value="false"/>
|
|
<Setter Property="DataGrid.SelectionMode" Value="Single"/>
|
|
<Setter Property="DataGrid.IsReadOnly" Value="true"/>
|
|
<Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
|
|
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
|
|
<Setter Property="Control.Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type DataGrid}">
|
|
<Border Background="{TemplateBinding Control.Background}"
|
|
BorderBrush="{TemplateBinding Control.BorderBrush}"
|
|
BorderThickness="{TemplateBinding Control.BorderThickness}" CornerRadius="6" ClipToBounds="true">
|
|
<DockPanel>
|
|
<DataGridColumnHeadersPresenter DockPanel.Dock="Top"/>
|
|
<ScrollViewer Focusable="false" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
|
|
<ItemsPresenter/>
|
|
</ScrollViewer>
|
|
</DockPanel>
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
<Style x:Key="SearchBox" TargetType="{x:Type TextBox}">
|
|
<Setter Property="Control.Background" Value="#252525"/>
|
|
<Setter Property="Control.Foreground" Value="#CCCCCC"/>
|
|
<Setter Property="TextBoxBase.CaretBrush" Value="#CCCCCC"/>
|
|
<Setter Property="Control.BorderBrush" Value="#3A3A3A"/>
|
|
<Setter Property="Control.BorderThickness" Value="1"/>
|
|
<Setter Property="Control.Padding" Value="36,0,12,0"/>
|
|
<Setter Property="FrameworkElement.Height" Value="36"/>
|
|
<Setter Property="Control.FontSize" Value="13"/>
|
|
<Setter Property="Control.VerticalContentAlignment" Value="Center"/>
|
|
<Setter Property="Control.Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type TextBox}">
|
|
<Border Background="{TemplateBinding Control.Background}"
|
|
BorderBrush="{TemplateBinding Control.BorderBrush}"
|
|
BorderThickness="{TemplateBinding Control.BorderThickness}" CornerRadius="6">
|
|
<ScrollViewer x:Name="PART_ContentHost" Margin="{TemplateBinding Control.Padding}" VerticalAlignment="Center"/>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="UIElement.IsFocused" Value="true">
|
|
<Setter Property="Control.BorderBrush" Value="#7B5EA7"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</FrameworkElement.Resources>
|
|
<FrameworkElement.Triggers>
|
|
<EventTrigger RoutedEvent="Window.Loaded">
|
|
<BeginStoryboard>
|
|
<Storyboard>
|
|
<DoubleAnimation Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity" From="0" To="1"
|
|
Duration="0:0:0.25">
|
|
<DoubleAnimation.EasingFunction>
|
|
<CubicEase EasingMode="EaseOut"/>
|
|
</DoubleAnimation.EasingFunction>
|
|
</DoubleAnimation>
|
|
<DoubleAnimation Storyboard.TargetName="Root"
|
|
Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.Y)" From="6" To="0"
|
|
Duration="0:0:0.25">
|
|
<DoubleAnimation.EasingFunction>
|
|
<CubicEase EasingMode="EaseOut"/>
|
|
</DoubleAnimation.EasingFunction>
|
|
</DoubleAnimation>
|
|
</Storyboard>
|
|
</BeginStoryboard>
|
|
</EventTrigger>
|
|
</FrameworkElement.Triggers>
|
|
<Grid x:Name="Root" Margin="14">
|
|
<UIElement.RenderTransform>
|
|
<TranslateTransform Y="0"/>
|
|
</UIElement.RenderTransform>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="36"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition/>
|
|
<RowDefinition Height="28"/>
|
|
</Grid.RowDefinitions>
|
|
<Border Grid.Row="0" Background="#252525" CornerRadius="6" Padding="12,0" Margin="0,0,0,10">
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock Text="" FontFamily="Segoe MDL2 Assets" FontSize="13" Foreground="#7B5EA7" Margin="0,0,8,0"/>
|
|
<TextBlock x:Name="TbFolderPath" Text="Tools" Foreground="#888" FontSize="12"/>
|
|
</StackPanel>
|
|
</Border>
|
|
<Grid Row="1" Margin="0,0,0,10">
|
|
<TextBox TextChanged="TbSearch_TextChanged" x:Name="TbSearch" Style="{StaticResource SearchBox}"/>
|
|
<TextBlock Text="" FontFamily="Segoe MDL2 Assets" FontSize="13" Foreground="#555" IsHitTestVisible="false"
|
|
Margin="12,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Center"/>
|
|
<TextBlock x:Name="TbSearchPlaceholder" Text="Search tools..." Foreground="#555" FontSize="13"
|
|
IsHitTestVisible="false" Margin="36,0,0,0" VerticalAlignment="Center"/>
|
|
</Grid>
|
|
<DataGrid MouseDoubleClick="FilesGrid_MouseDoubleClick" x:Name="FilesGrid" Grid.Row="2"
|
|
Style="{StaticResource ToolsGrid}" Margin="0,0,0,10">
|
|
<DataGrid.Columns>
|
|
<DataGridTemplateColumn Header="NAME" Width="*" MinWidth="160">
|
|
<DataGridTemplateColumn.CellTemplate>
|
|
<DataTemplate>
|
|
<StackPanel Orientation="Horizontal" Margin="6,0">
|
|
<Border Width="24" Height="24" CornerRadius="4" Margin="0,0,10,0">
|
|
<Border.Background>
|
|
<LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
|
|
<GradientStop Color="#4A3A6A" Offset="0"/>
|
|
<GradientStop Color="#6B4E9A" Offset="1"/>
|
|
</LinearGradientBrush>
|
|
</Border.Background>
|
|
<TextBlock FontFamily="Segoe MDL2 Assets" FontSize="12" Foreground="#CCCCCC" HorizontalAlignment="Center"
|
|
VerticalAlignment="Center" Text="{Binding IconGlyph}"/>
|
|
</Border>
|
|
<TextBlock Foreground="#CCCCCC" FontSize="13" VerticalAlignment="Center" Text="{Binding FileName}"/>
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
</DataGridTemplateColumn.CellTemplate>
|
|
</DataGridTemplateColumn>
|
|
<DataGridTemplateColumn Header="TYPE" Width="72">
|
|
<DataGridTemplateColumn.CellTemplate>
|
|
<DataTemplate>
|
|
<Border Background="#2A1F3D" CornerRadius="4" Padding="6,2" HorizontalAlignment="Left" Margin="4,0">
|
|
<TextBlock Foreground="#9370C0" FontSize="11" FontWeight="SemiBold" Text="{Binding Extension}"/>
|
|
</Border>
|
|
</DataTemplate>
|
|
</DataGridTemplateColumn.CellTemplate>
|
|
</DataGridTemplateColumn>
|
|
<DataGridTextColumn Header="SIZE" Width="80" Binding="{Binding Size}">
|
|
<DataGridBoundColumn.ElementStyle>
|
|
<Style TargetType="{x:Type TextBlock}">
|
|
<Setter Property="TextBlock.Foreground" Value="#666"/>
|
|
<Setter Property="TextBlock.FontSize" Value="12"/>
|
|
<Setter Property="FrameworkElement.Margin" Value="8,0"/>
|
|
<Setter Property="FrameworkElement.VerticalAlignment" Value="Center"/>
|
|
</Style>
|
|
</DataGridBoundColumn.ElementStyle>
|
|
</DataGridTextColumn>
|
|
<DataGridTextColumn Header="MODIFIED" Width="130" Binding="{Binding LastModified}">
|
|
<DataGridBoundColumn.ElementStyle>
|
|
<Style TargetType="{x:Type TextBlock}">
|
|
<Setter Property="TextBlock.Foreground" Value="#666"/>
|
|
<Setter Property="TextBlock.FontSize" Value="12"/>
|
|
<Setter Property="FrameworkElement.Margin" Value="8,0"/>
|
|
<Setter Property="FrameworkElement.VerticalAlignment" Value="Center"/>
|
|
</Style>
|
|
</DataGridBoundColumn.ElementStyle>
|
|
</DataGridTextColumn>
|
|
</DataGrid.Columns>
|
|
</DataGrid>
|
|
<Border Grid.Row="3" Background="#252525" CornerRadius="6" Padding="12,0">
|
|
<Grid>
|
|
<TextBlock x:Name="TbStatus" Text="0 files" Foreground="#555" FontSize="11" HorizontalAlignment="Left"
|
|
VerticalAlignment="Center"/>
|
|
<TextBlock Text="Double-click to open" Foreground="#444" FontSize="11" HorizontalAlignment="Right"
|
|
VerticalAlignment="Center"/>
|
|
</Grid>
|
|
</Border>
|
|
</Grid>
|
|
</Window> |