wabbajack/Wabbajack.App.Wpf/Views/ModListGalleryView.xaml

154 lines
6.6 KiB
Plaintext
Raw Normal View History

<rxui:ReactiveUserControl
x:Class="Wabbajack.ModListGalleryView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
xmlns:local="clr-namespace:Wabbajack"
xmlns:mahapps="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:rxui="http://reactiveui.net"
xmlns:system="clr-namespace:System;assembly=mscorlib"
xmlns:ic="clr-namespace:FluentIcons.WPF;assembly=FluentIcons.WPF"
d:DesignHeight="450"
d:DesignWidth="900"
x:TypeArguments="local:ModListGalleryVM"
mc:Ignorable="d">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="3*" />
</Grid.ColumnDefinitions>
<Border Grid.Column="1"
BorderBrush="Transparent"
BorderThickness="0">
<ScrollViewer Background="Transparent" VerticalScrollBarVisibility="Auto">
<ItemsControl
x:Name="ModListGalleryControl"
HorizontalAlignment="Center"
ScrollViewer.VerticalScrollBarVisibility="Visible">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<local:ModListTileView ViewModel="{Binding}" />
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ScrollViewer>
</Border>
<mahapps:ProgressRing Grid.Column="1"
x:Name="LoadingRing"
Visibility="Collapsed" />
<StackPanel Grid.Column="1"
x:Name="NoneFound"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Orientation="Vertical"
Visibility="Collapsed">
<ic:SymbolIcon
Grid.Column="1"
Foreground="{StaticResource Triadic2Brush}"
VerticalAlignment="Top"
Symbol="DismissCircle"
IsFilled="False"
FontSize="72"
/>
<TextBlock
FontSize="24"
Margin="0, 10, 0, 0"
Foreground="{StaticResource ForegroundBrush}"
Text="No modlists matching specified criteria" />
</StackPanel>
<iconPacks:PackIconControl Grid.Row="1"
x:Name="ErrorIcon"
Width="55"
Height="55"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Foreground="{StaticResource ErrorBrush}"
Kind="{x:Static iconPacks:PackIconMaterialKind.AlertCircle}"
ToolTip="Error loading modlist gallery"
Visibility="Collapsed" />
<!--<local:TopProgressView Grid.Row="0" Grid.RowSpan="2"
Title="Browsing Modlists"
ShadowMargin="False" />-->
<StackPanel Grid.Row="0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Background="Green"
Orientation="Vertical">
<ComboBox
VerticalAlignment="Center"
Foreground="{StaticResource ForegroundBrush}"
ItemsSource="{Binding GameTypeEntries, Mode=TwoWay}"
SelectedItem="{Binding SelectedGameTypeEntry, Mode=TwoWay}"
IsSynchronizedWithCurrentItem="True"
ToolTip="Filter modlists on game">
<ComboBox.ItemTemplate>
<DataTemplate>
2023-12-27 16:26:00 +00:00
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
<Border Width="32" Height="32" BorderThickness="0" CornerRadius="8, 8, 8, 8" VerticalAlignment="Center">
<Border.Background>
<ImageBrush Stretch="Fill" ImageSource="{Binding GameMetaData.IconSource}"/>
</Border.Background>
</Border>
<TextBlock Margin="10, 0, 0, 0" Text="{Binding FormattedName}" VerticalAlignment="Center" />
</StackPanel>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<TextBlock
Margin="0,0,5,0"
VerticalAlignment="Center"
Foreground="{StaticResource ForegroundBrush}"
Text="Search"
ToolTip="Search for a game" />
<TextBox
x:Name="SearchBox"
Width="95"
VerticalContentAlignment="Center"
ToolTip="Only show Not Safe For Work (NSFW) modlists" />
<CheckBox
x:Name="ShowNSFW"
Margin="10,0,10,0"
VerticalAlignment="Center"
Content="Show NSFW"
Foreground="{StaticResource ForegroundBrush}"
ToolTip="Only show Not Safe For Work (NSFW) modlists" />
<CheckBox
x:Name="ShowUnofficialLists"
Margin="10,0,10,0"
VerticalAlignment="Center"
Content="Show Unofficial Lists"
Foreground="{StaticResource ForegroundBrush}"
ToolTip="Show modlists from external repositories"/>
<CheckBox
x:Name="OnlyInstalledCheckbox"
Margin="10,0,10,0"
VerticalAlignment="Center"
Content="Only Installed"
Foreground="{StaticResource ForegroundBrush}"
ToolTip="Only show modlists for games you have installed"/>
<Button
x:Name="ClearFiltersButton"
Margin="0,0,10,0"
Style="{StaticResource LargeButtonStyle}"
ToolTip="Reset filters to the default options"
FontSize="24">
<Button.Content>
<StackPanel Orientation="Horizontal">
<ic:SymbolIcon Symbol="FilterDismiss" />
<TextBlock Margin="10, 0, 0, 0">Reset filters</TextBlock>
</StackPanel>
</Button.Content>
</Button>
</StackPanel>
</Grid>
</rxui:ReactiveUserControl>