<UserControl x:Class="F4SDicons.User_Controls.IconList"
             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:F4SDicons.User_Controls"
             xmlns:ico="clr-namespace:FasdDesktopUi.Basics.UserControls.AdaptableIcon;assembly=F4SD-AdaptableIcon"
             mc:Ignorable="d" 
             d:DesignHeight="450" d:DesignWidth="800"
             DataContext="{Binding RelativeSource={RelativeSource Self}}">

    <UserControl.Resources>
        <BooleanToVisibilityConverter x:Key="BooleanToVisibility"/>
    </UserControl.Resources>
    
    <StackPanel x:Name="collectionStackPanel">

        <ItemsControl ItemsSource="{Binding IconInformation}">

            <ItemsControl.ItemTemplate>
                <DataTemplate>
                    <Border x:Name="adaptableBorder"  MouseLeftButtonUp="MaterialStackPanel_MouseLeftButtonUp" TouchDown="MaterialStackPanel_TouchDown" ToolTip="{Binding IconName}" Tag="{Binding IconName}" Visibility="{Binding IsVisible, Converter = {StaticResource BooleanToVisibility}}" Style="{DynamicResource ListBorderIconStyle}">
                        <StackPanel x:Name="adaptableStackPanel" Orientation="Horizontal">
                            <ico:AdaptableIcon Margin="0, 0, 10, 0" BorderPadding="2.5" IconHeight="25" IconWidth="25" SelectedInternIcon="{Binding InternIcon}" SelectedMaterialIcon="{Binding MaterialIcon}"/>
                            <Border x:Name="scrollBorder">
                                <TextBlock x:Name="adaptableBlock" FontFamily="Calibri Regular" FontSize="18" Text="{Binding IconName}"/>
                            </Border>
                        </StackPanel>
                    </Border>
                </DataTemplate>
            </ItemsControl.ItemTemplate>
        </ItemsControl>
    </StackPanel>
</UserControl>
