<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: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" MinWidth="800" MinHeight="600">
    <Window.Resources>
        <sys:String x:Key="PathButtonClose">M7,0 L9,0 9,7 16,7 16,9 9,9 9,16 7,16 7,9 0,9 0,7 7,7 z</sys:String>
        <sys:String x:Key="PathButtonMaximized">M1,2 L1,9 13,9 13,2 z M0,0 L14,0 14,10 0,10 z</sys:String>
        <sys:String x:Key="PathButtonWindowed">M2.5,3.75 L2.5,8.75 10.5,8.75 10.5,3.75 z M1.5,1.75 L11.5,1.75 11.5,9.75 1.5,9.75 z M0,0 L10,0 10,1.25 1,1.25 1,2 1,7 1,8 0,8 z</sys:String>
        <sys:String x:Key="PathButtonMinimize">M0,0 L20,0 L20,3 L0,3 z</sys:String>
    </Window.Resources>
    <Grid Background="#FF2E2E2E">
		<Grid.RowDefinitions>
            <RowDefinition Height="36"/>
            <RowDefinition Height="2"/>
            <RowDefinition Height="60"/>
            <RowDefinition Height="2"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="16"/>
		</Grid.RowDefinitions>
		<DockPanel x:Name="TitleBar" LastChildFill="False" VerticalAlignment="Top" Width="Auto" Height="36" MouseLeftButtonDown="TitleBarLeftButtonDown">
			<DockPanel.Background>
				<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
					<GradientStop Color="#FF171717" Offset="0"/>
					<GradientStop Color="#FF1D1D1D" Offset="1"/>
				</LinearGradientBrush>
			</DockPanel.Background>
			<WrapPanel Height="36" VerticalAlignment="Top" Width="120" Orientation="Horizontal" DockPanel.Dock="Top" HorizontalAlignment="Right" FlowDirection="RightToLeft">
				<WrapPanel.Resources>
					<Style x:Key="ButtonStyleTitleBar" TargetType="{x:Type Button}">
						<Setter Property="HorizontalContentAlignment" Value="Center"/>
						<Setter Property="VerticalContentAlignment" Value="Center"/>
						<Setter Property="Width" Value="36"/>
						<Setter Property="Height" Value="36"/>
						<Setter Property="Padding" Value="3"/>
						<Setter Property="RenderOptions.EdgeMode" Value="Aliased"/>
						<Setter Property="Template">
							<Setter.Value>
								<ControlTemplate TargetType="{x:Type Button}">
									<Grid HorizontalAlignment="Left" Height="36" VerticalAlignment="Top" Width="36">
										<VisualStateManager.VisualStateGroups>
											<VisualStateGroup x:Name="CommonStates">
												<VisualStateGroup.Transitions>
													<VisualTransition GeneratedDuration="0:0:0.1" To="MouseOver">
														<Storyboard>
															<PointAnimation Duration="0:0:0.12" To="36,0" Storyboard.TargetProperty="(UIElement.Clip).(PathGeometry.Figures)[0].(PathFigure.Segments)[1].(LineSegment.Point)" Storyboard.TargetName="GridHover"/>
															<PointAnimation Duration="0:0:0.12" To="0,36" Storyboard.TargetProperty="(UIElement.Clip).(PathGeometry.Figures)[0].(PathFigure.StartPoint)" Storyboard.TargetName="GridHover"/>
															<PointAnimation Duration="0:0:0.12" To="36,36" Storyboard.TargetProperty="(UIElement.Clip).(PathGeometry.Figures)[0].(PathFigure.Segments)[0].(LineSegment.Point)" Storyboard.TargetName="GridHover"/>
															<PointAnimation Duration="0:0:0.12" To="0,0" Storyboard.TargetProperty="(UIElement.Clip).(PathGeometry.Figures)[0].(PathFigure.Segments)[2].(LineSegment.Point)" Storyboard.TargetName="GridHover"/>
														</Storyboard>
													</VisualTransition>
												</VisualStateGroup.Transitions>
												<VisualState x:Name="Normal"/>
												<VisualState x:Name="MouseOver">
													<Storyboard>
														<PointAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Clip).(PathGeometry.Figures)[0].(PathFigure.StartPoint)" Storyboard.TargetName="GridHover">
															<EasingPointKeyFrame KeyTime="0" Value="0,36"/>
														</PointAnimationUsingKeyFrames>
														<PointAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Clip).(PathGeometry.Figures)[0].(PathFigure.Segments)[0].(LineSegment.Point)" Storyboard.TargetName="GridHover">
															<EasingPointKeyFrame KeyTime="0" Value="36,36"/>
														</PointAnimationUsingKeyFrames>
														<PointAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Clip).(PathGeometry.Figures)[0].(PathFigure.Segments)[1].(LineSegment.Point)" Storyboard.TargetName="GridHover">
															<EasingPointKeyFrame KeyTime="0" Value="36,0"/>
														</PointAnimationUsingKeyFrames>
														<PointAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Clip).(PathGeometry.Figures)[0].(PathFigure.Segments)[2].(LineSegment.Point)" Storyboard.TargetName="GridHover">
															<EasingPointKeyFrame KeyTime="0" Value="0,0"/>
														</PointAnimationUsingKeyFrames>
													</Storyboard>
												</VisualState>
												<VisualState x:Name="Pressed"/>
												<VisualState x:Name="Disabled"/>
											</VisualStateGroup>
										</VisualStateManager.VisualStateGroups>
										<Rectangle x:Name="CollisionBackground" Fill="#FFFFFFFF" HorizontalAlignment="Stretch" Height="36" VerticalAlignment="Stretch" Width="36" Visibility="Visible" Opacity="0"/>
										<Grid x:Name="GridDefault">
                                            <Rectangle x:Name="ButtonBackground" Fill="#FFC3C3C3" HorizontalAlignment="Stretch" Height="0" VerticalAlignment="Bottom" Width="36" Visibility="Visible" StrokeThickness="0"/>
                                            <Path x:Name="ButtonForeground" Fill="#FFC3C3C3" HorizontalAlignment="Center" VerticalAlignment="Center" Width="{Binding CXPathWidth, RelativeSource={RelativeSource TemplatedParent}}" Height="{Binding CXPathHeight, RelativeSource={RelativeSource TemplatedParent}}" Margin="{Binding CXPathMargin, RelativeSource={RelativeSource TemplatedParent}}" StrokeThickness="0" Data="{Binding CXPathData, RelativeSource={RelativeSource TemplatedParent}}" RenderTransformOrigin="0.5,0.5" Stretch="Fill">
												<Path.RenderTransform>
													<TransformGroup>
														<RotateTransform Angle="{Binding CXPathRotation, RelativeSource={RelativeSource TemplatedParent}}"/>
													</TransformGroup>
												</Path.RenderTransform>
											</Path>
										</Grid>
										<Grid x:Name="GridHover">
											<Grid.Clip>
												<PathGeometry>
													<PathFigure IsClosed="True" StartPoint="0,36">
														<LineSegment Point="36,36"/>
														<LineSegment Point="36,36"/>
														<LineSegment Point="0,36"/>
													</PathFigure>
												</PathGeometry>
											</Grid.Clip>
											<Rectangle x:Name="ButtonBackgroundHover" HorizontalAlignment="Stretch" Height="36" VerticalAlignment="Bottom" Width="36" Visibility="Visible" StrokeThickness="0">
												<Rectangle.Fill>
													<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
														<GradientStop Color="#FF2C2C2C" Offset="0"/>
														<GradientStop Color="#FF252525" Offset="1"/>
													</LinearGradientBrush>
												</Rectangle.Fill>
											</Rectangle>
                                            <Path x:Name="ButtonForegroundHover" Fill="#FF38B6FD" HorizontalAlignment="Center" VerticalAlignment="Center" Width="{Binding CXPathWidth, RelativeSource={RelativeSource TemplatedParent}}" Height="{Binding CXPathHeight, RelativeSource={RelativeSource TemplatedParent}}" Margin="{Binding CXPathMargin, RelativeSource={RelativeSource TemplatedParent}}" StrokeThickness="0" Data="{Binding CXPathData, RelativeSource={RelativeSource TemplatedParent}}" RenderTransformOrigin="0.5,0.5" Stretch="Fill" Stroke="{x:Null}">
                                                 <Path.RenderTransform>
													<TransformGroup>
														<RotateTransform Angle="{Binding CXPathRotation, RelativeSource={RelativeSource TemplatedParent}}"/>
													</TransformGroup>
												</Path.RenderTransform>
											</Path>
										</Grid>
									</Grid>
									<ControlTemplate.Triggers>
										<Trigger Property="IsKeyboardFocused" Value="true"/>
										<Trigger Property="ToggleButton.IsChecked" Value="true"/>
										<Trigger Property="IsEnabled" Value="false">
											<Setter Property="Foreground" Value="#ADADAD"/>
										</Trigger>
									</ControlTemplate.Triggers>
								</ControlTemplate>
							</Setter.Value>
						</Setter>
					</Style>
				</WrapPanel.Resources>
				<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>
        
		<Rectangle StrokeThickness="0" VerticalAlignment="Center" Grid.Row="1" 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="3" 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="2" VerticalAlignment="Top" Background="#FF1D1D1D">
			<Grid.Resources>
                <Style x:Key="ButtonStyleMainMenu" TargetType="{x:Type Button}">
                    <Setter Property="Foreground" Value="#FFFFFFFF"/>
                    <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="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="{x:Type ButtonBase}">
                                <Grid 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" Height="Auto" Width="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="24" FontWeight="Bold" FontFamily="Segoe UI">
                                        	<Label.Effect>
                                        		<DropShadowEffect BlurRadius="2" Direction="270" ShadowDepth="0.5" Color="#FF072B3C"/>
                                        	</Label.Effect>
                                        </Label>
                                    </Grid>
                                </Grid>
                                <ControlTemplate.Triggers>
                                    <Trigger Property="ToggleButton.IsChecked" Value="True"/>
                                </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="Home" Click="ButtonMainMenuClick" Style="{DynamicResource ButtonStyleMainMenu}"/>
            <custom:ButtonMainMenu Content="Backup" Click="ButtonMainMenuClick" Grid.Column="2" Style="{DynamicResource ButtonStyleMainMenu}"/>
            <custom:ButtonMainMenu Content="History" Click="ButtonMainMenuClick" Grid.Column="4" Style="{DynamicResource ButtonStyleMainMenu}"/>
            <custom:ButtonMainMenu Content="Settings" Click="ButtonMainMenuClick" Grid.Column="6" Style="{DynamicResource ButtonStyleMainMenu}"/>
            <custom:ButtonMainMenu Content="About" Click="ButtonMainMenuClick" Grid.Column="8" Style="{DynamicResource ButtonStyleMainMenu}"/>
		</Grid>
        <Frame x:Name="ContentFrame" Content="" Margin="0" Grid.Row="4" NavigationUIVisibility="Hidden"/>
    </Grid>
</Window>