wabbajack/Wabbajack.App.Wpf/Views/ModListGalleryView.xaml
2021-12-26 14:56:44 -07:00

154 lines
6.2 KiB
XML

<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"
d:DesignHeight="450"
d:DesignWidth="900"
x:TypeArguments="local:ModListGalleryVM"
mc:Ignorable="d">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="47" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Rectangle Grid.Row="1" Grid.RowSpan="3"
Margin="6,0">
<Rectangle.Fill>
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
<GradientStop Offset="0" Color="#123700B3" />
<GradientStop Offset="1" Color="#00000000" />
</LinearGradientBrush>
</Rectangle.Fill>
</Rectangle>
<Border Grid.Row="1"
BorderBrush="Transparent"
BorderThickness="1,0,1,1">
<ScrollViewer Background="Transparent" VerticalScrollBarVisibility="Auto">
<ItemsControl
x:Name="ModListGalleryControl"
Margin="0,10,0,0"
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.Row="1"
x:Name="LoadingRing"
Visibility="Collapsed" />
<StackPanel Grid.Row="1"
x:Name="NoneFound"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Orientation="Vertical"
Visibility="Collapsed">
<iconPacks:PackIconControl
Width="50"
Height="50"
Margin="0,0,0,10"
HorizontalAlignment="Center"
Foreground="{StaticResource Triadic2Brush}"
Kind="{x:Static iconPacks:PackIconMaterialKind.Cancel}" />
<TextBlock
FontSize="14"
Foreground="{StaticResource ForegroundBrush}"
Text="No Matches" />
</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" />
<WrapPanel Grid.Row="0"
Height="25"
Margin="5,5,5,10"
HorizontalAlignment="Right"
Orientation="Horizontal">
<Label
Margin="0,0,0,0"
VerticalAlignment="Center"
Content="Game" />
<ComboBox
Width="150"
Margin="0,0,10,0"
VerticalAlignment="Center"
Foreground="{StaticResource ForegroundBrush}"
IsEnabled="{Binding OnlyInstalled, Converter={StaticResource InverseBooleanConverter}}"
ItemsSource="{Binding Path=GameTypeEntries}"
SelectedItem="{Binding GameType, Mode=TwoWay}"
ToolTip="Select a game" />
<TextBlock
Margin="0,0,5,0"
VerticalAlignment="Center"
Foreground="{StaticResource ForegroundBrush}"
Text="Search" />
<TextBox
x:Name="SearchBox"
Width="95"
VerticalContentAlignment="Center" />
<CheckBox
x:Name="ShowNSFW"
Margin="10,0,10,0"
VerticalAlignment="Center"
Content="Show NSFW"
Foreground="{StaticResource ForegroundBrush}" />
<CheckBox
x:Name="ShowUtilityLists"
Margin="10,0,10,0"
VerticalAlignment="Center"
Content="Only Utility Lists"
Foreground="{StaticResource ForegroundBrush}" />
<CheckBox
x:Name="OnlyInstalledCheckbox"
Margin="10,0,10,0"
VerticalAlignment="Center"
Content="Only Installed"
Foreground="{StaticResource ForegroundBrush}" />
<Button
x:Name="ClearFiltersButton"
Margin="0,0,10,0"
Style="{StaticResource IconBareButtonStyle}"
ToolTip="Clear All Filters">
<iconPacks:Material Kind="FilterRemove" />
</Button>
</WrapPanel>
<Button Grid.Row="0"
x:Name="BackButton"
Width="30"
Height="30"
Margin="7,5,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Style="{StaticResource IconCircleButtonStyle}"
ToolTip="Back to main menu">
<iconPacks:PackIconMaterial Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type Button}}}" Kind="ArrowLeft" />
</Button>
</Grid>
</rxui:ReactiveUserControl>