.net Maui: use of 'ShellContent' to pass a parameter
Thank you in advance for your time and help
Is somewhere out there helping a pretty old hobby developer on .net maui
GIT: https://github.com/edikaufmann/RandoJson (public).
I'm still struggling to dynamically call the appropriate .json data based on:
In AppShell.xaml:
<ShellContent Title="VARHaute"
ContentTemplate="{DataTemplate views:MainPage}"
Route="varhaute"
Style="{StaticResource VARHauteShell}" />
In RandoService.cs:
I call my .json data(today hard coded).
Target: to use the value in 'Route="varhaute"' to feed my 'string myurl =' dynamically.
.....
// how to set fileName dynamically ?????????????????????????????????
string myUrl = "varhaute";
// comment: file names are = "varhaute" or "sioublanc" or "alpesdehauteprovence"
var response = await httpClient.GetAsync("https://randopro.org/MyUploads/MyJson/" + myUrl + ".json");
.....
I'm (still) struggling to pass the value in 'route = "varhaute"' to RandoService.cs
Thank you
ed k