
{"id":200,"date":"2009-08-11T11:54:40","date_gmt":"2009-08-11T15:54:40","guid":{"rendered":"http:\/\/www.ikriv.com\/blog\/?p=200"},"modified":"2009-08-11T11:54:40","modified_gmt":"2009-08-11T15:54:40","slug":"wpf-selecting-a-background-image","status":"publish","type":"post","link":"https:\/\/ikriv.com\/blog\/?p=200","title":{"rendered":"WPF: Selecting a Background Image"},"content":{"rendered":"<p>As many people have pointed out, WPF in its current form is far from point-and-click experience. This is how you set background image on a windows form (not WPF):<\/p>\n<ol>\n<li>Select the form<\/li>\n<li>Right click on properties<\/li>\n<li>Find <code>BackgroundImage<\/code> property<\/li>\n<li>Click &#8220;Import&#8221;, find your file on disk<\/li>\n<li>You&#8217;re done<\/li>\n<\/ol>\n<p>In WPF you need to add the file to the project, and then you have to write <i>by hand<\/i> something like this:<\/p>\n<pre>\n&lt;Window.Background&gt;\n  &lt;ImageBrush ImageSource=\"\/Images\/sahara.jpg\" Stretch=\"Fill\" \/&gt;\n&lt;\/Window.Background&gt;\n<\/pre>\n<p>This is way too much writing. I would tolerate something like <code>&lt;Window BackgroundImage=\"\/Images\/sahara.jpg\"&gt;<\/code>, but this brush mambo-jumbo just does not feel right. Too much noise. Yes, I know it fits nicely in the conceptual model et cetera, but it is still too much typing for such a simple task.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As many people have pointed out, WPF in its current form is far from point-and-click experience. This is how you set background image on a windows form (not WPF): Select <a href=\"https:\/\/ikriv.com\/blog\/?p=200\" 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-200","post","type-post","status-publish","format-standard","category-wpf"],"_links":{"self":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/200","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=200"}],"version-history":[{"count":0,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/200\/revisions"}],"wp:attachment":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=200"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=200"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=200"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}