
{"id":1143,"date":"2012-11-28T23:12:36","date_gmt":"2012-11-29T04:12:36","guid":{"rendered":"http:\/\/www.ikriv.com\/blog\/?p=1143"},"modified":"2012-11-28T23:12:36","modified_gmt":"2012-11-29T04:12:36","slug":"binding-to-an-index-with-space-in-xaml","status":"publish","type":"post","link":"https:\/\/ikriv.com\/blog\/?p=1143","title":{"rendered":"Binding to an index with space in XAML"},"content":{"rendered":"<p>If your addiction to data binding in XAML goes as far as to use indexers, eventually you may end up using a string with space (or other special character) as an index. Suppose, your index string is &#8220;[foo bar]&#8221; (square brackets are part of the string). This does not work:<\/p>\n<p><code>{Binding MyCollection[[foo bar]].SomeField}<\/code><\/p>\n<p>But this does:<\/p>\n<p><code>{Binding MyCollection[[foo&x20;bar]].SomeField}<\/code><br \/>\n<a style=\"display:none\" href=\"http:\/\/www.codeproject.com\/script\/Articles\/BlogFeedList.aspx?amid=1181663\" rel=\"tag\">CodeProject<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If your addiction to data binding in XAML goes as far as to use indexers, eventually you may end up using a string with space (or other special character) as <a href=\"https:\/\/ikriv.com\/blog\/?p=1143\" 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-1143","post","type-post","status-publish","format-standard","category-wpf"],"_links":{"self":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1143","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=1143"}],"version-history":[{"count":0,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1143\/revisions"}],"wp:attachment":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1143"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1143"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1143"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}