Files
IPTVplayer/TV Player Avalonia/Views/ProgramsGroupView.axaml
T

44 lines
1.8 KiB
XML

<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="TV_Player.AvaloniaApp.Views.ProgramsGroupView">
<Grid VerticalAlignment="Center">
<ListBox ItemsSource="{Binding Programs}"
Background="Transparent"
BorderThickness="0"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
ScrollViewer.VerticalScrollBarVisibility="Auto">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Columns="4" />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<Button Width="170"
Height="130"
Margin="8"
Background="#B0000000"
BorderBrush="Yellow"
BorderThickness="2"
Command="{Binding DataContext.SelectGroupCommand, RelativeSource={RelativeSource AncestorType=UserControl}}"
CommandParameter="{Binding}">
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Spacing="6">
<TextBlock Text="{Binding Name}"
Foreground="White"
FontSize="20"
FontWeight="Bold"
TextWrapping="Wrap"
HorizontalAlignment="Center"
TextAlignment="Center" />
<TextBlock Text="{Binding Count}"
Foreground="White"
FontSize="16"
HorizontalAlignment="Center" />
</StackPanel>
</Button>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
</UserControl>