I have created a WPF app that has navigation between two pages. I want a control(a groupbox) from one of the pages to be hidden by default and to be able to enable it when pressing a keycombo. Home1 is the name of the page and bgdb is the name of the groupbox. Home1_Loaded is hooked up to the page loading inside a frame in MainWindow
public void Home1_Loaded(object sender, RoutedEventArgs e)
{
bdgb.Visibility = Visibility.Collapsed;
}
What modifications need to be done so I can access bgdb from MainWindow class and unhide it via a keycombo (ex Ctrl+B) ? this is the code for mainwindow loading the homepage by default
private void Window_Initialized(object sender, EventArgs e)
{
Main.Content = new home();
Main.Navigate(new Uri("home.xaml", UriKind.RelativeOrAbsolute));
}