102 lines
4.6 KiB
XML
102 lines
4.6 KiB
XML
<UserControl
|
|
x:Class="PlixP.Views.Dialogs.GenresDialog"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:hc="https://handyorg.github.io/handycontrol"
|
|
xmlns:input="clr-namespace:System.Windows.Input;assembly=PresentationCore"
|
|
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
|
xmlns:prism="http://prismlibrary.com/"
|
|
xmlns:renders="clr-namespace:PlixP.Renders"
|
|
Width="870"
|
|
Height="700"
|
|
prism:ViewModelLocator.AutoWireViewModel="True">
|
|
|
|
|
|
<materialDesign:Card
|
|
Padding="15"
|
|
materialDesign:ShadowAssist.ShadowDepth="Depth5"
|
|
Background="{StaticResource SecondaryRegionBrush}"
|
|
UniformCornerRadius="10">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock FontSize="24" Text="Genres" />
|
|
<Button
|
|
Grid.Column="1"
|
|
Margin="0,0,0,0"
|
|
Padding="0,0,0,0"
|
|
VerticalAlignment="Center"
|
|
Background="#FF5252"
|
|
BorderThickness="0"
|
|
Command="hc:ControlCommands.Close"
|
|
Foreground="White"
|
|
Resources="{StaticResource Material}"
|
|
Style="{StaticResource MaterialDesignFloatingActionMiniAccentButton}">
|
|
<materialDesign:PackIcon
|
|
Width="24"
|
|
Height="24"
|
|
Kind="Close" />
|
|
</Button>
|
|
</Grid>
|
|
<hc:ScrollViewer
|
|
Grid.Row="1"
|
|
Margin="0,8,0,0"
|
|
Padding="0">
|
|
<ItemsControl
|
|
HorizontalAlignment="Center"
|
|
HorizontalContentAlignment="Center"
|
|
ItemsSource="{Binding Genres}">
|
|
<ItemsControl.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<WrapPanel Orientation="Horizontal" />
|
|
</ItemsPanelTemplate>
|
|
</ItemsControl.ItemsPanel>
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
|
|
<materialDesign:Card
|
|
Margin="15"
|
|
materialDesign:ShadowAssist.ShadowDepth="Depth5"
|
|
Background="{StaticResource SecondaryRegionBrush}"
|
|
Cursor="{x:Static input:Cursors.Hand}"
|
|
MouseDown="GenreItem_OnMouseDown"
|
|
UniformCornerRadius="10">
|
|
<Grid>
|
|
<renders:ImageCacher
|
|
Width="250"
|
|
Height="150"
|
|
ImageSource="{Binding Path=Image}"
|
|
Stretch="UniformToFill" />
|
|
<Grid Background="#99222222">
|
|
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
|
|
<TextBlock
|
|
HorizontalAlignment="Center"
|
|
FontSize="24"
|
|
FontWeight="Light"
|
|
Text="{Binding Name}" />
|
|
<TextBlock
|
|
HorizontalAlignment="Center"
|
|
FontSize="24"
|
|
FontWeight="Bold"
|
|
Foreground="{StaticResource PrimaryBrush}"
|
|
Text="{Binding MovieCount}" />
|
|
|
|
</StackPanel>
|
|
</Grid>
|
|
</Grid>
|
|
</materialDesign:Card>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</hc:ScrollViewer>
|
|
</Grid>
|
|
</materialDesign:Card>
|
|
</UserControl>
|