{"id":7065,"date":"2022-12-07T10:06:39","date_gmt":"2022-12-07T09:06:39","guid":{"rendered":"https:\/\/solidt.eu\/site\/?p=7065"},"modified":"2024-05-14T10:15:19","modified_gmt":"2024-05-14T09:15:19","slug":"devexpress-xaf-navigate","status":"publish","type":"post","link":"https:\/\/solidt.eu\/site\/devexpress-xaf-navigate\/","title":{"rendered":"DevExpress XAF Navigate"},"content":{"rendered":"\n<div style=\"height: 250px; position:relative; margin-bottom: 50px;\" class=\"wp-block-simple-code-block-ace\"><pre class=\"wp-block-simple-code-block-ace\" style=\"position:absolute;top:0;right:0;bottom:0;left:0\" data-mode=\"csharp\" data-theme=\"monokai\" data-fontsize=\"14\" data-lines=\"Infinity\" data-showlines=\"true\" data-copy=\"false\">public class ProductBrandListViewController : BasicViewController&lt;ListView>\n{\n    private void ShowDetailView(string viewName, XPLiteObject xpObject)\n    {\n        var objectSpace = (XPObjectSpace)Application.CreateObjectSpace();\n        var copiedObject = objectSpace.GetObject(xpObject);\n        var svpInternal = new ShowViewParameters\n        {\n            CreatedView = Application.CreateDetailView(objectSpace, viewName, true, copiedObject),\n            TargetWindow = TargetWindow.Default,\n            Context = TemplateContext.View,\n        };\n        ((DetailView)svpInternal.CreatedView).ViewEditMode = ViewEditMode.Edit;\n        Application.ShowViewStrategy.ShowView(svpInternal, new ShowViewSource(this.Frame, this.OpenRelatedProductAction));\n    }\n    \n    private void ShowDetailViewInNewWindow(string viewName, XPLiteObject xpObject)\n    {\n        var objectSpace = (XPObjectSpace)Application.CreateObjectSpace();\n        var svpInternal = new ShowViewParameters\n        {\n            CreatedView = Application.CreateDetailView(objectSpace, viewName, true, xpObject),\n            TargetWindow = TargetWindow.NewModalWindow,\n            Context = TemplateContext.View\n        };\n        ((DetailView)svpInternal.CreatedView).ViewEditMode = ViewEditMode.Edit;\n        Application.ShowViewStrategy.ShowView(svpInternal, new ShowViewSource(null, null));\n    }\n}\n\n\n\/\/ Example 2\nprivate void PopupCallIntakeShowAction_Execute(object sender, SimpleActionExecuteEventArgs e)\n{\n    IObjectSpace os = Application.CreateObjectSpace();\n    var detailView = Application.CreateDetailView(os, os.CreateObject&lt;CallIntake>());\n    detailView.Model.CustomizationEnabled = false;\n    var svp = new ShowViewParameters();\n    svp.CreatedView = detailView;\n    svp.TargetWindow = TargetWindow.NewModalWindow;\n    svp.CreateAllControllers = true;\n    svp.Context = TemplateContext.PopupWindow;\n    var svs = new ShowViewSource(null, null);\n    Application.ShowViewStrategy.ShowView(svp, svs);\n}\n\n<\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7065","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/posts\/7065","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/comments?post=7065"}],"version-history":[{"count":3,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/posts\/7065\/revisions"}],"predecessor-version":[{"id":8534,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/posts\/7065\/revisions\/8534"}],"wp:attachment":[{"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/media?parent=7065"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/categories?post=7065"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/tags?post=7065"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}