{"id":150,"date":"2014-11-21T18:36:35","date_gmt":"2014-11-21T17:36:35","guid":{"rendered":"http:\/\/www.riedmann.it\/blog\/?p=150"},"modified":"2014-11-21T18:36:35","modified_gmt":"2014-11-21T17:36:35","slug":"the-vo-way-of-programming-does-not-work-with-wpf","status":"publish","type":"post","link":"https:\/\/blog.riedmann.it\/?p=150","title":{"rendered":"The &#8220;VO-way&#8221; of programming does not work with WPF"},"content":{"rendered":"<p>Today unfortunately I discovered that the &#8220;VO-way&#8221; of developing Windows applications does not work with WPF.<\/p>\n<p>In VO, we used to paint a window in a separate application module, and to not write any code in this generated class. The hand written code was placed instead in a separate module, and in a subclass of the generated window. This separated first written code from generated one, and secondly it was easier to manage.<\/p>\n<p>Unfortunately, WPF does not support such a (IMHO clean) style of programming, as XAML windows cannot be inherited.<\/p>\n<p>I have found a document on MSDN on this subject:<\/p>\n<p><a href=\"https:\/\/social.msdn.microsoft.com\/Forums\/vstudio\/en-US\/4f0cd7e3-65fa-4d2a-b29f-492e4209641c\/make-a-custom-window-inherit-from-window?forum=wpf\" title=\"https:\/\/social.msdn.microsoft.com\/Forums\/vstudio\/en-US\/4f0cd7e3-65fa-4d2a-b29f-492e4209641c\/make-a-custom-window-inherit-from-window?forum=wpf\" target=\"_blank\">MSDN:make a custom windows inherit from window<\/a><\/p>\n<p>and it seems the way of using UserControls is the only remaining possibility to reuse paintend windows.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today unfortunately I discovered that the &#8220;VO-way&#8221; of developing Windows applications does not work with WPF. In VO, we used to paint a window in a separate application module, and to not write any code in this generated class. The hand written code was placed instead in a separate module, and in a subclass of [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-150","post","type-post","status-publish","format-standard","hentry","category-vulcan-net-programming"],"_links":{"self":[{"href":"https:\/\/blog.riedmann.it\/index.php?rest_route=\/wp\/v2\/posts\/150","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.riedmann.it\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.riedmann.it\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.riedmann.it\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.riedmann.it\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=150"}],"version-history":[{"count":1,"href":"https:\/\/blog.riedmann.it\/index.php?rest_route=\/wp\/v2\/posts\/150\/revisions"}],"predecessor-version":[{"id":151,"href":"https:\/\/blog.riedmann.it\/index.php?rest_route=\/wp\/v2\/posts\/150\/revisions\/151"}],"wp:attachment":[{"href":"https:\/\/blog.riedmann.it\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=150"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.riedmann.it\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=150"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.riedmann.it\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=150"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}