public UCCourses(TutorsViewModel tvm) { InitializeComponent(); this.tvm = tvm; ucCourseDetails = new UCCourseDetails(tvm); ucNewCourseDetails = new UCNewCourseDetails(tvm); }
private void btnNewTutor_Click(object sender, RoutedEventArgs e) { splDetails.Children.Clear(); UCNewCourseDetails ucNewCourseDetails = new UCNewCourseDetails(tvm); splDetails.Children.Add(ucNewCourseDetails); if (tvm.SlideInEnabled) { Storyboard sb = this.FindResource("SlideIn") as Storyboard; Storyboard.SetTarget(sb, this.ucNewCourseDetails); sb.Begin(); tvm.SlideInEnabled = false; } }