1

I have a folder named jsonarray containing Page3.xaml . I want to show this page calling it from AppShell.xaml. The ordinary method calling in AppShell.xaml is:

<TabBar>
<ShellContent Title="About" Icon="icon_about.png" Route="AboutPage" ContentTemplate="{DataTemplate local:AboutPage}" />
</TabBar>

I tried:

<TabBar>
<ShellContent Title="Page3" Icon="Page3.png" Route="Page3" ContentTemplate="{DataTemplate local:Page3}" />
</TabBar>

but it errors: " Cannot resolve type "Page3".

Any idea how do I call the Page3 from the jsonarray folder?

  • Check `local:` namespace on the top of xaml. Since you've created a different folder, it is supposed to be a different namespace name. Like `local2:/jsonarray` – Shaw May 15 '21 at 00:55
  • Yes it has a different namespace. e.x (AboutPage) : namespace just4json.Views (Page3): namespace just4json.jsonarray How should I do it? – Nikolaos Efentis May 15 '21 at 01:07
  • 1
    If your "local" deffined like this `xmlns:local="clr-namespace:just4json.Views"` , then add a line: `xmlns:local2="clr-namespace:just4json.jsonarray"` and use "local2" in ContentTemplate – Shaw May 15 '21 at 07:37

0 Answers0