<UserControl x:Class="FasdDesktopUi.Pages.SlimPage.UserControls.SlimPageWindowStateBar"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:local="clr-namespace:FasdDesktopUi.Pages.SlimPage.UserControls"
             xmlns:ico="clr-namespace:FasdDesktopUi.Basics.UserControls.AdaptableIcon;assembly=F4SD-AdaptableIcon"
             xmlns:vc="clr-namespace:FasdDesktopUi.Basics.Converter"
             x:Name="WindowStateBarUc"
             mc:Ignorable="d"
             d:DesignHeight="30"
             d:DesignWidth="300">

    <UserControl.Resources>
        <vc:LanguageDefinitionsConverter x:Key="LanguageConverter" />
        <BooleanToVisibilityConverter x:Key="BoolToVisibility" />
    </UserControl.Resources>

    <StackPanel Orientation="Horizontal"
                HorizontalAlignment="Right">
        <StackPanel.Resources>
            <Style TargetType="ico:AdaptableIcon"
                   BasedOn="{StaticResource SettingsPage.Close.Icon}">
                <Setter Property="IconBackgroundColor"
                        Value="{DynamicResource BackgroundColor.SlimPage.WidgetCollection}" />
                <Setter Property="IconCornerRadius"
                        Value="15" />
                <Setter Property="IconHeight"
                        Value="30" />
                <Setter Property="IconWidth"
                        Value="30" />
                <Setter Property="BorderPadding"
                        Value="10" />
                <Setter Property="Margin"
                        Value="7.5 0 0 0" />
            </Style>

        </StackPanel.Resources>

        <ico:AdaptableIcon MouseUp="WindowButton_MouseUp"
                           TouchDown="WindowButton_TouchDown"
                           Tag="maximize"
                           Visibility="{Binding ElementName=WindowStateBarUc, Path=ShowFullStateBar, Converter={StaticResource BoolToVisibility}}"
                           ToolTip="{Binding Converter={StaticResource LanguageConverter}, ConverterParameter=Global.NavBar.Maximize}"
                           SelectedInternIcon="window_fullscreen" />

        <ico:AdaptableIcon MouseUp="WindowButton_MouseUp"
                           TouchDown="WindowButton_TouchDown"
                           Tag="close"
                           ToolTip="{Binding Converter={StaticResource LanguageConverter}, ConverterParameter=Global.NavBar.Close}"
                           SelectedInternIcon="window_close" />
    </StackPanel>
</UserControl>
