{"id":2601,"date":"2022-08-30T15:26:13","date_gmt":"2022-08-30T15:26:13","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/02\/04\/registering-custom-protocol-for-windows-phone-8-app-webbrowser-control-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:26:13","modified_gmt":"2022-08-30T15:26:13","slug":"registering-custom-protocol-for-windows-phone-8-app-webbrowser-control-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/registering-custom-protocol-for-windows-phone-8-app-webbrowser-control-collection-of-common-programming-errors\/","title":{"rendered":"Registering Custom Protocol for Windows Phone 8 App WebBrowser Control-Collection of common programming errors"},"content":{"rendered":"<p>Recently i had to create a custom uri scheme,and that was pretty easy in your WMAppManifest add:<\/p>\n<pre><code>\n  \n\n<\/code><\/pre>\n<p>this is stands after <code>Tokens<\/code><\/p>\n<p>than in your App.cs file you redirect to the class which is responsible for the navigation<\/p>\n<pre><code>RootFrame.UriMapper = new CustomUriMapper();\n<\/code><\/pre>\n<p>for example<\/p>\n<pre><code>class CustomUriMapper : UriMapperBase\n{\n    private string tempUri;\n    public override Uri MapUri(Uri uri)\n    {\n        tempUri = System.Net.HttpUtility.UrlDecode(uri.ToString());\n\n        if (tempUri.Contains(\"XXXX\"))\n        {\n         return new Uri(\"\/MainPage.xaml?parameter=XXXX\", UriKind.Relative);\n        }\n        else\n            {\n                return new Uri(\"\/MainPage.xaml\", UriKind.Relative);\n            }           \n    }\n} \n<\/code><\/pre>\n<p>i hope i helped<\/p>\n<p>EDIT<\/p>\n<p>i have create a small project, and i&#8217;m sure it works, please try this<\/p>\n<pre><code>            string url = \"xxxx:\";\n            WebBrowserTask browser = new WebBrowserTask();\n            browser.URL = url;\n            browser.Show();\n<\/code><\/pre>\n<p id=\"rop\"><small>Originally posted 2014-02-04 02:41:55. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>Recently i had to create a custom uri scheme,and that was pretty easy in your WMAppManifest add: this is stands after Tokens than in your App.cs file you redirect to the class which is responsible for the navigation RootFrame.UriMapper = new CustomUriMapper(); for example class CustomUriMapper : UriMapperBase { private string tempUri; public override Uri [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2601","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2601","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=2601"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2601\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=2601"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=2601"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=2601"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}