title: how do i set PageOrientation.Landscape in programmatically? Windows Phone 8 C#
body: <p>i want to put fullscreen icon bar to play video in full screen,</p>
  
  <p>for what i take application bar button :</p>
  
  <pre><code>private void BuildLocalizedApplicationBar()
          {
              // Set the page's ApplicationBar to a new instance of ApplicationBar.
              ApplicationBar = new ApplicationBar();
  
              // Create a new button and set the text value to the localized string from AppResources.
              ApplicationBarIconButton appBarButton = new ApplicationBarIconButton(new Uri("/images/AppbarIcon/wallpaper.png", UriKind.Relative));
              appBarButton.Text = "FullScreen";
              ApplicationBar.Buttons.Add(appBarButton);
              appBarButton.Click += appBarButton_Click;
          }
  </code></pre>
  
  <p>then i write click event to make it work : when we click, i want page as Landscape :, i am able to do using emulator right side button, <strong>but not able to do  via code :</strong></p>
  
  <pre><code>  void appBarButton_Click(object sender, EventArgs e)
              {
                  //SupportedOrientations = SupportedPageOrientation.Landscape;
                  this.Orientation = PageOrientation.Landscape;
              }
  </code></pre>
  
  <p>and when PageOrientation changed, i want to fire this event : it will be fire, when i doing from emulator right side button.</p>
  
  <pre><code>private void PhoneApplicationPage_OrientationChanged(object sender, OrientationChangedEventArgs e)
              {
                  if (e.Orientation == PageOrientation.Landscape ||
                      e.Orientation == PageOrientation.LandscapeLeft ||
                      e.Orientation == PageOrientation.LandscapeRight)
                  {
                      TitlePanel.Visibility = System.Windows.Visibility.Collapsed;
  
                      player.Height = Double.NaN;
                      player.Width = Double.NaN;
  
                      player.VerticalAlignment = System.Windows.VerticalAlignment.Stretch;
                      player.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;
  
                      SystemTray.IsVisible = false;
  
                  }
                  else
                  {
                      TitlePanel.Visibility = System.Windows.Visibility.Visible;
  
                      player.Height = Double.NaN;
                      player.Width = Double.NaN;
  
                      player.VerticalAlignment = System.Windows.VerticalAlignment.Stretch;
                      player.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;
  
                      SystemTray.IsVisible = true;
                  }
              }
  </code></pre>