private void navBar_musteritanim_Click(object sender, EventArgs e) { ExceptionCatcher.ExceptionFinder(() => { RibbonPageGroup_Home.IsEnabled = true; CusUC = new CustomerUserControl(); DXTabItem tabItem = new DXTabItem() { Header = navBar_musteritanim.Content, Content = CusUC, AllowHide = DevExpress.Utils.DefaultBoolean.True, IsSelected = true }; foreach (DXTabItem item in TabControlMain.Items) { if (item.Header == navBar_musteritanim.Content) { TabControlMain.RemoveTabItem(item); break; } } TabControlMain.Items.Add(tabItem); }); }
private void customerButton_Click(object sender, EventArgs e) { sideBarPanel.Height = customerButton.Height; sideBarPanel.Top = customerButton.Top; CustomerUserControl customerUserControl = new CustomerUserControl(); ShowControl(customerUserControl); }