From 9cedca70ea6e148f9b0856f8e71e0eb973cca409 Mon Sep 17 00:00:00 2001 From: AOIDUO <30717258+UniverseObserver@users.noreply.github.com> Date: Wed, 12 Sep 2018 18:31:28 +0800 Subject: [PATCH] NEW: filter button --- SchoolPower/Views/AssignmentsPage.xaml | 7 +++++++ SchoolPower/Views/SubjectsAssignmentsPage.xaml | 4 ++++ SchoolPower/Views/SubjectsAssignmentsPage.xaml.cs | 7 +++++++ 3 files changed, 18 insertions(+) diff --git a/SchoolPower/Views/AssignmentsPage.xaml b/SchoolPower/Views/AssignmentsPage.xaml index 7bc5f3a..5f936aa 100644 --- a/SchoolPower/Views/AssignmentsPage.xaml +++ b/SchoolPower/Views/AssignmentsPage.xaml @@ -94,6 +94,13 @@ + + + + + = 0) { GoToDetailButton.Visibility = Visibility.Visible; EditButton.Visibility = Visibility.Visible; + Filter.Visibility = Visibility.Visible; } else if (AdaptiveStates.CurrentState == Normal) { GoToDetailButton.Visibility = Visibility.Collapsed; EditButton.Visibility = Visibility.Collapsed; + Filter.Visibility = Visibility.Collapsed; } else if (AdaptiveStates.CurrentState == Narrow && SubjectsListView.SelectedIndex == -1) { GoToDetailButton.Visibility = Visibility.Collapsed; EditButton.Visibility = Visibility.Collapsed; + Filter.Visibility = Visibility.Collapsed; } } @@ -241,6 +245,7 @@ private void SubjectsListView_SelectionChanged(object sender, SelectionChangedEv if (AdaptiveStates.CurrentState == Normal) { AssignmentsFrame.Navigate(typeof(AssignmentsPage), StudentData.SelectedSubjectName); EditButton.Visibility = Visibility.Visible; + Filter.Visibility = Visibility.Visible; } // narrow -> show button @@ -259,10 +264,12 @@ private void AdaptiveStatesChanged(object sender, VisualStateChangedEventArgs e) if (AdaptiveStates.CurrentState == Narrow && SubjectsListView.SelectedIndex >= 0) { GoToDetailButton.Visibility = Visibility.Visible; EditButton.Visibility = Visibility.Collapsed; + Filter.Visibility = Visibility.Collapsed; } else if (AdaptiveStates.CurrentState == Normal && SubjectsListView.SelectedIndex >= 0) { AssignmentsFrame.Navigate(typeof(AssignmentsPage), subjects[SubjectsListView.SelectedIndex].Name); GoToDetailButton.Visibility = Visibility.Collapsed; EditButton.Visibility = Visibility.Visible; + Filter.Visibility = Visibility.Visible; } }