mirror of
https://github.com/chylex/Backup-Essentials.git
synced 2024-09-14 09:42:50 +02:00
166 lines
13 KiB
XML
166 lines
13 KiB
XML
<Window
|
|
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:sys="clr-namespace:System;assembly=mscorlib"
|
|
xmlns:custom="clr-namespace:BackupEssentials.Controls"
|
|
xmlns:system="clr-namespace:BackupEssentials.Sys"
|
|
xmlns:Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
|
|
mc:Ignorable="d" x:Class="BackupEssentials.MainWindow"
|
|
Title="Backup" Height="600" Width="800" WindowStartupLocation="CenterScreen" WindowStyle="None" ResizeMode="CanResizeWithGrip" Background="#FF000000" AllowsTransparency="True" AllowDrop="True" MinWidth="800" MinHeight="600" DragEnter="OnDragEnter" DragLeave="OnDragLeave" Drop="OnDragDrop">
|
|
<Window.Resources>
|
|
<Style TargetType="ResizeGrip">
|
|
<Setter Property="Margin" Value="2"/>
|
|
</Style>
|
|
</Window.Resources>
|
|
|
|
<Grid Background="#FF171717">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="36"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<DockPanel x:Name="TitleBar" Style="{StaticResource DockPanelStyleTitleBar}" MouseLeftButtonDown="TitleBarLeftButtonDown">
|
|
<Image DockPanel.Dock="Left" Source="/BackupEssentials;component/Resources/Icon.ico" Margin="7,4,4,2" Width="24" Height="24"/>
|
|
<TextBlock DockPanel.Dock="Left" VerticalAlignment="Center" Foreground="#FFBBBBBB" FontSize="18" Margin="0,2,0,0">Backup Essentials</TextBlock>
|
|
|
|
<WrapPanel Style="{StaticResource WrapPanelStyleTitleBar}" Width="120" DockPanel.Dock="Right">
|
|
<custom:ButtonTitleBar x:Name="ButtonWindowClose" CXPathData="{StaticResource PathButtonClose}" CXPathWidth="16" CXPathHeight="16" CXPathMargin="0,2,0,0" CXPathRotation="-45" HorizontalContentAlignment="Center" Style="{DynamicResource ButtonStyleTitleBar}" Click="ButtonWindowCloseClick"/>
|
|
<custom:ButtonTitleBar x:Name="ButtonWindowToggle" CXPathData="{StaticResource PathButtonMaximized}" CXPathWidth="14" CXPathHeight="14" CXPathMargin="0,3,0,0" HorizontalContentAlignment="Center" Style="{DynamicResource ButtonStyleTitleBar}" Click="ButtonWindowToggleClick"/>
|
|
<custom:ButtonTitleBar x:Name="ButtonWindowMinimize" CXPathData="{StaticResource PathButtonMinimize}" CXPathWidth="12" CXPathHeight="2" CXPathMargin="0,12,0,0" HorizontalContentAlignment="Center" Style="{DynamicResource ButtonStyleTitleBar}" Click="ButtonWindowMinimizeClick"/>
|
|
</WrapPanel>
|
|
</DockPanel>
|
|
|
|
<Grid Background="#FF2E2E2E" Grid.Row="1" Margin="2,0,2,2">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="2"/>
|
|
<RowDefinition Height="60"/>
|
|
<RowDefinition Height="2"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<Rectangle StrokeThickness="0" VerticalAlignment="Center" Height="2">
|
|
<Rectangle.Fill>
|
|
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
|
|
<GradientStop Color="#FF060606" Offset="0"/>
|
|
<GradientStop Color="#FF6C6C6C" Offset="1"/>
|
|
</LinearGradientBrush>
|
|
</Rectangle.Fill>
|
|
</Rectangle>
|
|
<Rectangle StrokeThickness="0" VerticalAlignment="Center" Grid.Row="2" Height="1">
|
|
<Rectangle.Fill>
|
|
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
|
|
<GradientStop Color="#FF6C6C6C" Offset="0"/>
|
|
<GradientStop Color="#FF060606" Offset="1"/>
|
|
</LinearGradientBrush>
|
|
</Rectangle.Fill>
|
|
</Rectangle>
|
|
|
|
<Grid Height="60" Margin="0" Grid.Row="1" VerticalAlignment="Top" Background="#FF1D1D1D" DataContext="{Binding Source={x:Static system:Settings.Default}}">
|
|
<Grid.Resources>
|
|
<Style x:Key="ButtonStyleMainMenu" TargetType="{x:Type Button}">
|
|
<Setter Property="Foreground" Value="#FFEEEEEE"/>
|
|
<Setter Property="Background">
|
|
<Setter.Value>
|
|
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
|
|
<GradientStop Color="#FFAEAEAE" Offset="0"/>
|
|
<GradientStop Color="#FF666666" Offset="1"/>
|
|
</LinearGradientBrush>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Setter Property="SnapsToDevicePixels" Value="True"/>
|
|
<Setter Property="TextOptions.TextRenderingMode" Value="ClearType"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type ButtonBase}">
|
|
<Grid x:Name="MainMenuButtonGrid" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup x:Name="CommonStates">
|
|
<VisualStateGroup.Transitions>
|
|
<VisualTransition From="Normal" GeneratedDuration="0:0:0.15" To="MouseOver"/>
|
|
<VisualTransition From="MouseOver" GeneratedDuration="0:0:0.05" To="Pressed"/>
|
|
<VisualTransition From="Pressed" GeneratedDuration="0:0:0.1" To="Normal"/>
|
|
<VisualTransition From="MouseOver" GeneratedDuration="0:0:0.1" To="Normal"/>
|
|
</VisualStateGroup.Transitions>
|
|
<VisualState x:Name="Normal">
|
|
<Storyboard>
|
|
<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="GridBackground">
|
|
<EasingColorKeyFrame KeyTime="0" Value="#FF3C3C3C"/>
|
|
</ColorAnimationUsingKeyFrames>
|
|
<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="GridBackground">
|
|
<EasingColorKeyFrame KeyTime="0" Value="#FF4B4B4B"/>
|
|
</ColorAnimationUsingKeyFrames>
|
|
<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)" Storyboard.TargetName="label">
|
|
<EasingColorKeyFrame KeyTime="0" Value="#FFAEAEAE"/>
|
|
</ColorAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="MouseOver">
|
|
<Storyboard>
|
|
<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="GridBackground">
|
|
<EasingColorKeyFrame KeyTime="0" Value="#D842B9F0"/>
|
|
</ColorAnimationUsingKeyFrames>
|
|
<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="GridBackground">
|
|
<EasingColorKeyFrame KeyTime="0" Value="#D81D6C8F"/>
|
|
</ColorAnimationUsingKeyFrames>
|
|
<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)" Storyboard.TargetName="label">
|
|
<EasingColorKeyFrame KeyTime="0" Value="#FFDADADA"/>
|
|
</ColorAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="Pressed"/>
|
|
</VisualStateGroup>
|
|
</VisualStateManager.VisualStateGroups>
|
|
|
|
<Grid x:Name="GridBackground" Width="Auto" Height="Auto">
|
|
<Grid.Background>
|
|
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
|
|
<GradientStop Color="#FF42B9F0"/>
|
|
<GradientStop Color="#FF1D6C8F" Offset="1"/>
|
|
</LinearGradientBrush>
|
|
</Grid.Background>
|
|
|
|
<Label x:Name="label" Content="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White" FontSize="25" FontWeight="Bold" FontFamily="Segoe UI" TextOptions.TextFormattingMode="Display" RenderOptions.BitmapScalingMode="NearestNeighbor" SnapsToDevicePixels="True" UseLayoutRounding="True">
|
|
<Label.Effect>
|
|
<DropShadowEffect BlurRadius="3" Direction="270" ShadowDepth="1" Color="#FF072B3C"/>
|
|
</Label.Effect>
|
|
</Label>
|
|
</Grid>
|
|
</Grid>
|
|
<ControlTemplate.Triggers/>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</Grid.Resources>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="1*"/>
|
|
<ColumnDefinition Width="1"/>
|
|
<ColumnDefinition Width="1*"/>
|
|
<ColumnDefinition Width="1"/>
|
|
<ColumnDefinition Width="1*"/>
|
|
<ColumnDefinition Width="1"/>
|
|
<ColumnDefinition Width="1*"/>
|
|
<ColumnDefinition Width="1"/>
|
|
<ColumnDefinition Width="1*"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<custom:ButtonMainMenu Content="{Binding Language[General.UI.MenuButton.Home]}" ClickPage="Pages.Home" IsChecked="True" Click="ButtonMainMenuClick" Style="{DynamicResource ButtonStyleMainMenu}"/>
|
|
<custom:ButtonMainMenu Content="{Binding Language[General.UI.MenuButton.Backup]}" ClickPage="Pages.Backup" Click="ButtonMainMenuClick" Grid.Column="2" Style="{DynamicResource ButtonStyleMainMenu}"/>
|
|
<custom:ButtonMainMenu Content="{Binding Language[General.UI.MenuButton.History]}" ClickPage="Pages.History" Click="ButtonMainMenuClick" Grid.Column="4" Style="{DynamicResource ButtonStyleMainMenu}"/>
|
|
<custom:ButtonMainMenu Content="{Binding Language[General.UI.MenuButton.Settings]}" ClickPage="Pages.Settings" Click="ButtonMainMenuClick" Grid.Column="6" Style="{DynamicResource ButtonStyleMainMenu}"/>
|
|
<custom:ButtonMainMenu Content="{Binding Language[General.UI.MenuButton.About]}" ClickPage="Pages.About" Click="ButtonMainMenuClick" Grid.Column="8" Style="{DynamicResource ButtonStyleMainMenu}"/>
|
|
</Grid>
|
|
<Frame x:Name="ContentFrame" Content="" Margin="0" Grid.Row="3" AllowDrop="True" NavigationUIVisibility="Hidden"/>
|
|
</Grid>
|
|
|
|
<Grid Grid.Row="1">
|
|
<Label x:Name="DropOverlayLabel" Background="#99151515" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Visibility="Hidden">
|
|
<TextBlock x:Name="DropOverlayTextBlock" Foreground="#FFDDDDDD" FontSize="48" Margin="0,0,0,36">Drop to backup</TextBlock>
|
|
</Label>
|
|
</Grid>
|
|
</Grid>
|
|
</Window>
|