
{"id":269,"date":"2009-08-31T17:37:10","date_gmt":"2009-08-31T21:37:10","guid":{"rendered":"http:\/\/www.ikriv.com\/blog\/?p=269"},"modified":"2009-08-31T17:37:10","modified_gmt":"2009-08-31T21:37:10","slug":"fancy-borders","status":"publish","type":"post","link":"https:\/\/ikriv.com\/blog\/?p=269","title":{"rendered":"Fancy Borders"},"content":{"rendered":"<p>I was trying to draw a &#8220;raised&#8221; border around my control, something resembling a 3D window border in Windows. I.e. something like white on the outside, gray in the middle, black on the inside (or something like that). I ran into quite a few difficulties. My discoveries so far:<\/p>\n<ul>\n<li>If you use a gradient brush as the border background, it will not think they way you expect: see <a href=\"http:\/\/www.charlespetzold.com\/blog\/2009\/02\/Graphical-Paths-with-Gradient-Colors.html\">Charles Petzold&#8217;s post on gradient brushes<\/a><\/li>\n<li>While you can make things like &lt;Rectangle&gt; or &lt;Ellipse&gt; to have a width of &#8220;Auto&#8221; (which might mean &#8220;fill the whole parent&#8221;), corresponding geometries like &lt;EllipseGeometry&gt;must have absolute widths.<\/li>\n<li>I could not find a way to create in XAML a geometry that would be stretchable with the parent control, even using control templates. I am sure it is possible in code.<\/li>\n<li>I probably spent too much time trying to draw a fancy border around my control. \ud83d\ude42<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>I was trying to draw a &#8220;raised&#8221; border around my control, something resembling a 3D window border in Windows. I.e. something like white on the outside, gray in the middle, <a href=\"https:\/\/ikriv.com\/blog\/?p=269\" 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-269","post","type-post","status-publish","format-standard","category-wpf"],"_links":{"self":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/269","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=269"}],"version-history":[{"count":0,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/269\/revisions"}],"wp:attachment":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=269"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=269"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=269"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}