308 lines
17 KiB
XML
308 lines
17 KiB
XML
<Window x:Class="Raton.Windows.ClientFolders"
|
|
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="Clients" Width="640" Height="520" MinWidth="420" MinHeight="340"
|
|
Background="#1E1E1E" 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="FoldersGrid" 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="DataGrid.EnableColumnVirtualization" Value="false"/>
|
|
<Setter Property="DataGrid.EnableRowVirtualization" Value="true"/>
|
|
<Setter Property="VirtualizingPanel.IsVirtualizing" Value="true"/>
|
|
<Setter Property="VirtualizingPanel.VirtualizationMode" Value="Recycling"/>
|
|
<Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
|
|
<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">
|
|
<ScrollViewer x:Name="DG_ScrollViewer" Focusable="false" HorizontalScrollBarVisibility="Disabled"
|
|
VerticalScrollBarVisibility="Auto">
|
|
<Control.Template>
|
|
<ControlTemplate TargetType="{x:Type ScrollViewer}">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
<DataGridColumnHeadersPresenter x:Name="PART_ColumnHeadersPresenter" Grid.Row="0"/>
|
|
<ScrollContentPresenter x:Name="PART_ScrollContentPresenter" Grid.Row="1"
|
|
CanContentScroll="{TemplateBinding ScrollViewer.CanContentScroll}"/>
|
|
<ScrollBar x:Name="PART_VerticalScrollBar" Grid.Row="1" Orientation="Vertical" HorizontalAlignment="Right"
|
|
Visibility="{TemplateBinding ScrollViewer.ComputedVerticalScrollBarVisibility}"
|
|
Maximum="{TemplateBinding ScrollViewer.ScrollableHeight}"
|
|
ViewportSize="{TemplateBinding ScrollViewer.ViewportHeight}"
|
|
Value="{TemplateBinding ScrollViewer.VerticalOffset}"/>
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Control.Template>
|
|
<ItemsPresenter/>
|
|
</ScrollViewer>
|
|
</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>
|
|
<Style x:Key="BackButton" TargetType="{x:Type Button}">
|
|
<Setter Property="Control.Background" Value="Transparent"/>
|
|
<Setter Property="Control.BorderThickness" Value="0"/>
|
|
<Setter Property="FrameworkElement.Cursor" Value="Hand"/>
|
|
<Setter Property="FrameworkElement.Width" Value="28"/>
|
|
<Setter Property="FrameworkElement.Height" Value="28"/>
|
|
<Setter Property="FrameworkElement.Margin" Value="0,0,8,0"/>
|
|
<Setter Property="Control.Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type Button}">
|
|
<Border x:Name="Bd" Background="Transparent" CornerRadius="5">
|
|
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="UIElement.IsMouseOver" Value="true">
|
|
<Setter TargetName="Bd" Property="Border.Background" Value="#3A2D5A"/>
|
|
</Trigger>
|
|
<Trigger Property="ButtonBase.IsPressed" Value="true">
|
|
<Setter TargetName="Bd" Property="Border.Background" Value="#2E2240"/>
|
|
</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="8,0" Margin="0,0,0,10">
|
|
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
|
|
<Button Click="BtnBack_Click" x:Name="BtnBack" Style="{StaticResource BackButton}" Visibility="Collapsed"
|
|
ToolTip="Go back">
|
|
<TextBlock Text="" FontFamily="Segoe MDL2 Assets" FontSize="12" Foreground="#9370C0"/>
|
|
</Button>
|
|
<TextBlock Text="" FontFamily="Segoe MDL2 Assets" FontSize="13" Foreground="#7B5EA7" Margin="0,0,8,0"/>
|
|
<TextBlock x:Name="TbFolderPath" Text="Clients" 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 folders..." Foreground="#555" FontSize="13"
|
|
IsHitTestVisible="false" Margin="36,0,0,0" VerticalAlignment="Center"/>
|
|
</Grid>
|
|
<Grid Row="2" Margin="0,0,0,10">
|
|
<DataGrid MouseDoubleClick="FoldersGrid_MouseDoubleClick" x:Name="FoldersGrid"
|
|
Style="{StaticResource FoldersGrid}">
|
|
<DataGrid.Columns>
|
|
<DataGridTemplateColumn Header="NAME" Width="*" MinWidth="160">
|
|
<DataGridTemplateColumn.CellTemplate>
|
|
<DataTemplate>
|
|
<StackPanel Orientation="Horizontal" Margin="6,0">
|
|
<Border Height="1" Background="Transparent" Width="{Binding IndentWidth}"/>
|
|
<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 FolderName}"/>
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
</DataGridTemplateColumn.CellTemplate>
|
|
</DataGridTemplateColumn>
|
|
<DataGridTemplateColumn Header="LEVEL" 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 DepthLabel}"/>
|
|
</Border>
|
|
</DataTemplate>
|
|
</DataGridTemplateColumn.CellTemplate>
|
|
</DataGridTemplateColumn>
|
|
<DataGridTextColumn Header="ITEMS" Width="80" Binding="{Binding ItemCount}">
|
|
<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 x:Name="ToastEmpty" Background="#2A1F3D" BorderBrush="#7B5EA7" BorderThickness="1" CornerRadius="8"
|
|
Padding="16,10" HorizontalAlignment="Center" VerticalAlignment="Center" Opacity="0"
|
|
IsHitTestVisible="false">
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock Text="" FontFamily="Segoe MDL2 Assets" FontSize="14" Foreground="#9370C0" Margin="0,0,10,0"/>
|
|
<TextBlock Text="This folder is empty" Foreground="#CCCCCC" FontSize="13"/>
|
|
</StackPanel>
|
|
</Border>
|
|
</Grid>
|
|
<Border Grid.Row="3" Background="#252525" CornerRadius="6" Padding="12,0">
|
|
<Grid>
|
|
<TextBlock x:Name="TbStatus" Text="0 folders" 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> |