From 4264e1fcd3657022dd8a718d93d47484c877650f Mon Sep 17 00:00:00 2001 From: Christian Fiedler Date: Mon, 7 Oct 2013 19:00:41 +0200 Subject: [PATCH] nearly done --- .../Pages/Events/EventIndexPage.xaml | 14 ++++++++++++- .../Pages/Events/EventIndexPage.xaml.cs | 20 +++++++++++++++++++ .../CampusAppWP8/Pages/Events/EventPage.xaml | 6 +++--- .../Pages/Events/EventPage.xaml.cs | 2 +- .../Pages/News/NewsIndexPage.xaml | 10 +++++++++- .../Pages/News/NewsIndexPage.xaml.cs | 20 +++++++++++++++++++ .../CampusAppWP8/Pages/News/NewsPage.xaml | 6 +++--- .../CampusAppWP8/Pages/News/NewsPage.xaml.cs | 18 +++++++++++++++++ 8 files changed, 87 insertions(+), 9 deletions(-) diff --git a/CampusAppWP8/CampusAppWP8/Pages/Events/EventIndexPage.xaml b/CampusAppWP8/CampusAppWP8/Pages/Events/EventIndexPage.xaml index 0aac8c25..059d98f6 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Events/EventIndexPage.xaml +++ b/CampusAppWP8/CampusAppWP8/Pages/Events/EventIndexPage.xaml @@ -7,6 +7,7 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:lui="clr-namespace:CampusAppWP8.Utility.Lui.Button" + xmlns:header="clr-namespace:CampusAppWP8.Utility.Lui.Header" FontFamily="{StaticResource PhoneFontFamilyNormal}" FontSize="{StaticResource PhoneFontSizeNormal}" Foreground="{StaticResource PhoneForegroundBrush}" @@ -23,10 +24,13 @@ + + @@ -39,7 +43,15 @@ - + + + + + + + + + diff --git a/CampusAppWP8/CampusAppWP8/Pages/Events/EventIndexPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Events/EventIndexPage.xaml.cs index 73f8b349..b9ec7697 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Events/EventIndexPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/Events/EventIndexPage.xaml.cs @@ -125,6 +125,26 @@ namespace CampusAppWP8.Pages.Events base.OnNavigatedFrom(e); } + /// + /// Methods overrides the OnOrientationChanged-Method. + /// + /// orientation changed event args. + protected override void OnOrientationChanged(OrientationChangedEventArgs e) + { + if (e.Orientation == PageOrientation.Landscape + || e.Orientation == PageOrientation.LandscapeLeft + || e.Orientation == PageOrientation.LandscapeRight) + { + ApplicationBar.Mode = ApplicationBarMode.Default; + } + else + { + ApplicationBar.Mode = ApplicationBarMode.Minimized; + } + + base.OnOrientationChanged(e); + } + #endregion #region private diff --git a/CampusAppWP8/CampusAppWP8/Pages/Events/EventPage.xaml b/CampusAppWP8/CampusAppWP8/Pages/Events/EventPage.xaml index fbc0b384..b8d10f80 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Events/EventPage.xaml +++ b/CampusAppWP8/CampusAppWP8/Pages/Events/EventPage.xaml @@ -34,13 +34,13 @@ - + - + - + diff --git a/CampusAppWP8/CampusAppWP8/Pages/Events/EventPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Events/EventPage.xaml.cs index c2b20c99..e13fbe5c 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Events/EventPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/Events/EventPage.xaml.cs @@ -21,7 +21,7 @@ namespace CampusAppWP8.Pages.Events using CampusAppWPortalLib8.Model.RSS; /// - /// EventPage, where every event fees has his own PivotItem. + /// EventPage, where every event feed has his own PivotItem. /// public partial class EventPage : PhoneApplicationPage { diff --git a/CampusAppWP8/CampusAppWP8/Pages/News/NewsIndexPage.xaml b/CampusAppWP8/CampusAppWP8/Pages/News/NewsIndexPage.xaml index c2efe61e..dad5a881 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/News/NewsIndexPage.xaml +++ b/CampusAppWP8/CampusAppWP8/Pages/News/NewsIndexPage.xaml @@ -43,7 +43,15 @@ - + + + + + + + + + diff --git a/CampusAppWP8/CampusAppWP8/Pages/News/NewsIndexPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/News/NewsIndexPage.xaml.cs index 69814293..06b0ca9a 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/News/NewsIndexPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/News/NewsIndexPage.xaml.cs @@ -125,6 +125,26 @@ namespace CampusAppWP8.Pages.News #region private + /// + /// Methods overrides the OnOrientationChanged-Method. + /// + /// orientation changed event args. + protected override void OnOrientationChanged(OrientationChangedEventArgs e) + { + if (e.Orientation == PageOrientation.LandscapeRight + || e.Orientation == PageOrientation.LandscapeLeft + || e.Orientation == PageOrientation.Landscape) + { + ApplicationBar.Mode = ApplicationBarMode.Default; + } + else + { + ApplicationBar.Mode = ApplicationBarMode.Minimized; + } + + base.OnOrientationChanged(e); + } + /// /// Is called after the RSS feeds are loaded into the newsFeed model. /// If there was no feed information set to the UI, the feed list diff --git a/CampusAppWP8/CampusAppWP8/Pages/News/NewsPage.xaml b/CampusAppWP8/CampusAppWP8/Pages/News/NewsPage.xaml index 85e6faf4..281eaf5d 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/News/NewsPage.xaml +++ b/CampusAppWP8/CampusAppWP8/Pages/News/NewsPage.xaml @@ -33,13 +33,13 @@ - + - + - + diff --git a/CampusAppWP8/CampusAppWP8/Pages/News/NewsPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/News/NewsPage.xaml.cs index 1c5556d2..b0242c94 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/News/NewsPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/News/NewsPage.xaml.cs @@ -150,6 +150,24 @@ namespace CampusAppWP8.Pages.News } } + /* + protected override void OnOrientationChanged(OrientationChangedEventArgs e) + { + if (e.Orientation == PageOrientation.Landscape + || e.Orientation == PageOrientation.LandscapeLeft + || e.Orientation == PageOrientation.LandscapeRight) + { + ApplicationBar.Mode = ApplicationBarMode.Default; + } + else + { + ApplicationBar.Mode = ApplicationBarMode.Minimized; + } + + base.OnOrientationChanged(e); + } + */ + /// /// Called when the index of the selected PivotItem is changed. /// Set the text Grid to visible and the WebBrowser to collapsed.