You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
downkyi/DownKyi/Views/UserSpace/ViewSeasonsSeries.xaml

136 lines
7.4 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<UserControl
x:Class="DownKyi.Views.UserSpace.ViewSeasonsSeries"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
xmlns:prism="http://prismlibrary.com/"
prism:ViewModelLocator.AutoWireViewModel="True">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<ListBox
x:Name="nameSeasonsSeries"
ItemsSource="{Binding SeasonsSeries}"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
SelectedIndex="{Binding SelectedItem}">
<i:Interaction.Triggers>
<i:EventTrigger EventName="SelectionChanged">
<i:InvokeCommandAction Command="{Binding SeasonsSeriesCommand}" CommandParameter="{Binding ElementName=nameSeasonsSeries, Path=SelectedItem}" />
</i:EventTrigger>
</i:Interaction.Triggers>
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel IsItemsHost="True" />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.Style>
<Style TargetType="{x:Type ListBox}">
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListBox">
<Border
x:Name="Bd"
Padding="0"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}">
<ScrollViewer Focusable="False">
<ItemsPresenter />
</ScrollViewer>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ListBox.Style>
<ListBox.ItemContainerStyle>
<Style TargetType="{x:Type ListBoxItem}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBoxItem}">
<StackPanel
Grid.Row="0"
Margin="30,0,30,10"
HorizontalAlignment="Left"
Orientation="Vertical">
<Border
Width="190"
Height="119"
HorizontalAlignment="Center"
CornerRadius="5"
Cursor="Hand">
<Border.Background>
<!-- 长宽比1.6 -->
<ImageBrush ImageSource="{Binding Cover}" />
</Border.Background>
<Border
Width="70"
HorizontalAlignment="Right"
Background="{DynamicResource BrushBorderTranslucent100}"
CornerRadius="0 5 5 0">
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock
FontSize="16"
Foreground="{DynamicResource BrushText}"
Text="{Binding Count}" />
<!--<Image
Height="18"
Margin="0,10,0,0"
Source="/DownKyi;component/Resources/channel.png" />-->
<ContentControl
Width="20"
Height="20"
Margin="0,10,0,0"
VerticalAlignment="Center">
<Path
Width="20"
Height="20"
Data="{Binding TypeImage.Data}"
Fill="#E5E9EF"
Stretch="Uniform" />
</ContentControl>
</StackPanel>
</Border>
</Border>
<TextBlock
MaxWidth="190"
Margin="0,5,0,0"
HorizontalAlignment="Left"
Cursor="Hand"
Text="{Binding Name}"
TextTrimming="CharacterEllipsis"
ToolTip="{Binding Name}">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Foreground" Value="{DynamicResource BrushPrimary}" />
</Trigger>
<Trigger Property="IsMouseOver" Value="False">
<Setter Property="Foreground" Value="{DynamicResource BrushTextDark}" />
</Trigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<TextBlock
Name="nameZoneCount"
Margin="0,5,0,0"
HorizontalAlignment="Left"
Foreground="{DynamicResource BrushTextGrey2}"
Text="{Binding Ctime}" />
</StackPanel>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ListBox.ItemContainerStyle>
</ListBox>
</Grid>
</UserControl>