HomeStream/EpgChannelWindow.xaml

68 lines
3.4 KiB
XML

<Window x:Class="FritzTV.EpgChannelWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Programm" Height="600" Width="540"
Background="#1A1A1A" Foreground="White"
WindowStartupLocation="CenterOwner">
<Window.Resources>
<Style x:Key="EpgItem" TargetType="ListBoxItem">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Foreground" Value="#DDD"/>
<Setter Property="Padding" Value="12,8"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListBoxItem">
<Border x:Name="bd" Background="{TemplateBinding Background}"
BorderBrush="#222" BorderThickness="0,0,0,1"
Padding="{TemplateBinding Padding}">
<ContentPresenter/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="bd" Property="Background" Value="#2A2A2A"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
<DockPanel>
<Border DockPanel.Dock="Top" Background="#0A0A0A" Padding="16,12">
<StackPanel>
<TextBlock x:Name="TxtTitle" Foreground="White" FontSize="18" FontWeight="Bold"/>
<TextBlock x:Name="TxtStatus" Foreground="#888" FontSize="11" Margin="0,4,0,0"/>
</StackPanel>
</Border>
<ListBox x:Name="LstEvents"
Background="Transparent" BorderThickness="0"
ItemContainerStyle="{StaticResource EpgItem}"
ScrollViewer.HorizontalScrollBarVisibility="Disabled">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0">
<TextBlock Text="{Binding TimeRange}" FontSize="13" FontWeight="SemiBold" Foreground="#0078D4"/>
<TextBlock Text="{Binding DurationLabel}" FontSize="10" Foreground="#666"/>
</StackPanel>
<StackPanel Grid.Column="1">
<TextBlock Text="{Binding Title}" FontSize="13" FontWeight="SemiBold"
Foreground="{Binding TitleBrush}" TextWrapping="Wrap"/>
<TextBlock Text="{Binding Description}" FontSize="11" Foreground="#888"
TextWrapping="Wrap" Margin="0,2,0,0"
MaxHeight="40" TextTrimming="CharacterEllipsis"/>
</StackPanel>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</DockPanel>
</Window>