diff --git a/CampusAppWP8/CampusAppWP8/Pages/Events/EventPage.xaml b/CampusAppWP8/CampusAppWP8/Pages/Events/EventPage.xaml index 27d815f8..34ccfa0b 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Events/EventPage.xaml +++ b/CampusAppWP8/CampusAppWP8/Pages/Events/EventPage.xaml @@ -1,4 +1,4 @@ - - \ No newline at end of file + \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/Pages/Events/EventPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Events/EventPage.xaml.cs index c0fb6c68..f08e99b6 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Events/EventPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/Events/EventPage.xaml.cs @@ -25,7 +25,7 @@ namespace CampusAppWP8.Pages.Events /// /// EventPage, where every event feed has his own PivotItem. /// - public partial class EventPage : PhoneApplicationPage + public partial class EventPage : PortraitLandscapePage { #region Memeber @@ -90,11 +90,6 @@ namespace CampusAppWP8.Pages.Events { base.OnNavigatedTo(e); - if (this.Orientation.Equals(PageOrientation.Landscape) || this.Orientation.Equals(PageOrientation.LandscapeLeft) || this.Orientation.Equals(PageOrientation.LandscapeRight)) - { - ApplicationBar.Mode = Microsoft.Phone.Shell.ApplicationBarMode.Default; - } - this.DefHeader.ProgressVisibility = Visibility.Visible; if (this.isNewInstance) diff --git a/CampusAppWP8/CampusAppWP8/Pages/Exams/Exams.xaml b/CampusAppWP8/CampusAppWP8/Pages/Exams/Exams.xaml index dcb92263..255c15b9 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Exams/Exams.xaml +++ b/CampusAppWP8/CampusAppWP8/Pages/Exams/Exams.xaml @@ -1,4 +1,4 @@ - - \ No newline at end of file + \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/Pages/Exams/Exams.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Exams/Exams.xaml.cs index 3dfbda47..90241e14 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Exams/Exams.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/Exams/Exams.xaml.cs @@ -24,7 +24,7 @@ namespace CampusAppWP8.Pages.Exams /// class of ExamsPage. /// Stubbfel, 02.09.2013. /// - public partial class Exams : PhoneApplicationPage + public partial class Exams : PortraitLandscapePage { #region Member @@ -62,11 +62,6 @@ namespace CampusAppWP8.Pages.Exams { base.OnNavigatedTo(e); - if (this.Orientation.Equals(PageOrientation.Landscape) || this.Orientation.Equals(PageOrientation.LandscapeLeft) || this.Orientation.Equals(PageOrientation.LandscapeRight)) - { - ApplicationBar.Mode = Microsoft.Phone.Shell.ApplicationBarMode.Default; - } - if (this.feed == null) { this.InitializeFeed(); @@ -93,23 +88,6 @@ namespace CampusAppWP8.Pages.Exams } } - /// - /// On orientation changed. - /// - /// sender object - /// event args - protected override void OnOrientationChanged(OrientationChangedEventArgs e) - { - if (e.Orientation.Equals(PageOrientation.Landscape) || e.Orientation.Equals(PageOrientation.LandscapeLeft) || e.Orientation.Equals(PageOrientation.LandscapeRight)) - { - ApplicationBar.Mode = Microsoft.Phone.Shell.ApplicationBarMode.Default; - } - else - { - ApplicationBar.Mode = Microsoft.Phone.Shell.ApplicationBarMode.Minimized; - } - base.OnOrientationChanged(e); - } #endregion #region private diff --git a/CampusAppWP8/CampusAppWP8/Pages/Links/LinkPage.xaml b/CampusAppWP8/CampusAppWP8/Pages/Links/LinkPage.xaml index 72007c69..e0d44290 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Links/LinkPage.xaml +++ b/CampusAppWP8/CampusAppWP8/Pages/Links/LinkPage.xaml @@ -1,4 +1,4 @@ - @@ -79,4 +79,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/Pages/Links/LinkPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Links/LinkPage.xaml.cs index 0e3a5bac..558883df 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Links/LinkPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/Links/LinkPage.xaml.cs @@ -20,7 +20,7 @@ namespace CampusAppWP8.Pages.Links /// Class for the LinkPage. /// Stubbfel, 15.10.2013. /// - public partial class LinkPage : PhoneApplicationPage + public partial class LinkPage : PortraitLandscapePage { #region Members @@ -57,11 +57,6 @@ namespace CampusAppWP8.Pages.Links { base.OnNavigatedTo(e); - if (this.Orientation.Equals(PageOrientation.Landscape) || this.Orientation.Equals(PageOrientation.LandscapeLeft) || this.Orientation.Equals(PageOrientation.LandscapeRight)) - { - ApplicationBar.Mode = Microsoft.Phone.Shell.ApplicationBarMode.Default; - } - this.InitializeFeeds(); this.DefHeader.ProgressVisibility = Visibility.Visible; @@ -199,22 +194,6 @@ namespace CampusAppWP8.Pages.Links } } - /// Method handle OrientationPage. - /// Stubbfel, 15.10.2013. - /// Caller of the function. - /// some EventArgs. - private void PhoneApplicationPage_OrientationChanged(object sender, OrientationChangedEventArgs e) - { - if (this.Orientation == PageOrientation.LandscapeLeft || this.Orientation == PageOrientation.LandscapeRight) - { - ApplicationBar.Mode = Microsoft.Phone.Shell.ApplicationBarMode.Default; - } - else - { - ApplicationBar.Mode = Microsoft.Phone.Shell.ApplicationBarMode.Minimized; - } - } - #endregion #endregion diff --git a/CampusAppWP8/CampusAppWP8/Pages/Mensa/MensaPage.xaml b/CampusAppWP8/CampusAppWP8/Pages/Mensa/MensaPage.xaml index 07850aa1..f15fe48e 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Mensa/MensaPage.xaml +++ b/CampusAppWP8/CampusAppWP8/Pages/Mensa/MensaPage.xaml @@ -1,4 +1,4 @@ - @@ -82,4 +82,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/Pages/Mensa/MensaPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Mensa/MensaPage.xaml.cs index ac8acaec..9538c82e 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Mensa/MensaPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/Mensa/MensaPage.xaml.cs @@ -24,7 +24,7 @@ namespace CampusAppWP8.Pages.Mensa /// Class for the MensaPage. /// Stubbfel, 15.10.2013. /// - public partial class MensaPage : PhoneApplicationPage + public partial class MensaPage : PortraitLandscapePage { #region Members @@ -92,11 +92,6 @@ namespace CampusAppWP8.Pages.Mensa { base.OnNavigatedTo(e); - if (this.Orientation.Equals(PageOrientation.Landscape) || this.Orientation.Equals(PageOrientation.LandscapeLeft) || this.Orientation.Equals(PageOrientation.LandscapeRight)) - { - ApplicationBar.Mode = Microsoft.Phone.Shell.ApplicationBarMode.Default; - } - this.InitializeFeed(); } @@ -370,22 +365,6 @@ namespace CampusAppWP8.Pages.Mensa this.InitializeFeed(CampusAppWPortalLib8.Model.Settings.Campus.SFB_MAIN); } - /// Method handle OrientationPage. - /// Stubbfel, 15.10.2013. - /// Caller of the function. - /// some EventArgs. - private void PhoneApplicationPage_OrientationChanged(object sender, OrientationChangedEventArgs e) - { - if (this.Orientation == PageOrientation.LandscapeLeft || this.Orientation == PageOrientation.LandscapeRight) - { - ApplicationBar.Mode = Microsoft.Phone.Shell.ApplicationBarMode.Default; - } - else - { - ApplicationBar.Mode = Microsoft.Phone.Shell.ApplicationBarMode.Minimized; - } - } - /// Event handler. Called by MenuItem for click events. /// Stubbfel, 14.10.2013. /// button object. diff --git a/CampusAppWP8/CampusAppWP8/Pages/News/NewsIndexPage.xaml b/CampusAppWP8/CampusAppWP8/Pages/News/NewsIndexPage.xaml index e6d1517f..8102ef88 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/News/NewsIndexPage.xaml +++ b/CampusAppWP8/CampusAppWP8/Pages/News/NewsIndexPage.xaml @@ -1,4 +1,4 @@ - - \ No newline at end of file + \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/Pages/News/NewsIndexPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/News/NewsIndexPage.xaml.cs index 9939d43f..2a443de4 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/News/NewsIndexPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/News/NewsIndexPage.xaml.cs @@ -21,7 +21,7 @@ namespace CampusAppWP8.Pages.News /// /// Overview page of all news. /// - public partial class NewsIndexPage : PhoneApplicationPage + public partial class NewsIndexPage : PortraitLandscapePage { #region Member @@ -97,20 +97,6 @@ namespace CampusAppWP8.Pages.News #region protected - /// - /// On navigation to this page, creates a FeedEventHandler and load the RSS feed data. - /// - /// event args - protected override void OnNavigatedTo(NavigationEventArgs e) - { - base.OnNavigatedTo(e); - - if (this.Orientation.Equals(PageOrientation.Landscape) || this.Orientation.Equals(PageOrientation.LandscapeLeft) || this.Orientation.Equals(PageOrientation.LandscapeRight)) - { - ApplicationBar.Mode = Microsoft.Phone.Shell.ApplicationBarMode.Default; - } - } - /// /// Methods overrides the OnNavigatedFrom-Method /// @@ -130,26 +116,6 @@ 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 797ae08c..855ec90d 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/News/NewsPage.xaml +++ b/CampusAppWP8/CampusAppWP8/Pages/News/NewsPage.xaml @@ -1,4 +1,4 @@ - - + diff --git a/CampusAppWP8/CampusAppWP8/Pages/News/NewsPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/News/NewsPage.xaml.cs index b677cbe6..83100fba 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/News/NewsPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/News/NewsPage.xaml.cs @@ -23,7 +23,7 @@ namespace CampusAppWP8.Pages.News /// /// EventPage, where every news fees has his own PivotItem. /// - public partial class NewsPage : PhoneApplicationPage + public partial class NewsPage : PortraitLandscapePage { /// /// for checking if the feed source is already set or not. @@ -76,11 +76,6 @@ namespace CampusAppWP8.Pages.News { base.OnNavigatedTo(e); - if (this.Orientation.Equals(PageOrientation.Landscape) || this.Orientation.Equals(PageOrientation.LandscapeLeft) || this.Orientation.Equals(PageOrientation.LandscapeRight)) - { - ApplicationBar.Mode = Microsoft.Phone.Shell.ApplicationBarMode.Default; - } - this.DefHeader.ProgressVisibility = Visibility.Visible; if (this.isNewInstance) @@ -151,24 +146,6 @@ 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. diff --git a/CampusAppWP8/CampusAppWP8/Pages/Openinghours/OpeninghoursPage.xaml b/CampusAppWP8/CampusAppWP8/Pages/Openinghours/OpeninghoursPage.xaml index 67c5df8f..672f1be3 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Openinghours/OpeninghoursPage.xaml +++ b/CampusAppWP8/CampusAppWP8/Pages/Openinghours/OpeninghoursPage.xaml @@ -1,4 +1,4 @@ - - \ No newline at end of file + \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/Pages/Openinghours/OpeninghoursPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Openinghours/OpeninghoursPage.xaml.cs index 66aa0e24..68775ab2 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Openinghours/OpeninghoursPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/Openinghours/OpeninghoursPage.xaml.cs @@ -20,7 +20,7 @@ namespace CampusAppWP8.Pages.Openinghours /// /// Opening hours page. /// - public partial class OpeninghoursPage : PhoneApplicationPage + public partial class OpeninghoursPage : PortraitLandscapePage { #region Members @@ -72,11 +72,6 @@ namespace CampusAppWP8.Pages.Openinghours { base.OnNavigatedTo(e); - if (this.Orientation.Equals(PageOrientation.Landscape) || this.Orientation.Equals(PageOrientation.LandscapeLeft) || this.Orientation.Equals(PageOrientation.LandscapeRight)) - { - ApplicationBar.Mode = Microsoft.Phone.Shell.ApplicationBarMode.Default; - } - if (this.isNewInstance) { if ((this.feed == null) || (this.feed.Model == null)) @@ -113,26 +108,6 @@ namespace CampusAppWP8.Pages.Openinghours } - /// - /// Override 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 = Microsoft.Phone.Shell.ApplicationBarMode.Default; - } - else - { - ApplicationBar.Mode = Microsoft.Phone.Shell.ApplicationBarMode.Minimized; - } - - base.OnOrientationChanged(e); - } - // protected #endregion diff --git a/CampusAppWP8/CampusAppWP8/Pages/PlaceNews/PlaceNews.xaml b/CampusAppWP8/CampusAppWP8/Pages/PlaceNews/PlaceNews.xaml index cf5ae132..c5cd9bdc 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/PlaceNews/PlaceNews.xaml +++ b/CampusAppWP8/CampusAppWP8/Pages/PlaceNews/PlaceNews.xaml @@ -1,4 +1,4 @@ - - \ No newline at end of file + \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/Pages/PlaceNews/PlaceNews.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/PlaceNews/PlaceNews.xaml.cs index 5ef73703..d0d1d672 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/PlaceNews/PlaceNews.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/PlaceNews/PlaceNews.xaml.cs @@ -29,7 +29,7 @@ namespace CampusAppWP8.Pages.PlaceNews /// Place news. /// Stubbfel, 09.09.2013. /// - public partial class PlaceNews : PhoneApplicationPage + public partial class PlaceNews : PortraitLandscapePage { #region Member diff --git a/CampusAppWP8/CampusAppWP8/Pages/StartPage.xaml b/CampusAppWP8/CampusAppWP8/Pages/StartPage.xaml index c92da838..a022cd2e 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/StartPage.xaml +++ b/CampusAppWP8/CampusAppWP8/Pages/StartPage.xaml @@ -1,4 +1,4 @@ - - \ No newline at end of file + \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/Pages/StartPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/StartPage.xaml.cs index 80f8532a..bed4dfcf 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/StartPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/StartPage.xaml.cs @@ -29,7 +29,7 @@ namespace CampusAppWP8.Pages /// Class for the StartPage. /// Stubbfel, 15.10.2013. /// - public partial class StartPage : PhoneApplicationPage + public partial class StartPage : PortraitLandscapePage { #region Member diff --git a/CampusAppWP8/CampusAppWP8/Pages/StudentCouncil/StudentCouncilPage.xaml b/CampusAppWP8/CampusAppWP8/Pages/StudentCouncil/StudentCouncilPage.xaml index 25db516a..a731c3fc 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/StudentCouncil/StudentCouncilPage.xaml +++ b/CampusAppWP8/CampusAppWP8/Pages/StudentCouncil/StudentCouncilPage.xaml @@ -1,4 +1,4 @@ - - \ No newline at end of file + \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/Pages/StudentCouncil/StudentCouncilPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/StudentCouncil/StudentCouncilPage.xaml.cs index 81615043..5be5c0f6 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/StudentCouncil/StudentCouncilPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/StudentCouncil/StudentCouncilPage.xaml.cs @@ -20,7 +20,7 @@ namespace CampusAppWP8.Pages.StudentCouncil /// Class for the StudentCouncilPage. /// Stubbfel, 15.10.2013. /// - public partial class StudentCouncilPage : PhoneApplicationPage + public partial class StudentCouncilPage : PortraitLandscapePage { #region Members @@ -52,11 +52,6 @@ namespace CampusAppWP8.Pages.StudentCouncil { base.OnNavigatedTo(e); - if (this.Orientation.Equals(PageOrientation.Landscape) || this.Orientation.Equals(PageOrientation.LandscapeLeft) || this.Orientation.Equals(PageOrientation.LandscapeRight)) - { - ApplicationBar.Mode = Microsoft.Phone.Shell.ApplicationBarMode.Default; - } - if (this.feed == null) { this.InitializeFeed(); @@ -74,25 +69,6 @@ namespace CampusAppWP8.Pages.StudentCouncil this.feed.SaveData(); } - /// Override the OnOrientationChanged method. - /// Stubbfel, 15.10.2013. - /// - protected override void OnOrientationChanged(OrientationChangedEventArgs e) - { - if (e.Orientation == PageOrientation.Landscape - || e.Orientation == PageOrientation.LandscapeLeft - || e.Orientation == PageOrientation.LandscapeRight) - { - ApplicationBar.Mode = Microsoft.Phone.Shell.ApplicationBarMode.Default; - } - else - { - ApplicationBar.Mode = Microsoft.Phone.Shell.ApplicationBarMode.Minimized; - } - - base.OnOrientationChanged(e); - } - #endregion #region private