{"id":1480,"date":"2014-02-21T22:17:27","date_gmt":"2014-02-21T22:17:27","guid":{"rendered":"http:\/\/putridparrot.com\/blog\/?p=1480"},"modified":"2014-02-21T22:18:20","modified_gmt":"2014-02-21T22:18:20","slug":"mahapps-wheres-the-drop-shadow","status":"publish","type":"post","link":"https:\/\/putridparrot.com\/blog\/mahapps-wheres-the-drop-shadow\/","title":{"rendered":"MahApps, where&#8217;s the drop shadow ?"},"content":{"rendered":"<p>In the MahApps Metro UI, specifically the MetroWindow we can turn the drop shadow on using the following. In code&#8230;<\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\r\nBorderlessWindowBehavior b = new BorderlessWindowBehavior\r\n{\r\n   EnableDWMDropShadow = true,\r\n   AllowsTransparency = false\r\n};\r\n\r\nBehaviorCollection bc = Interaction.GetBehaviors(window);\r\nbc.Add(b);\r\n<\/pre>\n<p><em>Note: We <strong>must<\/strong> set the Allow Transparency to false to use the EnableDWMDropShadow.<\/em><\/p>\n<p>In XAML, we can use the following<\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\r\n&lt;i:Interaction.Behaviors&gt;\r\n   &lt;behaviours:BorderlessWindowBehavior \r\n      AllowsTransparency=&quot;False&quot; \r\n      EnableDWMDropShadow=&quot;True&quot; \/&gt;\r\n&lt;\/i:Interaction.Behaviors&gt;\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>In the MahApps Metro UI, specifically the MetroWindow we can turn the drop shadow on using the following. In code&#8230; BorderlessWindowBehavior b = new BorderlessWindowBehavior { EnableDWMDropShadow = true, AllowsTransparency = false }; BehaviorCollection bc = Interaction.GetBehaviors(window); bc.Add(b); Note: We must set the Allow Transparency to false to use the EnableDWMDropShadow. In XAML, we can [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[65],"tags":[],"class_list":["post-1480","post","type-post","status-publish","format-standard","hentry","category-mahapps"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts\/1480","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/comments?post=1480"}],"version-history":[{"count":7,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts\/1480\/revisions"}],"predecessor-version":[{"id":1487,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts\/1480\/revisions\/1487"}],"wp:attachment":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/media?parent=1480"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/categories?post=1480"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/tags?post=1480"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}