title: Hiding Panorama Title in landscape mode [wp7]
body: <p>I want to hide the title <code>&lt;controls:Panorama Title="myTitle" Style="{StaticResource customStyle}"&gt;</code> in landscape mode</p>
  
  <p>I have applied custom style for it (code below) and trying to do this <em>(based on name in custom style)</em>, but I get error the name TitleLayer does not exists in current context:</p>
  
  <pre><code>if ((e.Orientation == PageOrientation.LandscapeRight) || (e.Orientation == PageOrientation.LandscapeLeft))
  {
      TitleLayer.Visibility = Visibility.Collapsed;
  }
  </code></pre>
  
  <p><strong>///////////////// Extra Code for lookup ///////////////////////</strong></p>
  
  <p>For this I have applied a custom style:</p>
  
  <pre><code>&lt;phone:PhoneApplicationPage.Resources&gt;
          &lt;Style x:Key="customStyle" TargetType="controls:Panorama"&gt;
              &lt;Setter Property="ItemsPanel"&gt;
                  &lt;Setter.Value&gt;
                      &lt;ItemsPanelTemplate&gt;
                          &lt;controlsPrimitives:PanoramaPanel x:Name="panel"/&gt;
                      &lt;/ItemsPanelTemplate&gt;
                  &lt;/Setter.Value&gt;
              &lt;/Setter&gt;
              &lt;Setter Property="Foreground" Value="{StaticResource PhoneForegroundBrush}"/&gt;
              &lt;Setter Property="Background" Value="Transparent"/&gt;
              &lt;Setter Property="Template"&gt;
                  &lt;Setter.Value&gt;
                      &lt;ControlTemplate TargetType="controls:Panorama"&gt;
                          &lt;Grid&gt;
                              &lt;Grid.RowDefinitions&gt;
                                  &lt;RowDefinition Height="auto"/&gt;
                                  &lt;RowDefinition Height="*"/&gt;
                              &lt;/Grid.RowDefinitions&gt;
                              &lt;controlsPrimitives:PanningBackgroundLayer x:Name="BackgroundLayer" HorizontalAlignment="Left" Grid.RowSpan="2"&gt;
                                  &lt;Border x:Name="background" Background="{TemplateBinding Background}" CacheMode="BitmapCache"/&gt;
                              &lt;/controlsPrimitives:PanningBackgroundLayer&gt;
                              &lt;controlsPrimitives:PanningTitleLayer x:Name="TitleLayer" CacheMode="BitmapCache" ContentTemplate="{TemplateBinding TitleTemplate}" Content="{TemplateBinding Title}" FontSize="187" FontFamily="{StaticResource PhoneFontFamilyLight}" HorizontalAlignment="Left" Margin="10,-76,0,9" Grid.Row="0"/&gt;
                              &lt;controlsPrimitives:PanningLayer x:Name="ItemsLayer" HorizontalAlignment="Left" Grid.Row="1"&gt;
                                  &lt;ItemsPresenter x:Name="items"/&gt;
                              &lt;/controlsPrimitives:PanningLayer&gt;
                          &lt;/Grid&gt;
                      &lt;/ControlTemplate&gt;
                  &lt;/Setter.Value&gt;
              &lt;/Setter&gt;
          &lt;/Style&gt;
      &lt;/phone:PhoneApplicationPage.Resources&gt;
  </code></pre>