private void ControlDisposed(object sender, EventArgs e) { Control control = sender as Control; if (control != null && SmartParts.Contains(sender)) { CloseInternal(control); } }
private void ControlDisposed(object sender, EventArgs e) { Control control = sender as Control; if (control != null && SmartParts.Contains(sender)) { CloseInternal(control); dockPanels[control].Close(); dockPanels.Remove(control); } }
/// <summary> /// Usage sample for the CABDevExpress.Extension Kit XtraWindowWorkspace and XtraWindowSmartPartInfo /// the example shows an 'About Dialog' /// </summary> private void ShowHelpAbout() { if (!SmartParts.Contains(SmartPartNames.HelpAbout)) { SmartParts.AddNew <AboutBankTellerView>(SmartPartNames.HelpAbout); } var smartPartInfo = new XtraWindowSmartPartInfo { Modal = true, StartPosition = FormStartPosition.CenterParent, FormBorderStyle = FormBorderStyle.FixedDialog, MinimizeBox = false, MaximizeBox = false, Height = 150, Width = 350, Title = "About" }; // the two properties added by CABDevExpress.ExtensionKit's XtraWindowSmartPartInfo var xtraWindow = new XtraWindowWorkspace(); xtraWindow.Show(SmartParts[SmartPartNames.HelpAbout], smartPartInfo); }