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

40 lines
1.5 KiB
XML

<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="TV_Player.AvaloniaApp.Views.PlaylistsGroupView"
x:Name="Root">
<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.SelectPlaylistCommand, RelativeSource={RelativeSource AncestorType=UserControl}}"
CommandParameter="{Binding}">
<TextBlock Text="{Binding Name}"
Foreground="White"
FontSize="20"
FontWeight="Bold"
TextWrapping="Wrap"
HorizontalAlignment="Center"
VerticalAlignment="Center"
TextAlignment="Center" />
</Button>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
</UserControl>