wabbajack/Wabbajack/Views/ModListGalleryView.xaml
2020-02-09 14:04:40 -06:00

137 lines
5.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="800"
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
x:Name="LoadingRing"
Grid.Row="1"
Visibility="Collapsed" />
<StackPanel
x:Name="NoneFound"
Grid.Row="1"
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
x:Name="ErrorIcon"
Grid.Row="1"
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
Title="Browsing Modlists"
Grid.Row="0"
Grid.RowSpan="2"
ShadowMargin="False" />
<WrapPanel
Grid.Row="0"
Height="25"
Margin="5,5,5,10"
HorizontalAlignment="Right"
Orientation="Horizontal">
<TextBlock
Margin="0,0,5,0"
VerticalAlignment="Center"
Foreground="{StaticResource ForegroundBrush}"
Text="Search" />
<TextBox
x:Name="SearchBox"
Width="160"
VerticalContentAlignment="Center" />
<CheckBox
x:Name="OnlyInstalledCheckbox"
Margin="20,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
x:Name="BackButton"
Grid.Row="0"
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>