internal void allPermitsApproved(MdiContainer container) { ApprovedPermitsView approvedPermits = new ApprovedPermitsView(container); approvedPermits.DataContext = new ApprovedPermitsViewModel(_dataService); container.Children.Clear(); container.Children.Add(new MdiChild() { //Title = " User Registration", Height = (System.Windows.SystemParameters.PrimaryScreenHeight - 15), Width = (System.Windows.SystemParameters.PrimaryScreenWidth - 15), Style = null, //Here UserRegistration is the class that you have created for mainWindow.xaml user control. Content = approvedPermits }); }
private void ApprovedPermits_Click(object sender, RoutedEventArgs e) { ChangeMenuColor(sender); ApprovedPermitsView allPermits = new ApprovedPermitsView(MainMdiContainer); allPermits.DataContext = new ApprovedPermitsViewModel(_dataService); MainMdiContainer.Children.Clear(); MainMdiContainer.Children.Add(new MdiChild() { //Title = " User Registration", Height = (System.Windows.SystemParameters.PrimaryScreenHeight - 15), Width = (System.Windows.SystemParameters.PrimaryScreenWidth - 15), Style = null, //Here UserRegistration is the class that you have created for mainWindow.xaml user control. Content = allPermits }); }