text: <?xml version="1.0" encoding="utf-8"?>
  
  <!--
  This is the master template for standard menu screens:
  A header text, left the menu, under the menu a small video preview,
  at the right side the content pane and at the bottom the current play control.
  
  Usage:
  
    <Include
        xmlns="www.team-mediaportal.com/2008/mpf/directx"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Source="screens\master_menu.xaml">
      <Include.Resources>
        <ResourceWrapper x:Key="Header_Text">
          [Header text]
        </ResourceWrapper>
        <ControlTemplate x:Key="Contents_Template">
          [UI element to be displayed in the content area]
        </ControlTemplate>
      </Include.Resources>
    </Include>
  
  Parameters which have to be accessible by a DynamicResource lookup:
   - Header_Text (String): The text to be displayed as header
   - Contents_Template (ConrolTemplate): Template for element to be displayed
     in the content area at the right side
  -->
  
  <Include
      xmlns="www.team-mediaportal.com/2008/mpf/directx"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      Source="screens\master_bare.xaml"
      xmlns:fanart="clr-namespace:MediaPortal.Extensions.UserServices.FanArtService.Client;assembly=FanArtService.Client"
      xmlns:media="clr-namespace:MediaPortal.UiComponents.Media.Models.AspectWrappers;assembly=Media"
      xmlns:aspect="clr-namespace:MediaPortal.Common.MediaManagement.DefaultItemAspects;assembly=MediaPortal.Common"
      xmlns:mp_special_controls="clr-namespace:MediaPortal.UI.SkinEngine.SpecialElements.Controls;assembly=SkinEngine"
      xmlns:bv="clr-namespace:MediaPortal.UiComponents.BlueVision.Models;assembly=BlueVision"
      >
    <Include.Resources>
      <Model x:Key="CurrentNewsModel" Id="EE1BBF83-AE5C-491C-9978-14737A2B0883"/>
  
      <!-- Header has to be defined by the includer: "Header_Text" -->
  
      <!-- Client_Template -->
      <ControlTemplate x:Key="Client_Template">
        <DockPanel LastChildFill="True">
          <DockPanel.Resources>
            <Model x:Key="MenuModel" Id="A6C6D5DA-55FE-4b5f-AE83-B03E8BBFA177"/>
          </DockPanel.Resources>
  
          <DockPanel.Triggers>
            <DataTrigger Binding="{Binding Source={StaticResource MenuModel},Path=BeginNavigation}" Value="PageLeft">
              <DataTrigger.EnterActions>
                <BeginStoryboard x:Name="SlideInLeft_BeginStoryboard" Storyboard="{ThemeResource SlideInLeft}"/>
              </DataTrigger.EnterActions>
              <DataTrigger.ExitActions>
                <StopStoryboard BeginStoryboardName="SlideInLeft_BeginStoryboard"/>
              </DataTrigger.ExitActions>
            </DataTrigger>
            <DataTrigger Binding="{Binding Source={StaticResource MenuModel},Path=BeginNavigation}" Value="PageRight">
              <DataTrigger.EnterActions>
                <BeginStoryboard x:Name="SlideInRight_BeginStoryboard" Storyboard="{ThemeResource SlideInRight}"/>
              </DataTrigger.EnterActions>
              <DataTrigger.ExitActions>
                <StopStoryboard BeginStoryboardName="SlideInRight_BeginStoryboard"/>
              </DataTrigger.ExitActions>
            </DataTrigger>
          </DockPanel.Triggers>
  
          <!--Begin Home Screen-->
          <!--Footer-->
          <!--Movie-->
          <Grid DockPanel.Dock="Bottom" Margin="0,80,0,-80" IsVisible="{Binding Source={StaticResource MenuModel},Path=IsHome}">  
          <media:MovieAspectWrapper  MediaItem="{Binding Source={StaticResource FanArtBackgroundModel},Path=MediaItem}">
            <media:MovieAspectWrapper.Template>
              <ControlTemplate>
                <Grid VerticalAlignment="Bottom" HorizontalAlignment="Stretch"  
                      DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="80"/>
                    <ColumnDefinition Width="1670"/>
                    <ColumnDefinition Width="200"/>
                  </Grid.ColumnDefinitions>
                  <Grid.IsVisible>
                    <MultiBinding Converter="{StaticResource MediaItemAspectToBoolConverter}">
                      <Binding Source="{StaticResource FanArtBackgroundModel}" Path="MediaItem" />
                      <Binding Source="{x:Static aspect:MovieAspect.ASPECT_ID}" />
                    </MultiBinding>
                  </Grid.IsVisible>
                  <Label Grid.Row="0" Grid.Column="1" x:Name="MovieName" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}"
                        Content="{Binding MovieName}" Color="Black" FontSize="{ThemeResource NormalFontSize}" Margin="-20,0,20,0"
                        HorizontalAlignment="Center" VerticalAlignment="Bottom"/>
  
                  <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center">
                    <StarRatingPanel x:Name="RatingReadOnly" IsReadOnly="True" StarReadOnlyTemplate="{StaticResource StarReadOnlyBlackTemplate}"
                                                 Maximum="10" Value="{Binding TotalRating}" Margin="0,2,0,-2">
                      <StarRatingPanel.LayoutTransform>
                        <TransformGroup>
                          <ScaleTransform ScaleX="1.65" ScaleY="1.5"/>
                        </TransformGroup>
                      </StarRatingPanel.LayoutTransform>
                    </StarRatingPanel>
  
                    <Label x:Name="RatingCountLabel" Color="Black"  Margin="8,0,0,0">
                      <Label.Content>
                        <Binding Path="TotalRating" Converter="{StaticResource StringFormatConverter}" ConverterParameter="{}({0:F1})"/>
                      </Label.Content>
                    </Label>
                  </StackPanel>
                </Grid>
              </ControlTemplate>
            </media:MovieAspectWrapper.Template>
          </media:MovieAspectWrapper>
          
          <!--Series-->
            <media:SeriesAspectWrapper  MediaItem="{Binding Source={StaticResource FanArtBackgroundModel},Path=MediaItem}">
              <media:SeriesAspectWrapper.Template>
                <ControlTemplate>
                  <Grid VerticalAlignment="Bottom" HorizontalAlignment="Stretch"
                        DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}">
                    <Grid.RowDefinitions>
                      <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="80"/>
                      <ColumnDefinition Width="1670"/>
                      <ColumnDefinition Width="200"/>
                    </Grid.ColumnDefinitions>
                    <Grid.IsVisible>
                      <MultiBinding Converter="{StaticResource MediaItemAspectToBoolConverter}">
                        <Binding Source="{StaticResource FanArtBackgroundModel}" Path="MediaItem" />
                        <Binding Source="{x:Static aspect:SeriesAspect.ASPECT_ID}" />
                      </MultiBinding>
                    </Grid.IsVisible>
                    <Label Grid.Row="0" Grid.Column="1" x:Name="EpisodeName" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}"
                          Content="{Binding EpisodeName}" Color="Black" FontSize="{ThemeResource NormalFontSize}" Margin="-20,0,20,0"
                          HorizontalAlignment="Center" VerticalAlignment="Bottom"/>
  
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center">
                      <StarRatingPanel x:Name="RatingReadOnly" IsReadOnly="True" StarReadOnlyTemplate="{StaticResource StarReadOnlyBlackTemplate}"
                                                   Maximum="10" Value="{Binding TotalRating}" Margin="0,2,0,-2">
                        <StarRatingPanel.LayoutTransform>
                          <TransformGroup>
                            <ScaleTransform ScaleX="1.65" ScaleY="1.5"/>
                          </TransformGroup>
                        </StarRatingPanel.LayoutTransform>
                      </StarRatingPanel>
  
                      <Label x:Name="RatingCountLabel" Color="Black"  Margin="8,0,0,0">
                        <Label.Content>
                          <Binding Path="TotalRating" Converter="{StaticResource StringFormatConverter}" ConverterParameter="{}({0:F1})"/>
                        </Label.Content>
                      </Label>
                    </StackPanel>
                  </Grid>
                </ControlTemplate>
              </media:SeriesAspectWrapper.Template>
            </media:SeriesAspectWrapper>
            
            <!--Audio-->
            <media:MediaAspectWrapper  MediaItem="{Binding Source={StaticResource FanArtBackgroundModel},Path=MediaItem}">
              <media:MediaAspectWrapper.Template>
                <ControlTemplate>
                  <Grid VerticalAlignment="Bottom" HorizontalAlignment="Stretch"
                        DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}">
                    <Grid.RowDefinitions>
                      <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="80"/>
                      <ColumnDefinition Width="1670"/>
                      <ColumnDefinition Width="200"/>
                    </Grid.ColumnDefinitions>
                    <Grid.IsVisible>
                      <MultiBinding Converter="{StaticResource MediaItemAspectToBoolConverter}">
                        <Binding Source="{StaticResource FanArtBackgroundModel}" Path="MediaItem" />
                        <Binding Source="{x:Static aspect:AudioAspect.ASPECT_ID}" />
                      </MultiBinding>
                    </Grid.IsVisible>
                    <Label Grid.Row="0" Grid.Column="1" x:Name="Title" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}"
                          Content="{Binding Title}" Color="Black" FontSize="{ThemeResource NormalFontSize}" Margin="-20,0,20,0"
                          HorizontalAlignment="Center" VerticalAlignment="Bottom"/>
  
                    <!--StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center">
                      <StarRatingPanel x:Name="RatingReadOnly" IsReadOnly="True" StarReadOnlyTemplate="{StaticResource StarReadOnlyBlackTemplate}"
                                                   Maximum="10" Value="{Binding TotalRating}" Margin="0,2,0,-2">
                        <StarRatingPanel.LayoutTransform>
                          <TransformGroup>
                            <ScaleTransform ScaleX="1.65" ScaleY="1.5"/>
                          </TransformGroup>
                        </StarRatingPanel.LayoutTransform>
                      </StarRatingPanel>
  
                      <Label x:Name="RatingCountLabel" Color="Black"  Margin="8,0,0,0">
                        <Label.Content>
                          <Binding Path="TotalRating" Converter="{StaticResource StringFormatConverter}" ConverterParameter="{}({0:F1})"/>
                        </Label.Content>
                      </Label>
                    </StackPanel-->
                  </Grid>
                </ControlTemplate>
              </media:MediaAspectWrapper.Template>
            </media:MediaAspectWrapper>  
            
          </Grid>
  
          <Grid DockPanel.Dock="Center" Margin="0,0,0,-80" IsVisible="{Binding Source={StaticResource MenuModel},Path=IsHome}"
                xmlns:collections="clr-namespace:MediaPortal.UI.Presentation.DataObjects;assembly=MediaPortal.UI">
            <Grid.Resources>
              <Model x:Key="CurrentWeatherModel" Id="FC57FF5C-F72F-47E9-B973-338E31FF7FF1"/>
              <Model x:Key="CurrentNewsModel" Id="EE1BBF83-AE5C-491C-9978-14737A2B0883"/>
              <Model x:Key="MediaListModel" Id="6121E6CC-EB66-4ABC-8AA0-D952B64C0414"/>
            </Grid.Resources>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="30"/>
              <ColumnDefinition Width="200"/>
              <ColumnDefinition Width="200"/>
              <ColumnDefinition Width="200"/>
              <ColumnDefinition Width="200"/>
              <ColumnDefinition Width="200"/>
              <ColumnDefinition Width="200"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
  
            <Grid Grid.Row="0" Grid.RowSpan="2" Grid.Column="1" Margin="0,0,0,0" DataContext="{Binding Source={StaticResource MediaListModel}}">
              <Grid.RowDefinitions>
                <RowDefinition Height="40"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <Label Grid.Row="0" Content="[Movies.Title]" Margin="0,0,0,0" HorizontalAlignment="Center" Color="{ThemeResource TextColor}"/>
              <ListView Grid.Row="1" x:Name="Movies" ItemsSource="{Binding Lists[LatestMovies].AllItems}" Style="{ThemeResource LatestMovieItemsListListViewStyle}" HorizontalAlignment="Center">
                <ListView.Resources>
                  <CommandBridge x:Key="Menu_Command" Command="{Binding Path=Command,Mode=OneTime}"/>
                </ListView.Resources>
              </ListView>
            </Grid>
  
            <Grid Grid.Row="0" Grid.RowSpan="2" Grid.Column="2" Margin="0,0,0,0" DataContext="{Binding Source={StaticResource MediaListModel}}">
              <Grid.RowDefinitions>
                <RowDefinition Height="40"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <Label Grid.Row="0" Content="[Audio.Title]" Margin="0,0,0,0" HorizontalAlignment="Center" Color="{ThemeResource TextColor}"/>
              <ListView x:Name="Audio" Grid.Row="1" ItemsSource="{Binding Lists[LatestAudio].AllItems}" Style="{ThemeResource MediaItemsListListViewStyle2}" HorizontalAlignment="Center">
                <ListView.Resources>
                  <CommandBridge x:Key="Menu_Command" Command="{Binding Path=Command,Mode=OneTime}"/>
                </ListView.Resources>
              </ListView>
            </Grid>
  
            <Grid Grid.Row="0" Grid.RowSpan="2" Grid.Column="3" Margin="0,0,0,0" DataContext="{Binding Source={StaticResource MediaListModel}}">
              <Grid.RowDefinitions>
                <RowDefinition Height="40"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <Label Grid.Row="0" Content="[Series.Title]" Margin="0,0,0,0" HorizontalAlignment="Center" Color="{ThemeResource TextColor}"/>
              <ListView x:Name="Series" Grid.Row="1" ItemsSource="{Binding Lists[LatestEpisodes].AllItems}" Style="{ThemeResource MediaItemsListListViewStyle2}" HorizontalAlignment="Center">
                <ListView.Resources>
                  <CommandBridge x:Key="Menu_Command" Command="{Binding Path=Command,Mode=OneTime}"/>
                </ListView.Resources>
              </ListView>
            </Grid>
  
            <Grid Grid.Row="0" Grid.RowSpan="2" Grid.Column="4" Margin="0,0,0,0" DataContext="{Binding Source={StaticResource MediaListModel}}">
              <Grid.RowDefinitions>
                <RowDefinition Height="40"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <Label Grid.Row="0" Content="[Images.Title]" Margin="0,0,0,0" HorizontalAlignment="Center" Color="{ThemeResource TextColor}"/>
              <ListView x:Name="Images" Grid.Row="1" ItemsSource="{Binding Lists[LatestImages].AllItems}" Style="{ThemeResource MediaItemsListListViewStyle2}" HorizontalAlignment="Center">
                <ListView.Resources>
                  <CommandBridge x:Key="Menu_Command" Command="{Binding Path=Command,Mode=OneTime}"/>
                </ListView.Resources>
              </ListView>
            </Grid>
  
            <Grid Grid.Row="0" Grid.RowSpan="2" Grid.Column="5" Margin="0,0,0,0" DataContext="{Binding Source={StaticResource MediaListModel}}">
              <Grid.RowDefinitions>
                <RowDefinition Height="40"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <Label Grid.Row="0" Content="[Recordings.Title]" Margin="0,0,0,0" HorizontalAlignment="Center" Color="{ThemeResource TextColor}"/>
              <ListView x:Name="Recordings" Grid.Row="1" ItemsSource="{Binding Lists[LatestRecordings].AllItems}" Style="{ThemeResource MediaItemsListListViewStyle2}" HorizontalAlignment="Center">
                <ListView.Resources>
                  <CommandBridge x:Key="Menu_Command" Command="{Binding Path=Command,Mode=OneTime}"/>
                </ListView.Resources>
              </ListView>
            </Grid>
  
            <Grid Grid.Row="0" Grid.RowSpan="2" Grid.Column="6" Margin="0,0,0,0" DataContext="{Binding Source={StaticResource MediaListModel}}">
              <Grid.RowDefinitions>
                <RowDefinition Height="40"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <!--Label Grid.Row="0" Content="[Games.Title]" Margin="0,0,0,0" HorizontalAlignment="Center" Color="{ThemeResource TextColor}"/-->
              <ListView x:Name="Cames" Grid.Row="1" ItemsSource="{Binding Lists[LatestGames].AllItems}" Style="{ThemeResource MediaItemsListListViewStyle2}" HorizontalAlignment="Center">
                <ListView.Resources>
                  <CommandBridge x:Key="Menu_Command" Command="{Binding Path=Command,Mode=OneTime}"/>
                </ListView.Resources>
              </ListView>
            </Grid>
  
            <Grid Grid.Row="0" Grid.Column="7">
              <Grid.RowDefinitions>
                <RowDefinition Height="40"/>
                <RowDefinition Height="160"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="160"/>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Content="[Weather.Title]" Margin="20,0,20,0" 
                     HorizontalAlignment="Center" Color="{ThemeResource TextColor}"/>
              <!--Image  Grid.Row="1" Grid.Column="0" x:Name="WeatherBigIcon" Stretch="Uniform" Source="{Binding Source={StaticResource CurrentWeatherModel}, Path=CurrentLocation.Condition.BigIconProperty}"
               IsVisible="{Binding UseInHome}" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0"/-->
  
              <StackPanel Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" VerticalAlignment="Center">
                <WrapPanel Orientation="Horizontal" HorizontalAlignment="Center">
                  <Label  x:Name="Temp" Content="{Binding Source={StaticResource CurrentWeatherModel}, Path=CurrentLocation.Condition.Temperature}"
                    Color="{ThemeResource TextColor}" IsVisible="{Binding UseInHome}"
                    VerticalAlignment="Center" HorizontalAlignment="Center"/>
                  <Label Content=", " Color="{ThemeResource TextColor}"> </Label>
                  <Label Grid.Column="1" x:Name="Humidity" Content="{Binding Source={StaticResource CurrentWeatherModel}, Path=CurrentLocation.Condition.Humidity}"
                    Color="{ThemeResource TextColor}" IsVisible="{Binding UseInHome}"
                    VerticalAlignment="Center" HorizontalAlignment="Left" Margin="0,0,0,0"/>
                </WrapPanel>
  
                <Label  x:Name="Place"
                        Content="{Binding Source={StaticResource CurrentWeatherModel}, Path=CurrentLocation.Name}"
                  Color="{ThemeResource TextColor}" IsVisible="{Binding UseInHome}"
                  VerticalAlignment="Center" HorizontalAlignment="Center" />
                <Label  x:Name="Wind" Content="{Binding Source={StaticResource CurrentWeatherModel}, Path=CurrentLocation.Condition.Wind}"
                  Color="{ThemeResource TextColor}" IsVisible="{Binding UseInHome}"
                  VerticalAlignment="Center" HorizontalAlignment="Center" Margin="0"/>
              </StackPanel>
            </Grid>
  
            <Grid Grid.Row="2" Grid.Column="7" Margin="20,20,20,0" >
              <Grid.RowDefinitions>
                <RowDefinition Height="40"/>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <Label Grid.Row="0" Content="[News.Title]" Margin="0,0,0,0" HorizontalAlignment="Center" Color="{ThemeResource TextColor}"/>
              <Grid Grid.Column="0" Grid.Row="1" Margin="30,0,10,0" DataContext="{Binding Source={StaticResource CurrentNewsModel}}" VerticalAlignment="Stretch">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition Height="70" />
                  <RowDefinition Height="*" />
                </Grid.RowDefinitions>
                <Label Grid.Row="0" Grid.Column="0" x:Name="News" Color="{ThemeResource TextColor}"
                       Content="{Binding CurrentNewsItem.Title}" Wrap="True" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" />
                <Label Grid.Row="1" Grid.Column="0" Margin="0,0,0,55" x:Name="NewSummary" Wrap="True" Scroll="Auto" ScrollSpeed="10" ScrollDelay="3"
                       VerticalAlignment="Stretch" Content="{Binding CurrentNewsItem.Summary}" Opacity="0.6"
                       Color="{ThemeResource TextColor}"/>
              </Grid>
            </Grid>
          </Grid>
  
  
          <!--End Home Screen-->
  
          <Grid x:Name="MainLayoutPanel" DockPanel.Dock="Center" VerticalAlignment="Bottom" HorizontalAlignment="Stretch" Margin="11,0,0,-2" IsVisible="{Binding Source={StaticResource MenuModel},Path=!IsHome}">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
  
            <bv:GridListView x:Name="MainMenu" Grid.Row="1" Style="{ThemeResource HomeMenuListViewStyle}" Margin="0,0,0,0"
                VerticalAlignment="Top" SetFocusPrio="Fallback"
                BeginNavigation="{Binding Source={StaticResource MenuModel},Path=BeginNavigation,Mode=TwoWay}"
                ItemsSource="{Binding Source={StaticResource MenuModel},Path=PositionedMenuItems,Mode=OneTime}"
                IsVisible="{Binding Source={StaticResource MenuModel},Path=!IsHome}">
              <bv:GridListView.Resources>
                <CommandBridge x:Key="Menu_Command" Command="{Binding Path=Command,Mode=OneTime}"/>
              </bv:GridListView.Resources>
              <bv:GridListView.RenderTransform>
                <TranslateTransform X="0" Y="0"/>
              </bv:GridListView.RenderTransform>
            </bv:GridListView>
  
            <bv:GridListView x:Name="NextPage" Grid.Row="1" Style="{ThemeResource HomeMenuListViewStyle}" Margin="0,0,0,0" 
              VerticalAlignment="Stretch" IsEnabled="False"
              ItemsSource="{Binding Source={StaticResource MenuModel},Path=NextPageItems,Mode=OneTime}"
              AnimationStarted="{Binding Source={StaticResource MenuModel},Path=AnimationStarted,Mode=OneWayToSource}"
              AnimationCompleted="{Binding Source={StaticResource MenuModel},Path=AnimationCompleted,Mode=OneWayToSource}"
              IsVisible="{Binding Source={StaticResource MenuModel},Path=!IsHome}">
              <bv:GridListView.Resources>
                <CommandBridge x:Key="Menu_Command" Command="{Binding Path=Command,Mode=OneTime}"/>
              </bv:GridListView.Resources>
              <bv:GridListView.RenderTransform>
                <TranslateTransform X="-1920" Y="0"/>
              </bv:GridListView.RenderTransform>
            </bv:GridListView>
  
            <!-- On HomeScreen we won't have any content visible, so we use this Panel to contain our shutdown button -->
            <Grid x:Name="ContentPanel" Grid.Row="2" Grid.Column="0" SetFocusPrio="Default">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
              </Grid.RowDefinitions>
              <Grid.Resources>
                <Model x:Key="PowerMenuModel" Id="54F798AF-03E1-4A82-938E-D0D0DC608B1A"/>
              </Grid.Resources>
              <!-- Navigates to ShutdownManager.ShutdownDialog, defined by its DialogState ID -->
              <Image Source="ShutdownIcon_dark.png" Stretch="Uniform" Height="45" Margin="0,90,0,-82"
                     IsVisible="{Binding Source={StaticResource PowerMenuModel},Path=!IsMenuOpen}"/>
  
              <Label Margin="0,5,0,-30" Height="80" HorizontalAlignment="Center" HorizontalContentAlignment="Center" Opacity="0.6"
                     DataContext="{Binding Source={StaticResource BackgroundManagerModel}, Path=SelectedItem}"
                     Content="{Binding [Help]}" Color="{ThemeResource TextColor}" Wrap="True">
                <Label.IsVisible>
                  <MultiBinding Converter="{StaticResource ExpressionMultiValueConverter}" ConverterParameter="{} {0} &amp;&amp; {1}">
                    <Binding Source="{StaticResource MenuModel}" Path="IsHomeScreen"/>
                    <Binding Source="{StaticResource MenuModel}" Path="!IsHome"/>
                  </MultiBinding>
                </Label.IsVisible>
              </Label>
            </Grid>
  
            <Grid x:Name="PowerBottomPanel" Margin="30,55,-30,-850" VerticalAlignment="Bottom" Grid.Column="0" Grid.Row="2"
                    Width="550" HorizontalAlignment="Center">
              <Grid.Resources>
                <Model x:Key="PowerMenuModel" Id="54F798AF-03E1-4A82-938E-D0D0DC608B1A"/>
                <Storyboard x:Key="SlideUpStoryboard" FillBehavior="HoldEnd">
                  <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" FillBehavior="HoldEnd" Storyboard.TargetName="PowerBottomPanel" Storyboard.TargetProperty="RenderTransform.Y">
                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                    <SplineDoubleKeyFrame KeyTime="00:00:00.25" Value="-650"/>
                  </DoubleAnimationUsingKeyFrames>
                </Storyboard>
                <Storyboard x:Key="SlideDownStoryboard" FillBehavior="HoldEnd">
                  <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" FillBehavior="HoldEnd" Storyboard.TargetName="PowerBottomPanel" Storyboard.TargetProperty="RenderTransform.Y">
                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="-650"/>
                    <SplineDoubleKeyFrame KeyTime="00:00:00.25" Value="0"/>
                  </DoubleAnimationUsingKeyFrames>
                </Storyboard>
              </Grid.Resources>
              <Grid.Triggers>
                <MultiTrigger>
                  <MultiTrigger.Conditions>
                    <Condition Property="IsKeyboardFocusWithin" Value="False" />
                    <Condition Property="IsMouseOver" Value="False" />
                  </MultiTrigger.Conditions>
                  <MultiTrigger.EnterActions>
                    <TriggerCommand Command="{Command Source={StaticResource PowerMenuModel}, Path=CloseMenu}"/>
                  </MultiTrigger.EnterActions>
                  <MultiTrigger.ExitActions>
                    <TriggerCommand Command="{Command Source={StaticResource PowerMenuModel}, Path=OpenMenu}"/>
                  </MultiTrigger.ExitActions>
                </MultiTrigger>
                
                <!-- Setting default state of menu to hidden -->
                <EventTrigger RoutedEvent="Screen.Show">
                  <TriggerCommand Command="{Command Source={StaticResource PowerMenuModel}, Path=CloseMenu}"/>
                  <StopStoryboard BeginStoryboardName="SlideDown_BeginStoryboard"/>
                </EventTrigger>
                
                <!-- Slide-In animation when the MenuModel.ShowMenu gets true -->
                <DataTrigger Binding="{Binding Source={StaticResource PowerMenuModel},Path=IsMenuOpen}" Value="True">
                  <DataTrigger.EnterActions>
                    <BeginStoryboard x:Name="SlideUp_BeginStoryboard" Storyboard="{ThemeResource SlideUpStoryboard}"/>
                  </DataTrigger.EnterActions>
                  <DataTrigger.ExitActions>
                    <BeginStoryboard x:Name="SlideDown_BeginStoryboard" Storyboard="{ThemeResource SlideDownStoryboard}"/>
                    <StopStoryboard BeginStoryboardName="SlideUp_BeginStoryboard"/>
                  </DataTrigger.ExitActions>
                  <Setter TargetName="PowerMenu" Property="SetFocusPrio" Value="Highest" />
                  <Setter TargetName="PowerMenu" Property="SetFocus" Value="True" />
                </DataTrigger>              
              </Grid.Triggers>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="650"/>
              </Grid.ColumnDefinitions>
              <Grid.RowDefinitions>
                <RowDefinition Height="550"/>
                <RowDefinition Height="200"/>
              </Grid.RowDefinitions>
              <Grid.RenderTransform>
                <TranslateTransform Y="0"/>
              </Grid.RenderTransform>
              <!--Image Source="menu_fade.png" Stretch="Fill" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="-65,-168,-50,-50">
            </Image-->
              <Rectangle RadiusX="{ThemeResource DialogBorderCornerRadius}" RadiusY="{ThemeResource DialogBorderCornerRadius}"
                         HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,30,67,0">
                <Rectangle.Fill>
                  <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="{ThemeResource DialogBackgroundGradient1Color}"/>
                    <GradientStop Color="{ThemeResource DialogBackgroundGradient2Color}" Offset="1"/>
                  </LinearGradientBrush>
                </Rectangle.Fill>
              </Rectangle>
              <Image Source="ShutdownIcon_dark.png" Stretch="Uniform" VerticalAlignment="Top" HorizontalAlignment="Center" 
                     Margin="-60,45,0,0" Height="45" Opacity="0.8"/>
              <ListView x:Name="PowerMenu" Style="{ThemeResource HiddenMenuListViewStyle}" Margin="20,100,80,10"
                  HorizontalAlignment="Stretch" VerticalAlignment="Stretch" SetFocusPrio="Default"
                  ItemsSource="{Binding Source={StaticResource PowerMenuModel},Path=MenuItems,Mode=OneTime}"
                  IsEnabled="{Binding Source={StaticResource PowerMenuModel},Path=IsMenuOpen}">
                <ListView.Resources>
                  <CommandBridge x:Key="Menu_Command" Command="{Binding Path=Command,Mode=OneTime}"/>
                </ListView.Resources>
              </ListView>
              <Button x:Name="PowerButton" Content=" " Style="{ThemeResource ButtonWideStyle_GrowOnly}"
                      Grid.Row="0" Grid.Column="0" VerticalAlignment="Top" HorizontalAlignment="Center" Height="45" Margin="0,-45,0,60"
                      IsEnabled="{Binding Source={StaticResource PowerMenuModel},Path=!IsMenuOpen}"
                      IsVisible="{Binding Source={StaticResource PowerMenuModel},Path=!IsMenuOpen}"
                      Command="{Command Source={StaticResource PowerMenuModel}, Path=ToggleMenu}">
                <!--Image Source="ShutdownIcon.png" Stretch="Uniform" Height="45" Margin="-40,0,0,0"/-->
              </Button>
            </Grid>        
          </Grid>
        </DockPanel>
        
      </ControlTemplate>
  
      <ControlTemplate x:Key="Alternative_Header_Template">
        <Grid  Grid.Column="0" Grid.Row="2" Margin="50,14,50,0" DataContext="{Binding Source={StaticResource CurrentNewsModel}}" 
               VerticalAlignment="Stretch">
          <Grid.ColumnDefinitions>
            <ColumnDefinition Width="800" />
            <ColumnDefinition Width="*" />
          </Grid.ColumnDefinitions>
          <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
          </Grid.RowDefinitions>
  
          <Grid.Resources>
            <Model x:Key="MenuModel" Id="A6C6D5DA-55FE-4b5f-AE83-B03E8BBFA177"/>
          </Grid.Resources>
  
          <!--Label Grid.Row="0" Grid.Column="0" x:Name="News" FontSize="{ThemeResource SmallFontSize}" Color="Black" 
                 Content="{Binding CurrentNewsItem.Title}" IsVisible="{Binding Source={StaticResource MenuModel},Path=!IsHome}" />
  
          <Label Grid.Row="0" Grid.Column="1" Margin="20,0,0,0" x:Name="NewSummary" Wrap="False" Scroll="Auto" ScrollSpeed="20" ScrollDelay="3"
                 HorizontalAlignment="Stretch" Height="36" IsVisible="{Binding Source={StaticResource MenuModel},Path=!IsHome}"
                 Content="{Binding CurrentNewsItem.Summary}"
                 Color="{ThemeResource TextColor}" FontSize="{ThemeResource SmallFontSize}"/-->
          
        </Grid>
      </ControlTemplate>
    </Include.Resources>
  </Include>
  