45 lines
1.8 KiB
XML
45 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.ProgramsListView">
|
|
<Grid>
|
|
<ListBox ItemsSource="{Binding Programs}"
|
|
Background="Transparent"
|
|
VerticalAlignment="Top"
|
|
Margin="0,50,0,0"
|
|
BorderThickness="0"
|
|
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
|
ScrollViewer.VerticalScrollBarVisibility="Auto">
|
|
<ListBox.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<UniformGrid Columns="12" />
|
|
</ItemsPanelTemplate>
|
|
</ListBox.ItemsPanel>
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<Button Width="106"
|
|
Height="145"
|
|
Margin="3"
|
|
Classes="card"
|
|
Background="#B0000000"
|
|
BorderBrush="Yellow"
|
|
BorderThickness="2"
|
|
Command="{Binding DataContext.SelectProgramCommand, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
|
CommandParameter="{Binding}">
|
|
<Grid Margin="1" Background="#B0000000" RowDefinitions="*,Auto">
|
|
<Image Source="{Binding Logo}" MaxWidth="100" Margin="0,0,0,10" Stretch="Uniform" />
|
|
<TextBlock Grid.Row="1"
|
|
Text="{Binding Name}"
|
|
FontSize="15"
|
|
Foreground="White"
|
|
TextWrapping="Wrap"
|
|
TextAlignment="Center"
|
|
Margin="1,0,1,2"
|
|
HorizontalAlignment="Center" />
|
|
</Grid>
|
|
</Button>
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
</Grid>
|
|
</UserControl>
|