I didn't find an answer about what i'm trying to do
I'm launching my app via a custom url (like "myurl://...) and I'd like to get the parameters
My app is called via an url that looks like this :
myurl://authentication?login=foo&options=bar&returnurl=http%3A%2F%2Fwww.foobarbaz.com
When it is called, a class called AssociationUriMapper tells which page should load depending on the url (if it contains authentication or something else), and then the page loads. This page is functionnal but my problem is that i need to get the url parameters like the login, the options, and the return url. So my problem is, how do I transmit these parameters ? Or at least, how do i transmit the entire URL ? (I have my own url parser to get the parameters)
What I want to do is, when i say to my AssociationUriMapper which page it should call, I want it to transmit the url to the page's behind code. In my AssociationUriMapper class the code is :
if (tempUri.Contains("myurl"))
{
string urlCalledType;
urlCalledType = "";
if (tempUri.Contains("authentication"))
urlCalledType = "authentication";
if (tempUri.Contains("foo"))
urlCalledType = "foo";
switch (urlCalledType)
{
case "authentication":
return new Uri("/Views/AuthenticationView.xaml", UriKind.Relative);
case "foo":
return new Uri("/Views/FooView.xaml", UriKind.Relative);
default:
return new Uri("/MainPage.xaml", UriKind.Relative);
}
}
I know my code isn't very optimized but this is not really relevant for now, it's a test app and not the final app that I will be releasing
So what should I add and where, so that when I go to the AuthenticationView.xaml, the url that made the app open is transmitted to the AuthenticationView.xaml.cs ?
I hope my question is clear enough to be understood, and thanks to whoever can help !