
{"id":291,"date":"2009-09-13T19:04:36","date_gmt":"2009-09-13T23:04:36","guid":{"rendered":"http:\/\/www.ikriv.com\/blog\/?p=291"},"modified":"2009-09-13T19:04:36","modified_gmt":"2009-09-13T23:04:36","slug":"wpf-making-objects-invisible","status":"publish","type":"post","link":"https:\/\/ikriv.com\/blog\/?p=291","title":{"rendered":"WPF: Making Objects Invisible"},"content":{"rendered":"<p>This is not as easy as it might have been. There is no <b>Visible<\/b> property on <b>ModelVisual3D<\/b> or <b>GeometryModel3D<\/b>. Approaches considered in <a href=\"http:\/\/social.msdn.microsoft.com\/Forums\/en-US\/wpf\/thread\/6d7da6bb-3b97-4e2f-9e55-f3128ceef69b\">this discussion on the Microsoft site<\/a> include making material brushes transparent or having a transform on the object moving it out of the way.<\/p>\n<p>Fiddling with brushes leads to problems. First, base Material class does not expose the Brush property, so you must hunt for a concrete material such as DiffuseMaterial to get the actual brush. Second, the poster reports issues with objects other than the intended object getting partially invisible, etc.<\/p>\n<p>The approach with transforms &#8220;to nowhere&#8221; seems more attractive, but it kinda reminds me of the days when people put windows at &#8220;large&#8221; negative coordinates (say -1000,-1000) to make them &#8220;invisible&#8221;. It worked fine for a while, but turned out quite ugly when 1200&#215;1024 double-monitor setups became common. If you make your right monitor a primary, the left monitor gets negative coordinates, and you suddenly see all those windows crowded in the bottom of your screen.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is not as easy as it might have been. There is no Visible property on ModelVisual3D or GeometryModel3D. Approaches considered in this discussion on the Microsoft site include making <a href=\"https:\/\/ikriv.com\/blog\/?p=291\" class=\"more-link\">[&hellip;]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"Layout":"","footnotes":""},"categories":[12],"tags":[],"class_list":["entry","author-ikriv","post-291","post","type-post","status-publish","format-standard","category-wpf"],"_links":{"self":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/291","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=291"}],"version-history":[{"count":0,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/291\/revisions"}],"wp:attachment":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=291"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=291"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=291"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}