<Window x:Class="F4SDicons.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:sys="clr-namespace:System;assembly=mscorlib"
        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:F4SDicons"
        xmlns:mi="clr-namespace:MaterialIcons;assembly=MaterialIcons"
        xmlns:ico="clr-namespace:FasdDesktopUi.Basics.UserControls.AdaptableIcon;assembly=F4SD-AdaptableIcon"
        xmlns:uc="clr-namespace:F4SDicons.User_Controls"
        mc:Ignorable="d"
        SizeChanged="Window_SizeChanged"
        WindowStyle="None"
        ResizeMode="NoResize"
    Title="F4SD Icon Picker" Height="600" Width="880" Icon="/Images/IconPickerLogo.ico">

    <WindowChrome.WindowChrome>
        <WindowChrome CaptionHeight="45"/>
    </WindowChrome.WindowChrome>

    <Window.Resources>
        <SolidColorBrush x:Key="color1C4A99" Color="#1C4A99"/>
        <SolidColorBrush x:Key="colorFFFFFF" Color="#FFFFFF"/>
        <BooleanToVisibilityConverter x:Key="MyBoolToVisibilityConverter" />
    </Window.Resources>

    <Grid Background="{DynamicResource colorE9E9E9}">

        <Grid.RowDefinitions>
            <RowDefinition Height="45"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="50"/>
        </Grid.RowDefinitions>

        <Grid>

            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="30"/>
            </Grid.ColumnDefinitions>

            <uc:WindowStateBar Grid.Column="1" WindowChrome.IsHitTestVisibleInChrome="True">

            </uc:WindowStateBar>

        </Grid>

        <Grid Grid.Row="1" Name="upperGrid">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition x:Name="colDef3"  Width="*"/>
            </Grid.ColumnDefinitions>

            <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>

            <Grid Grid.Column="0" Grid.Row="2" Name="listGrid" VerticalAlignment="Stretch" Background="{DynamicResource colorE9E9E9}">
                <Grid.RowDefinitions>
                    <RowDefinition Height="40"/>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>

                <uc:SearchBar x:Name="SearchBarUC">

                </uc:SearchBar>

                <Border Grid.Row="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">

                    <ScrollViewer Margin="0,0,5,0">

                        <StackPanel Name="mIconsStackpanel" Orientation="Vertical">

                            <uc:IconList x:Name="IconListUC" IconSelected="Viewer_IconSelected"     />

                            <uc:IconGrid x:Name="IconGridUC" IconSelected="Viewer_IconSelected" Visibility="Collapsed"/>

                        </StackPanel>

                    </ScrollViewer>

                </Border>

            </Grid>

            <Grid Grid.Column="1" Grid.Row="0" Background="{DynamicResource colorE9E9E9}">
                <Grid.RowDefinitions>
                    <RowDefinition Height="6*"/>
                    <RowDefinition Height="60"/>
                    <RowDefinition Height="60"/>
                </Grid.RowDefinitions>

                <uc:ZoomViewer Grid.Row="0" x:Name="currentIconUC">

                </uc:ZoomViewer>

                <uc:CopyTextBox Grid.Row="1" x:Name="currentNameUC" ToolTipText="Icon-Name kopieren">

                </uc:CopyTextBox>

                <uc:CopyTextBox Grid.Row="2" x:Name="currentFullNameUC" ToolTipText="XML-Konfigurationswert kopieren">

                </uc:CopyTextBox>
            </Grid>
        </Grid>

        <Grid Grid.Row="2" Name="bottomGrid" Background="{DynamicResource colorE9E9E9}">

            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="50"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="35"/>
                <ColumnDefinition Width="3"/>
                <ColumnDefinition Width="35"/>
                <ColumnDefinition Width="20"/>
            </Grid.ColumnDefinitions>

            <Grid.Resources>

                <Style TargetType="Border">
                    <Setter Property="Background" Value="{DynamicResource colorE9E9E9}"/>
                    <Setter Property="Cursor" Value="Hand"/>
                    <Setter Property="CornerRadius" Value="5"/>
                    <Setter Property="Height" Value="35"/>

                    <Style.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Background" Value="{DynamicResource colorF2F2F2}"/>
                        </Trigger>
                    </Style.Triggers>
                </Style>

                <Style TargetType="ico:AdaptableIcon">
                    <Setter Property="PrimaryIconColor" Value="{DynamicResource color3D3C3C}"/>
                    <Setter Property="IconHeight" Value="30"/>
                    <Setter Property="IconWidth" Value="30"/>
                    <Setter Property="BorderPadding" Value="5"/>

                    <Style.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="PrimaryIconColor" Value="{DynamicResource color1F92EE}"/>
                            <Setter Property="IconBackgroundColor" Value="{DynamicResource colorF2F2F2}"/>
                            <Setter Property="Cursor" Value="Hand"/>
                        </Trigger>
                    </Style.Triggers>
                </Style>

                <Style x:Key="F4SDicon" TargetType="ico:AdaptableIcon">
                    <Setter Property="PrimaryIconColor" Value="{DynamicResource color3D3C3C}"/>
                    <Setter Property="SecondaryIconColor" Value="{DynamicResource colorF7FAFA}"/>
                    <Setter Property="BorderPadding" Value="0"/>
                    <Setter Property="IconWidth" Value="30"/>
                    <Setter Property="IconHeight" Value="30"/>

                    <Style.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="PrimaryIconColor" Value="{DynamicResource color1C4A99}"/>
                            <Setter Property="SecondaryIconColor" Value="{DynamicResource colorFFFFFF}"/>
                        </Trigger>
                    </Style.Triggers>
                </Style>

            </Grid.Resources>

            <ico:AdaptableIcon Grid.Column="0" x:Name="materialLogo" Style="{DynamicResource F4SDicon}" SelectedInternIcon="f4sd">

            </ico:AdaptableIcon>

            <ico:AdaptableIcon Grid.Column="2" x:Name="gridIcon" MouseLeftButtonUp="ChangeToGrid_ButtonUp" ToolTip="Gitter-Ansicht" SelectedMaterialIcon="ic_grid_on">

            </ico:AdaptableIcon>

            <ico:AdaptableIcon Grid.Column="2" x:Name="listIcon" Visibility="Collapsed" MouseLeftButtonUp="ChangeToList_ButtonUp" ToolTip="Listen-Ansicht" SelectedMaterialIcon="ic_format_list_bulleted">

            </ico:AdaptableIcon>

            <ico:AdaptableIcon Grid.Column="4" x:Name="darkModeIcon" MouseLeftButtonUp="ChangeToDarkMode_ButtonUp" ToolTip="Dark-Mode" SelectedInternIcon="style_moonFilled">

            </ico:AdaptableIcon>

            <ico:AdaptableIcon Grid.Column="4" x:Name="lightModeIcon" Visibility="Collapsed" MouseLeftButtonUp="ChangeToLightMode_ButtonUp" ToolTip="Light-Mode" SelectedInternIcon="style_sunFilled">

            </ico:AdaptableIcon>

        </Grid>

    </Grid>

</Window>
