
{"id":237,"date":"2009-08-13T11:05:41","date_gmt":"2009-08-13T15:05:41","guid":{"rendered":"http:\/\/www.ikriv.com\/blog\/?p=237"},"modified":"2009-08-13T11:05:41","modified_gmt":"2009-08-13T15:05:41","slug":"wpf-pack-uris-whats-the-point-of-all-the-commas","status":"publish","type":"post","link":"https:\/\/ikriv.com\/blog\/?p=237","title":{"rendered":"WPF: Pack URIs: what&#039;s the point of all the commas?"},"content":{"rendered":"<p>WPF uses &#8220;pack&#8221; URI schema to point to resources. An absolute pack URI looks like this:<\/p>\n<p><code>pack:\/\/application:,,,\/ResourceFile.xaml<\/code><\/p>\n<p>The schema is described in this <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/aa970069.aspx\">MSDN article<\/a> and they claim the URIs are compatible with  RFC 2396.<\/p>\n<p>This is all fine and nice, but who invented these commas? They say it was supposed to be &#8220;application:\/\/\/&#8221;, but you cannot put that many slashes in a valid URI, so they had to encode it. Why bother with the slashes at all?<\/p>\n<p><code>pack:\/\/<i>authority<\/i>\/<i>path<\/i><\/code><\/p>\n<p>would be a perfectly valid URI. E.g.<\/p>\n<p><code>pack:\/\/application\/ResourceFile.xaml<\/code><\/p>\n<p>Whenever I see several commas in a row, I feel there are some missing parameters that could have been inserted there &#8211; thank you, VB. So, all these commas in URIs takes some getting used to.<\/p>\n<p>Fortunately, relative URIs don&#8217;t require them, you can just say <code>ResourceFile.xaml<\/code> and it would work fine.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>WPF uses &#8220;pack&#8221; URI schema to point to resources. An absolute pack URI looks like this: pack:\/\/application:,,,\/ResourceFile.xaml The schema is described in this MSDN article and they claim the URIs <a href=\"https:\/\/ikriv.com\/blog\/?p=237\" 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":[4,12],"tags":[],"class_list":["entry","author-ikriv","post-237","post","type-post","status-publish","format-standard","category-hack","category-wpf"],"_links":{"self":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/237","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=237"}],"version-history":[{"count":0,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/237\/revisions"}],"wp:attachment":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=237"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=237"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=237"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}