protected override void AfterShellCreated() { base.AfterShellCreated(); RootWorkItem.Items.Add(Shell.ContentWorkspace, WorkspaceNames.ShellContentWorkspace); RootWorkItem.Items.Add(Shell.NavBarWorkspace, WorkspaceNames.ShellNavBarWorkspace); var modalWorkSpace = new XtraWindowWorkspace(Shell); RootWorkItem.Items.Add(new XtraWindowWorkspace(Shell), WorkspaceNames.ModalWindows); RootWorkItem.Items.Add(new RibbonWindowWorkspace(Shell), WorkspaceNames.RibbonWindows); RootWorkItem.UIExtensionSites.RegisterSite(ExtensionSiteNames.ShellNavBar, Shell.NavBarWorkspace); RootWorkItem.UIExtensionSites.RegisterSite(ExtensionSiteNames.Ribbon, Shell.Ribbon); RootWorkItem.UIExtensionSites.RegisterSite(ExtensionSiteNames.RibbonStatusBar, Shell.StatusBar); InitRibbonGroup(); }
public void OnUniframeworkSetting(object sender, EventArgs e) { SettingView view = WorkItem.SmartParts.Get <SettingView>(SmartPartNames.SmartPart_Shell_SettingView); if (view == null) { view = WorkItem.SmartParts.AddNew <SettingView>(SmartPartNames.SmartPart_Shell_SettingView); } XtraWindowSmartPartInfo spi = new XtraWindowSmartPartInfo { Title = "选项", MaximizeBox = false, MinimizeBox = false, StartPosition = FormStartPosition.CenterParent, FormBorderStyle = FormBorderStyle.FixedDialog, Modal = true, Icon = ImageService.GetIcon("preferences", new System.Drawing.Size(16, 16)) }; IWorkspace wp = new XtraWindowWorkspace(); wp.Show(view, spi); }
/// <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); }
public void OnUniframeworkSetting(object sender, EventArgs e) { SettingView view = WorkItem.SmartParts.Get<SettingView>(SmartPartNames.SmartPart_Shell_SettingView); if (view == null) view = WorkItem.SmartParts.AddNew<SettingView>(SmartPartNames.SmartPart_Shell_SettingView); XtraWindowSmartPartInfo spi = new XtraWindowSmartPartInfo { Title = "选项", MaximizeBox = false, MinimizeBox = false, StartPosition = FormStartPosition.CenterParent, FormBorderStyle = FormBorderStyle.FixedDialog, Modal = true, Icon = ImageService.GetIcon("preferences", new System.Drawing.Size(16, 16)) }; IWorkspace wp = new XtraWindowWorkspace(); wp.Show(view, spi); }