private void TreeItem_CompaniesAdd_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e) { CompanyAddNew x = new CompanyAddNew(); UserPages.Children.Clear(); UserPages.Children.Add(x); }
private void PopUp_AddNewCompany(object sender, RoutedEventArgs e) { //Window win = new Window(); //ProductAddNew eDoc = new ProductAddNew(); //win.Content = eDoc; //win.Title = "Add Product"; //win.Width = 350; //win.Height = 450; //win.WindowStartupLocation = WindowStartupLocation.CenterScreen; //win.Show(); //ProductAddNew userControl1 = new ProductAddNew(); //this.InitializeComponent(); // UserControl win = new UserControl(); //CompanyAddNew eDoc = new CompanyAddNew(); //win.Content = eDoc; //win.Title = "Add Product"; //win.Width = 350; //win.Height = 450; //win.WindowStartupLocation = WindowStartupLocation.CenterScreen; //win.Show(); //CompanyList complist = new CompanyList(); TextBlock_TitleName.Visibility = Visibility.Collapsed; DataGrid.Visibility = Visibility.Collapsed; PopupBox.Visibility = Visibility.Collapsed; CompanyAddNew x = new CompanyAddNew(); UserPages.Children.Clear(); UserPages.Children.Add(x); PopupBoxWithClose.Visibility = Visibility.Visible; }
private void ButtonAddNewCompany_Click(object sender, RoutedEventArgs e) { this.topgrid.Visibility = Visibility.Collapsed; this.mainscrollviewer.Visibility = Visibility.Collapsed; CompanyAddNew x = new CompanyAddNew(); UserPages.Children.Clear(); UserPages.Children.Add(x); }