<local:MyScrollViewer x:Class="PCL.PageComp"
                      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:PCL"
                      mc:Ignorable="d"
                      DataContext="{Binding RelativeSource={RelativeSource Self}}"
                      VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
    <local:MyScrollViewer.Resources>
        <BooleanToVisibilityConverter x:Key="VisibilityConverter" />
    </local:MyScrollViewer.Resources>
    <StackPanel Orientation="Vertical" Margin="25">
        <StackPanel x:Name="PanAlways">
            <local:MySearchBox x:Name="PanSearchBox" Margin="0,0,0,15" SearchButtonVisibility="Visible" HintText="{DynamicResource Download.Comp.Search.Hint}" />
            <local:MyCard Margin="0,0,0,15">
                <Grid Margin="7" HorizontalAlignment="Stretch">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="1.0*" />
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="1.3*" />
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="1.0*" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="28" />
                        <RowDefinition Height="8" />
                        <RowDefinition Height="28" />
                    </Grid.RowDefinitions>
                    <!--来源-->
                    <TextBlock x:Name="LabSource" VerticalAlignment="Center" Grid.Row="0" Grid.Column="0"
                               HorizontalAlignment="Left" Text="{DynamicResource Download.Comp.Filter.Source}"
                               Margin="5,0,5,0" />
                    <local:MyComboBox x:Name="ComboSearchSource" Grid.Row="0" Grid.Column="1">
                        <local:MyComboBoxItem Content="{DynamicResource Common.Option.All}" Tag="3" IsSelected="True" />
                        <local:MyComboBoxItem Content="CurseForge" Tag="1"
                                              Visibility="{Binding SupportCurseForge, Converter={StaticResource VisibilityConverter}}" />
                        <local:MyComboBoxItem Content="Modrinth" Tag="2"
                                              Visibility="{Binding SupportModrinth, Converter={StaticResource VisibilityConverter}}" />
                    </local:MyComboBox>
                    <!--Tags-->
                    <TextBlock x:Name="LabTag" VerticalAlignment="Center" Grid.Column="2" HorizontalAlignment="Left"
                               Text="{DynamicResource Download.Comp.Filter.Tag}" Margin="5,0,5,0" />
                    <local:MyComboBox x:Name="ComboSearchTag" Grid.Column="3" MaxDropDownHeight="320" />
                    <!--排序方式-->
                    <TextBlock x:Name="LabSort" VerticalAlignment="Center" Grid.Row="0" Grid.Column="4"
                               HorizontalAlignment="Left" Text="{DynamicResource Download.Comp.Filter.Sort}"
                               Margin="5,0,5,0" />
                    <local:MyComboBox x:Name="ComboSearchSort" Grid.Row="0" Grid.Column="5" MaxDropDownHeight="320">
                        <local:MyComboBoxItem Content="{DynamicResource Common.Option.Default}" Tag="1"
                                              IsSelected="True" />
                        <local:MyComboBoxItem Content="{DynamicResource Download.Comp.Sort.Relevance}" Tag="2" />
                        <local:MyComboBoxItem Content="{DynamicResource Download.Comp.Sort.Downloads}" Tag="3" />
                        <local:MyComboBoxItem Content="{DynamicResource Download.Comp.Sort.Follows}" Tag="4" />
                        <local:MyComboBoxItem Content="{DynamicResource Download.Comp.Sort.Latest}" Tag="5" />
                        <local:MyComboBoxItem Content="{DynamicResource Download.Comp.Sort.Updated}" Tag="6" />
                    </local:MyComboBox>
                    <!--版本-->
                    <TextBlock VerticalAlignment="Center" HorizontalAlignment="Left"
                               Text="{DynamicResource Download.Comp.Filter.Version}" Margin="5,0,5,0"
                               Grid.Row="2" />
                    <local:MyComboBox x:Name="TextSearchVersion" Grid.Row="2" Grid.Column="1" IsEditable="True"
                                      MaxDropDownHeight="320">
                        <local:MyComboBoxItem Content="{DynamicResource Download.Comp.Filter.Version.Any}"
                                              IsSelected="True" />
                        <local:MyComboBoxItem Content="1.21.11" />
                        <local:MyComboBoxItem Content="1.21.1" />
                        <local:MyComboBoxItem Content="1.20.6" />
                        <local:MyComboBoxItem Content="1.20.1" />
                        <local:MyComboBoxItem Content="1.19.4" />
                        <local:MyComboBoxItem Content="1.19.2" />
                        <local:MyComboBoxItem Content="1.18.2" />
                        <local:MyComboBoxItem Content="1.16.5" />
                        <local:MyComboBoxItem Content="1.12.2" />
                        <local:MyComboBoxItem Content="1.10.2" />
                        <local:MyComboBoxItem Content="1.8.9" />
                        <local:MyComboBoxItem Content="1.7.10" />
                    </local:MyComboBox>
                    <!--加载器-->
                    <TextBlock x:Name="LabLoader" VerticalAlignment="Center" HorizontalAlignment="Left"
                               Text="{DynamicResource Download.Comp.Filter.Loader}"
                               Margin="5,0,5,0" Grid.Row="2" Grid.Column="2" />
                    <local:MyComboBox x:Name="ComboSearchLoader" Grid.Row="2" Grid.Column="3" MaxDropDownHeight="320">
                        <local:MyComboBoxItem Content="{DynamicResource Download.Comp.Filter.Loader.Any}"
                                              IsSelected="True" Tag="0" />
                        <local:MyComboBoxItem Content="{DynamicResource Common.Installation.Forge}" Tag="1" />
                        <local:MyComboBoxItem Content="{DynamicResource Common.Installation.NeoForge}" Tag="6" />
                        <local:MyComboBoxItem Content="{DynamicResource Common.Installation.Fabric}" Tag="4" />
                        <local:MyComboBoxItem Content="{DynamicResource Common.Installation.Quilt}" Tag="5" />
                    </local:MyComboBox>
                    <local:MyComboBox x:Name="ComboSearchShaderLoader" Visibility="Collapsed" Grid.Row="2"
                                      Grid.Column="3" MaxDropDownHeight="320">
                        <local:MyComboBoxItem Content="{DynamicResource Download.Comp.Filter.Loader.AnyShader}" Tag=""
                                              IsSelected="True" />
                        <local:MyComboBoxItem Content="{DynamicResource Download.Comp.Filter.Loader.VanillaAvailable}"
                                              Tag="/vanilla"
                                              ToolTip="{DynamicResource Download.Comp.Filter.Loader.VanillaAvailable.ToolTip}" />
                        <local:MyComboBoxItem Content="{DynamicResource Common.Installation.Iris}" Tag="/iris" />
                        <local:MyComboBoxItem Content="{DynamicResource Common.Installation.OptiFine}" Tag="/optifine" />
                    </local:MyComboBox>
                    <!--按钮-->
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Column="6">
                        <local:MyIconButton x:Name="BtnSearchReset"
                                            SvgIcon="lucide/rotate-ccw"
                                            ToolTip="{DynamicResource Download.Comp.Filter.Reset}" LogoScale="0.9"
                                            Margin="3,0,0,0" />
                        <local:MyIconButton x:Name="BtnSearchInstallModPack"
                                            SvgIcon="lucide/download"
                                            Visibility="Collapsed"
                                            ToolTip="{DynamicResource Download.Comp.Filter.InstallModpack.ToolTip}"
                                            LogoScale="0.9"
                                            ToolTipService.HorizontalOffset="-55" ToolTipService.VerticalOffset="5" />
                    </StackPanel>
                </Grid>
            </local:MyCard>
        </StackPanel>
        <StackPanel x:Name="PanContent">
            <local:MyHint x:Name="HintError" HasBorder="True"
                          Text="{DynamicResource Download.Comp.Hint.ModrinthUnreachable}"
                          Theme="Yellow" Margin="0,0,0,15" />
            <local:MyCard x:Name="CardProjects" UseAnimation="False">
                <StackPanel x:Name="PanProjects" Margin="12" />
            </local:MyCard>
            <local:MyCard Margin="0,15,0,0" x:Name="CardPages" HorizontalAlignment="Center">
                <StackPanel Orientation="Horizontal" Height="23" Margin="10,7">
                    <local:MyIconButton x:Name="BtnPageFirst" IsEnabled="False" Opacity="0.2" Margin="0,0.5,5,0.5"
                                        SvgIcon="lucide/chevrons-left" />
                    <local:MyIconButton x:Name="BtnPageLeft" IsEnabled="False" Opacity="0.2" Margin="0,0,5,0"
                                        SvgIcon="lucide/chevron-left" />
                    <TextBlock x:Name="LabPage" Text="1"
                               Margin="8,0,13,0" FontSize="15" VerticalAlignment="Center"
                               Foreground="{DynamicResource ColorBrush3}" />
                    <local:MyIconButton x:Name="BtnPageRight" Margin="0,0,30,0"
                                        SvgIcon="lucide/chevron-right" />
                </StackPanel>
            </local:MyCard>
        </StackPanel>
        <local:MyCard HorizontalAlignment="Center" VerticalAlignment="Center" SnapsToDevicePixels="True"
                      x:Name="PanLoad" UseAnimation="False" Margin="40,50">
            <local:MyLoading Margin="20,20,20,17" x:Name="Load" HorizontalAlignment="Center"
                             VerticalAlignment="Center" />
        </local:MyCard>
    </StackPanel>
</local:MyScrollViewer>