private void btnAppointment_Click(object sender, RoutedEventArgs e) { UIPanel.Children.Clear(); FormAppointment inputGrid = new FormAppointment(); UIPanel.Children.Add(inputGrid); }