public static void Show(object p_dataContext) { UserControl control = new StudentUserControl(); if (control != null) { Window wnd = new Window(); control.DataContext = p_dataContext; StackPanel sp = new StackPanel(); sp.Children.Add(control); wnd.Content = sp; wnd.Show(); } }
public PageStudent() { InitializeComponent(); this.StudentUserControl = this.ucStudentUserControl; this.studentViewModel = new StudentViewModel(this); }