<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:regCleanCntrls="clr-namespace:Little_System_Cleaner.Registry_Cleaner.Controls" 
    xmlns:regOptimizeCntrls="clr-namespace:Little_System_Cleaner.Registry_Optimizer.Controls" 
    xmlns:diskCleanCntrls="clr-namespace:Little_System_Cleaner.Disk_Cleaner.Controls" 
    xmlns:privacyCleanCntrls="clr-namespace:Little_System_Cleaner.Privacy_Cleaner.Controls" 
    xmlns:duplicateFinderCntrls="clr-namespace:Little_System_Cleaner.Duplicate_Finder.Controls" 
    xmlns:my1="clr-namespace:Little_System_Cleaner.Controls"
    xmlns:startupMgr="clr-namespace:Little_System_Cleaner.Startup_Manager.Controls"
    xmlns:uninstallMgr="clr-namespace:Little_System_Cleaner.Uninstall_Manager.Controls"
	x:Class="Little_System_Cleaner.Main"
	x:Name="Window"
	Title="Little System Cleaner" 
    ResizeMode="CanResizeWithGrip" 
    HorizontalAlignment="Center" 
    VerticalAlignment="Center" 
    mc:Ignorable="d"
    Height="562" Width="818" 
    MinHeight="560" MinWidth="687"
    Closing="OnClose" Loaded="OnLoaded" Icon="Resources/little system cleaner.png">
    <Window.Resources>
        <!-- <LinearGradientBrush x:Key="LightBrush" StartPoint="0,0" EndPoint="0,1">
            <LinearGradientBrush.GradientStops>
                <GradientStopCollection>
                    <GradientStop Color="#FFF" Offset="0.0"/>
                    <GradientStop Color="#EEE" Offset="1.0"/>
                </GradientStopCollection>
            </LinearGradientBrush.GradientStops>
        </LinearGradientBrush> -->
        <SolidColorBrush x:Key="LightBrush" Color="Gray" />
        <SolidColorBrush x:Key="SolidBorderBrush" Color="LightGray" />
        <SolidColorBrush x:Key="WindowBackgroundBrush" Color="DarkGray" />
        <SolidColorBrush x:Key="DisabledBackgroundBrush" Color="#EEE" />
        <SolidColorBrush x:Key="DisabledBorderBrush" Color="#AAA" />
        <SolidColorBrush x:Key="DisabledForegroundBrush" Color="#888" />
        <LinearGradientBrush x:Key="TabSelectedBush" EndPoint="0,1">
            <GradientStop Color="#FFF0F0F0"/>
            <GradientStop Color="White"/>
        </LinearGradientBrush>

        <LinearGradientBrush x:Key="GrayToBlackBrush" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="Black" Offset="0" />
            <GradientStop Color="Gray" Offset="1" />
        </LinearGradientBrush>

        <ControlTemplate x:Key="ComboBoxToggleButton" TargetType="ToggleButton">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition Width="16" />
                </Grid.ColumnDefinitions>
                <Border BorderBrush="Transparent" CornerRadius="2,2,2,2" BorderThickness="0" Name="Border" Background="Transparent" Grid.ColumnSpan="2" />
                <Border Margin="1,1,1,1" BorderBrush="Transparent" CornerRadius="0" BorderThickness="0,0,1,0" Background="Transparent" Grid.Column="0" />
                <Path Margin="0,0,3,0" Data="M0,0L4,4 8,0z" HorizontalAlignment="Center" Fill="White" Name="Arrow" VerticalAlignment="Center" Width="8" Grid.Column="1" />
            </Grid>
            <ControlTemplate.Triggers>
                <Trigger Property="UIElement.IsMouseOver" Value="True">
                    <Setter Property="Panel.Background" TargetName="Border" Value="Transparent"/>
                </Trigger>
                <Trigger Property="ToggleButton.IsChecked" Value="True">
                    <Setter Property="Panel.Background" TargetName="Border" Value="Transparent"/>
                    <Setter Property="Shape.Fill" TargetName="Arrow" Value="White"/>
                </Trigger>
                <Trigger Property="UIElement.IsEnabled" Value="False">
                    <Setter Property="Panel.Background" TargetName="Border" Value="{StaticResource DisabledBackgroundBrush}"/>
                    <Setter Property="Border.BorderBrush" TargetName="Border" Value="{StaticResource DisabledBorderBrush}"/>
                    <Setter Property="TextElement.Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
                    <Setter Property="Shape.Fill" TargetName="Arrow" Value="White"/>
                </Trigger>
            </ControlTemplate.Triggers>
        </ControlTemplate>

        <!-- ComboBox TextBox -->
        <ControlTemplate x:Key="ComboBoxTextBox" TargetType="TextBox">
            <Border x:Name="PART_ContentHost" Focusable="False" Background="{TemplateBinding ComboBox.Background}" />
        </ControlTemplate>

        <!-- ComboBox style -->
        <Style x:Key="CustomDropDown" TargetType="ComboBox">
            <Setter Property="SnapsToDevicePixels" Value="true"/>
            <Setter Property="OverridesDefaultStyle" Value="true"/>
            <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
            <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
            <Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
            <Setter Property="MinWidth" Value="120"/>
            <Setter Property="MinHeight" Value="20"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="ComboBox">
                        <Grid Grid.IsSharedSizeScope="true">
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Normal"/>
                                    <VisualState x:Name="MouseOver"/>
                                    <VisualState x:Name="Disabled"/>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="1"/>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="Auto" SharedSizeGroup="ComboBoxButton" />
                            </Grid.ColumnDefinitions>
                            <ContentPresenter Grid.Column="1" Name="ContentSite" IsHitTestVisible="False" Content="{TemplateBinding ComboBox.SelectionBoxItem}" ContentTemplate="{TemplateBinding ComboBox.SelectionBoxItemTemplate}" ContentTemplateSelector="{TemplateBinding ComboBox.ItemTemplateSelector}" Margin="3,3,10,3" VerticalAlignment="Center" HorizontalAlignment="Left" />
                            <TextBox Grid.Column="1" x:Name="PART_EditableTextBox" Style="{x:Null}" Template="{StaticResource ComboBoxTextBox}"  HorizontalAlignment="Left"  VerticalAlignment="Center" Text="{TemplateBinding Text}" Margin="3,3,23,3" Focusable="True" Background="Transparent" Visibility="Hidden" IsReadOnly="{TemplateBinding ComboBox.IsReadOnly}"/>
                            <ToggleButton Grid.Column="0" Name="ToggleButton" Template="{StaticResource ComboBoxToggleButton}" Grid.ColumnSpan="3" Focusable="false" IsChecked="{Binding Path=IsDropDownOpen,Mode=TwoWay,RelativeSource={RelativeSource TemplatedParent}}" ClickMode="Press"></ToggleButton>
                            <Popup Name="Popup" Placement="Bottom" IsOpen="{TemplateBinding ComboBox.IsDropDownOpen}" AllowsTransparency="True"  Focusable="False" PopupAnimation="Slide">
                                <Grid Name="DropDown" SnapsToDevicePixels="True" MinWidth="{TemplateBinding ComboBox.ActualWidth}" MaxHeight="{TemplateBinding ComboBox.MaxDropDownHeight}">
                                    <Border x:Name="DropDownBorder" Background="{StaticResource LightBrush}" BorderThickness="1" BorderBrush="Transparent"/>
                                    <ScrollViewer Margin="4,6,4,6" SnapsToDevicePixels="True">
                                        <StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Contained" />
                                    </ScrollViewer>
                                </Grid>
                            </Popup>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="HasItems" Value="false">
                                <Setter TargetName="DropDownBorder" Property="MinHeight" Value="95"/>
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="false">
                                <Setter Property="Foreground" Value="LightGray"/>
                            </Trigger>
                            <Trigger Property="IsGrouping" Value="true">
                                <Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
                            </Trigger>
                            <Trigger SourceName="Popup" Property="Popup.AllowsTransparency" Value="true">
                                <Setter TargetName="DropDownBorder" Property="CornerRadius" Value="0"/>
                                <Setter TargetName="DropDownBorder" Property="Margin" Value="0"/>
                            </Trigger>
                            <Trigger Property="IsEditable" Value="true">
                                <Setter Property="IsTabStop" Value="false"/>
                                <Setter TargetName="PART_EditableTextBox" Property="Visibility" Value="Visible"/>
                                <Setter TargetName="ContentSite" Property="Visibility" Value="Hidden"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
            <Style.Triggers>
            </Style.Triggers>
        </Style>
        <Style TargetType="{x:Type TabControl}" x:Key="WindowTabCtrl">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type TabControl}">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="*"/>
                            </Grid.RowDefinitions>
                            <TabPanel Grid.Row="0" Panel.ZIndex="1" Margin="5,7,0,0" IsItemsHost="True" />
                            <Border BorderBrush="Black" BorderThickness="1,0" CornerRadius="0,0,5,5" Padding="2,6,8,3" Margin="5,0,5,5" Background="White" Grid.Row="1">
                                <ContentPresenter ContentSource="SelectedContent" />
                            </Border>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style TargetType="{x:Type TabItem}" x:Key="WindowTabItem">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type TabItem}">
                        <Grid SnapsToDevicePixels="True">
                            <Border x:Name="Border" BorderThickness="1,0,1,1"  CornerRadius="7,7,0,0" HorizontalAlignment="Left" Margin="0" >
                                <ContentPresenter x:Name="ContentSite" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" ContentSource="Header" Margin="0" RecognizesAccessKey="True" Height="0" Width="0"/>
                            </Border>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsSelected" Value="True">
                                <Setter Property="Panel.ZIndex" Value="100" />
                                <Setter TargetName="Border" Property="Background" Value="{StaticResource TabSelectedBush}" />
                                <Setter TargetName="Border" Property="BorderThickness" Value="1,1,1,0" />
                            </Trigger>
                            <!-- <Trigger Property="IsEnabled" Value="False">
                                <Setter TargetName="Border" Property="Background" Value="{StaticResource DisabledBackgroundBrush}" />
                                <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource DisabledBorderBrush}" />
                                <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}" />
                            </Trigger>-->
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </Window.Resources>
    <Window.TaskbarItemInfo>
        <TaskbarItemInfo x:Name="taskBarItemInfo" />
    </Window.TaskbarItemInfo>
    <Grid Background="{StaticResource LightBrush}">
        <Grid.RowDefinitions>
            <RowDefinition Height="71" />
            <RowDefinition Height="400*"/>
        </Grid.RowDefinitions>
        <Grid Grid.Row="0" Background="{StaticResource GrayToBlackBrush}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="55"/>
            </Grid.ColumnDefinitions>
            <ComboBox x:Name="comboBoxTab" Style="{StaticResource CustomDropDown}" Width="330" HorizontalAlignment="Left" Margin="10,10,5,5" SelectionChanged="comboBoxTab_SelectionChanged">
                <ComboBox.Resources>
                    <SolidColorBrush x:Key="{x:Static SystemColors.WindowBrushKey}" Color="Transparent" />
                </ComboBox.Resources>
                <ComboBoxItem IsSelected="True">
                    <StackPanel Orientation="Horizontal">
                        <Image HorizontalAlignment="Left" VerticalAlignment="Center" Source="Resources/info.png" Width="52" Margin="0" />
                        <Label Content="Information" HorizontalAlignment="Left" Margin="0,0,0,0" VerticalAlignment="Center" Height="47" Width="261" FontSize="24" FontWeight="Bold" Foreground="White"/>
                    </StackPanel>
                </ComboBoxItem>
                <ComboBoxItem>
                    <StackPanel Orientation="Horizontal">
                        <Image HorizontalAlignment="Left" VerticalAlignment="Center" Source="Resources/icon.png" Width="52" Margin="0" />
                        <Label Content="Registry Cleaner" HorizontalAlignment="Left" Margin="0,0,0,0" VerticalAlignment="Center" Height="47" Width="261" FontSize="24" FontWeight="Bold" Foreground="White"/>
                    </StackPanel>
                </ComboBoxItem>
                <ComboBoxItem>
                    <StackPanel Orientation="Horizontal">
                        <Image HorizontalAlignment="Left" VerticalAlignment="Center" Source="Resources/startup manager/icon.png" Width="52" Margin="0" />
                        <Label Content="Startup Manager" HorizontalAlignment="Left" Margin="0,0,0,0" VerticalAlignment="Center" Height="47" Width="261" FontSize="24" FontWeight="Bold" Foreground="White"/>
                    </StackPanel>
                </ComboBoxItem>
                <ComboBoxItem>
                    <StackPanel Orientation="Horizontal">
                        <Image HorizontalAlignment="Left" VerticalAlignment="Center" Source="Resources/uninstall manager/icon.png" Width="52" Margin="0" />
                        <Label Content="Uninstall Manager" HorizontalAlignment="Left" Margin="0,0,0,0" VerticalAlignment="Center" Height="47" Width="261" FontSize="24" FontWeight="Bold" Foreground="White"/>
                    </StackPanel>
                </ComboBoxItem>
                <ComboBoxItem>
                    <StackPanel Orientation="Horizontal">
                        <Image HorizontalAlignment="Left" VerticalAlignment="Center" Source="Resources/optimizer.png" Width="52" Margin="0" />
                        <Label Content="Registry Optimizer" HorizontalAlignment="Left" Margin="0,0,0,0" VerticalAlignment="Center" Height="47" Width="261" FontSize="24" FontWeight="Bold" Foreground="White"/>
                    </StackPanel>
                </ComboBoxItem>
                <ComboBoxItem>
                    <StackPanel Orientation="Horizontal">
                        <Image HorizontalAlignment="Left" VerticalAlignment="Center" Source="Resources/disk cleaner/icon.png" Width="52" Margin="0" />
                        <Label Content="Disk Cleaner" HorizontalAlignment="Left" Margin="0,0,0,0" VerticalAlignment="Center" Height="47" Width="261" FontSize="24" FontWeight="Bold" Foreground="White"/>
                    </StackPanel>
                </ComboBoxItem>
                <ComboBoxItem>
                    <StackPanel Orientation="Horizontal">
                        <Image HorizontalAlignment="Left" VerticalAlignment="Center" Source="Resources/privacy cleaner/icon.png" Width="52" Margin="0" />
                        <Label Content="Privacy Cleaner" HorizontalAlignment="Left" Margin="0,0,0,0" VerticalAlignment="Center" Height="47" Width="261" FontSize="24" FontWeight="Bold" Foreground="White"/>
                    </StackPanel>
                </ComboBoxItem>
                <ComboBoxItem>
                    <StackPanel Orientation="Horizontal">
                        <Image HorizontalAlignment="Left" VerticalAlignment="Center" Source="Resources/duplicate finder/icon.png" Width="52" Margin="0" />
                        <Label Content="Duplicate Finder" HorizontalAlignment="Left" Margin="0,0,0,0" VerticalAlignment="Center" Height="47" Width="261" FontSize="24" FontWeight="Bold" Foreground="White"/>
                    </StackPanel>
                </ComboBoxItem>
                <ComboBoxItem>
                    <StackPanel Orientation="Horizontal">
                        <Image HorizontalAlignment="Left" VerticalAlignment="Center" Source="Resources/Options.png" Width="52" Margin="0" />
                        <Label Content="Settings" HorizontalAlignment="Left" Margin="0,0,0,0" VerticalAlignment="Center" Height="47" Width="261" FontSize="24" FontWeight="Bold" Foreground="White"/>
                    </StackPanel>
                </ComboBoxItem>
            </ComboBox>
            <Image Height="47" HorizontalAlignment="Right" Margin="0,10,10,0" Name="imageHelp" VerticalAlignment="Top" Width="48" Source="/Little_System_Cleaner;component/Resources/Help.png" MouseEnter="imageHelp_MouseEnter" MouseLeave="imageHelp_MouseLeave" MouseLeftButtonDown="imageHelp_MouseLeftButtonDown" Grid.Column="1" />

        </Grid>
        <TabControl IsSynchronizedWithCurrentItem="True" Style="{StaticResource WindowTabCtrl}" x:Name="tabControl" Grid.Row="1" Margin="0">
            <TabItem Style="{DynamicResource WindowTabItem}" Name="tabItemWelcome">
                <my1:Welcome x:Name="ctrlWelcome" />
            </TabItem>
            <TabItem Style="{DynamicResource WindowTabItem}" Name="tabItemScanWiz">
                <regCleanCntrls:Wizard x:Name="ctrlScanWiz" />
            </TabItem>

            <TabItem Style="{DynamicResource WindowTabItem}" Name="tabItemStartupMgr">
                <startupMgr:StartupManager x:Name="ctrlStartupMgr" />
            </TabItem>
            <TabItem Style="{DynamicResource WindowTabItem}" Name="tabItemUninstallMgr">
                <uninstallMgr:UninstallManager x:Name="ctrlUninstallMgr" />
            </TabItem>
            <TabItem Style="{DynamicResource WindowTabItem}" Name="tabItemRegOptimizer">
                <regOptimizeCntrls:Wizard x:Name="ctrlRegOptimizer" />
            </TabItem>
            <TabItem Style="{DynamicResource WindowTabItem}" Name="tabItemDiskCleaner">
                <diskCleanCntrls:Wizard x:Name="ctrlDiskCleaner" />
            </TabItem>
            <TabItem Style="{DynamicResource WindowTabItem}" Name="tabItemPrivacyCleaner">
                <privacyCleanCntrls:Wizard x:Name="ctrlPrivacyCleaner" />
            </TabItem>
            <TabItem Style="{DynamicResource WindowTabItem}" Name="tabItemDuplicateFinder">
                <duplicateFinderCntrls:Wizard x:Name="ctrlDuplicateFinder" />
            </TabItem>
            <TabItem Style="{DynamicResource WindowTabItem}" Name="tabItemOptions">
                <my1:Options x:Name="ctrlOptions" />
            </TabItem>
        </TabControl>
    </Grid>


</Window>