Public paste
Undefined
By: Guest | Date: Oct 31 2021 09:54 | Format: None | Expires: never | Size: 2.64 KB | Hits: 328

  1. <UserControl x:Class="StyletUI.TvShowView"
  2.     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3.     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4.     xmlns:s="https://github.com/canton7/Stylet">
  5.     <Border BorderBrush="#666666" Background="Red" BorderThickness="1,1,1,1" CornerRadius="8,8,8,8">
  6.         <Border.Effect>
  7.             <DropShadowEffect Color="Gray" Opacity="0.5" />
  8.         </Border.Effect>
  9.         <Grid Margin="4">
  10.             <Grid.ColumnDefinitions>
  11.                 <ColumnDefinition Width="*"/>
  12.                 <ColumnDefinition Width="*"/>
  13.                 <ColumnDefinition Width="*"/>
  14.                 <ColumnDefinition Width="*"/>
  15.             </Grid.ColumnDefinitions>
  16.             <StackPanel Grid.Column="0" HorizontalAlignment="Center" VerticalAlignment="Center">
  17.                 <TextBlock Text="{Binding Name}" FontSize="20" HorizontalAlignment="Center" VerticalAlignment="Center"/>
  18.                 <TextBlock Text="{Binding EpisodeName}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
  19.             </StackPanel>
  20.             <StackPanel Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center">
  21.                 <TextBlock Text="{Binding Season, StringFormat='Season: {0}'}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
  22.                 <TextBlock Text="{Binding Episode, StringFormat='Episode: {0}'}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
  23.             </StackPanel>
  24.             <TextBlock Grid.Column="2" Text="{Binding Percent}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
  25.             <StackPanel Orientation="Horizontal" Grid.Column="3" HorizontalAlignment="Right">
  26.                 <Button Command="{s:Action DoStartVideo}" Visibility="{Binding IsOnDisc, Converter={x:Static s:BoolToVisibilityConverter.Instance}}" HorizontalAlignment="Right" BorderBrush="Transparent" Background="#00000000">
  27.                     <Image Source="\Icons\clapperboard.png" Height="20" Width="20" Stretch="Uniform"/>
  28.                 </Button>
  29.                 <Button Command="{s:Action DoOpenInBrowser}" HorizontalAlignment="Right" BorderBrush="Transparent" Background="#00000000">
  30.                     <Image Source="\Assets\Icons\earth-africa-europe.png" Width="20" Height="20" Stretch="Uniform"/>
  31.                 </Button>
  32.                 <Button Command="{s:Action DoDownload}" HorizontalAlignment="Right" BorderBrush="Transparent" Background="#00000000">
  33.                     <Image Source="\Assets\Icons\cloud-download.png" Width="20" Height="20" Stretch="Uniform"/>
  34.                 </Button>
  35.             </StackPanel>
  36.         </Grid>
  37.     </Border>
  38. </UserControl>
  39.