private void Window_KeyDown(object sender, KeyEventArgs e) { if (e.Key == Key.F3) { txtSearch.Visibility = (txtSearch.Visibility == Visibility.Visible ? Visibility.Collapsed : Visibility.Visible); if (txtSearch.Visibility == System.Windows.Visibility.Visible) { txtSearch.Focus(); } } if (e.Key == Key.F5) { if (PoeSorter.SelectedTab != null && PoeSorter.SelectedTab.Items != null) { PoeSorter.SelectedTab.Items.ForEach(c => { if (PoeSorter.ItemCanvas.Children.Contains(c.Image)) { PoeSorter.ItemCanvas.Children.Remove(c.Image); } }); PoeSorter.SelectedTab.Items = null; PoeSorter.SetSelectedTab(PoeSorter.SelectedTab); // trigger download } } }
private void StashTabs_SelectionChanged(object sender, SelectionChangedEventArgs e) { PoeSorter.SetSelectedTab((Tab)StashTabs.SelectedItem); }