<?xml version="1.0" encoding="utf-8"?>
<Include
    xmlns="www.team-mediaportal.com/2008/mpf/directx"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Source="screens\master_bare.xaml"
    xmlns:mp_special_controls="clr-namespace:MediaPortal.UI.SkinEngine.SpecialElements.Controls;assembly=SkinEngine"
    xmlns:fanart="clr-namespace:MediaPortal.Extensions.UserServices.FanArtService.Client;assembly=FanArtService.Client"
    xmlns:tv="clr-namespace:MediaPortal.Plugins.SlimTv.Client.Controls;assembly=SlimTv.Client"
    >
  <Include.Resources>

    <!-- Header -->
    <!--ResourceWrapper x:Key="Header_Text" Resource="[SlimTvClient.Guide]"/-->

    <!-- SlimTvClient model -->
    <Model x:Key="SlimTvMultiChannelGuide" Id="5054408D-C2A9-451f-A702-E84AFCD29C10"/>

    <!-- Contents -->
    <ControlTemplate x:Key="Client_Template">
      <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" 
            DataContext="{Binding Source={StaticResource SlimTvMultiChannelGuide}}" Margin="0,-180,0,0">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="{ThemeResource MultiGuideHeaderWidth}"/>
          <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>

        <Grid.RowDefinitions>
          <RowDefinition Height="{ThemeResource MultiGuideProgramPreviewHeight}"/>
          <RowDefinition Height="Auto"/>
          <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <Image Stretch="Fill" Source="panel_tv_guide.png" Grid.Row="1" Grid.RowSpan="2" 
               Grid.Column="0" Grid.ColumnSpan="2" Margin="-45,0,-40,-90" ></Image>

        <Image Stretch="Fill" Source="tv_guide_description_bg.png" Grid.Row="0" 
               Grid.Column="0" Grid.ColumnSpan="2" Margin="-45,-60,-40,0" ></Image>
        
        <StackPanel x:Name="Groups" Margin="20,12,20,10" Grid.Column="0" Grid.Row="1"
              HorizontalAlignment="Left" VerticalAlignment="Center" Orientation="Horizontal">
          <Button x:Name="PrevGroupButton" Style="{StaticResource PreviousButtonStyle}" Content=" &lt; "
              Command="{Command PrevGroup}" Margin="0,0,5,0" />
          <Button x:Name="NextGroupButton" Style="{StaticResource NextButtonStyle}" Content=" &gt; "
              Command="{Command NextGroup}" Margin="0,0,5,0" />
          <Label x:Name="GroupNameLabel" Color="Black" Content="{Binding GroupName}"/>
        </StackPanel>
        <StackPanel x:Name="TimeControls" Margin="20,12,20,10" Grid.Column="1" Grid.Row="1"
                     HorizontalAlignment="Left" VerticalAlignment="Center" Orientation="Horizontal">
          <Button x:Name="ScrollBackwardButton" Style="{StaticResource PreviousButtonStyle}" Content=" - "
              Command="{Command ScrollBackward}" Margin="0,0,5,0" />
          <Button x:Name="ScrollForwardButton" Style="{StaticResource NextButtonStyle}" Content=" + "
              Command="{Command ScrollForward}" Margin="0,0,5,0" />
          <Label x:Name="GuideStartTimeLabel" Content="{Binding Path=GuideStartTime, Converter={StaticResource SlimTvDateFormatConverter}}"
              Color="Black" />
        </StackPanel>

        <tv:EpgGrid x:Name="EpgGrid" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="2" Style="{ThemeResource EpgGridStyle}" Margin="2,30,4,-30" />

          <Control Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="0,0,0,30">
            <Control.TemplateControl>
              <Include Source="screens\ProgramInfoSlim.inc"/>
            </Control.TemplateControl>
          </Control>

        <KeyBinding Key="Yellow" Command="{Command Path=NextGroup}"/>
        <KeyBinding Key="Green" Command="{Command Path=PrevGroup}"/>
      </Grid>
    </ControlTemplate>
  </Include.Resources>
</Include>
