public void Doodgaanscherm() { MenuUserControl muc = new MenuUserControl(); this.rootLayout.Children.Clear(); this.rootLayout.Children.Add(muc); muc.Focusable = true; //this.KeyDown += new KeyEventHandler(buc.UserControl_KeyDown); // Stuurt de keydown event van de window door naar de keydown event van de usercontrol. muc.Focus(); }
private void Window_Loaded(object sender, RoutedEventArgs e) { MenuUserControl muc = new MenuUserControl(); this.rootLayout.Children.Clear(); this.rootLayout.Children.Add(muc); }