Files
IPTVplayer/TV Player WPF/ProgramsList.xaml
T
2024-01-28 20:00:36 +02:00

40 lines
2.2 KiB
XML

<UserControl x:Class="TV_Player.ProgramsList"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<Grid x:Name="programsGrid">
<ListView ItemsSource="{Binding Programs}" Background="Transparent" VerticalAlignment="Top" Margin="0,50,0,0"
SelectionMode="Single" Style="{StaticResource ListBoxView}"
SelectedItem="{Binding SelectedItem}" BorderThickness="0"
SelectionChanged="ListBox_SelectionChanged">
<ListView.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Columns="17" />
</ItemsPanelTemplate>
</ListView.ItemsPanel>
<ListView.ItemTemplate>
<DataTemplate>
<Viewbox HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<Border Height="145" Width="106" HorizontalAlignment="Center" CornerRadius="5" BorderBrush="Yellow" BorderThickness="2">
<Grid Margin="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="#B0000000">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height=".4*"/>
</Grid.RowDefinitions>
<Image Source="{Binding Logo}" MaxWidth="100" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,0,0,10"/>
<TextBlock Grid.Row="1" Text="{Binding Name}" FontSize="15" TextAlignment="Center" Foreground="White" HorizontalAlignment="Center" TextWrapping="Wrap" Margin="1,0,1,2"/>
</Grid>
</Border>
</Viewbox>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</Grid>
</UserControl>