Status | ID | Priority | Type |
Closed | 39702 | Major | Question |
Profile | Reply |
James TimoClient | I have setup a new solution but can't get the dockpanel to show its view Attached files: |
User | Description | Posted On |
MariyaVoytovichAgent | Hello! To show Dock Panel in your application, you need to create a new class to Windows Forms Module Project, inherit it from DetailViewForm and implement IDockManagerHolder interface. Feel free to contact us if you have any questions. Regards, | |
James TimoClient | I changed to SDI and empty.I think nonpersistent objects cannot be opened in dock panels. | |
MariyaVoytovichAgent | Hello! Dock Panels Xafari use the DexExpress Dock Panels for their work. I added such a template(TabbedMDIDetailViewForm) to your application and the dock panel was displayed for the non-persistent object. See attached Project. Regards, Attached files: | |
James TimoClient | Sample doesn't work. | |
MariyaVoytovichAgent | Can you give me more information? Regards, | |
James TimoClient | I checked the controller. | |
James TimoClient | Use case: | |
MariyaVoytovichAgent | Hello! XPObjectSpace is created by default, because when the panel is created the type object is not considered. If you need create Object Space that supports a specific object type, you can create your own Detail View with the desired Object Space. To do this, you need to subscribe to the CustomCreateView event of the XafariDockingWindowController. In the event handler, you need to create a Detail View. public class CustomizeDockPanelsViewViewController : ViewController { private const string DockPanelAllowEditKey = "DockPanel AllowEdit"; private XafariDockingWindowController _dockingController; protected override void OnActivated() { base.OnActivated(); if ((this._dockingController = this.Frame.GetController<XafariDockingWindowController>()) != null) { this._dockingController.CustomCreateView += this._dockingController_CustomCreateView; } } private void _dockingController_CustomCreateView(object sender, CustomCreateViewEventArgs e) { var dockPanelItem = e.DockPanelItem; if (dockPanelItem.Model.View is IModelDetailView detailViewModel) { var objectSpace = this.Application.CreateObjectSpace(detailViewModel.ModelClass.TypeInfo.Type); var detailView = this.Application.CreateDetailView(objectSpace, detailViewModel, true); detailView.AllowEdit[DockPanelAllowEditKey] = dockPanelItem.Model.AllowEdit; e.View = detailView; } } protected override void OnDeactivated() { if (this._dockingController != null) this._dockingController.CustomCreateView -= this._dockingController_CustomCreateView; base.OnDeactivated(); } } Regards, | |
James TimoClient | Great!!! |