private void ListBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { ListBox scenarioListBox = sender as ListBox; ZNavigationItem s = scenarioListBox.SelectedItem as ZNavigationItem; if (s != null) { _navigate(s, null); } }
private void _navigate(ZNavigationItem s, object args = null) { if (SuspensionManager.SessionState.ContainsKey("Next")) { SuspensionManager.SessionState["Prev"] = SuspensionManager.SessionState["Next"]; } SuspensionManager.SessionState["Next"] = scenarioListBox.SelectedIndex; ScenarioFrame.Navigate(s.ClassType, args); checkAdditionButtons(); }
public void checkAdditionButtons() { ZNavigationItem frameToNavItem = _frameToNavigationItem(); backButton.Visibility = (ScenarioFrame.CanGoBack) ? Visibility.Visible : Visibility.Collapsed; refreshButton.Visibility = ((new string[] { "Start", "Autoren", "Zitate", "Thema", "Sammlung" }).Contains(frameToNavItem.Title)) ? Visibility.Visible : Visibility.Collapsed; if (scenarioListBox.Items.Contains(frameToNavItem)) { scenarioListBox.SelectedItem = frameToNavItem; } }
private void searchButton_Click(object sender, RoutedEventArgs e) { ZNavigationItem s = searchCombobox.SelectedItem as ZNavigationItem; if (s != null) { ZNavigationArgs args = new ZNavigationArgs() { SearchValue = searchBox.Text, Refresh = true }; _navigate(s, args); } }
private void refresh_click(object sender, RoutedEventArgs e) { ZNavigationItem navItem = _frameToNavigationItem(); ZNavigationArgs args = new ZNavigationArgs() { SearchValue = SearchValue, Refresh = true }; if (navItem.ClassType != null) { _navigate(navItem, args); } }