Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

.Net Maui – ShellContent navigation issue

I am trying to navigate to page "TestView" which is in folder "Views" of my VisualStudio solution.
Here the compile Error.

Error XFC0000 Cannot resolve type ":TestView"

AppShell.xaml file

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

<FlyoutItem Title="test" FlyoutIcon="List">

        <ShellContent
        Title="Test Page"
        ContentTemplate="{DataTemplate local:TestView}"
        Route="TestView" />
    </FlyoutItem>

Need Help to solve the Compile Error

Here the link to my GitHub project MPC-Calculator Maui Branch

enter image description here

>Solution :

Change your namespace in your shell from:

xmlns:local="clr-namespace:MPC_MassPropertiesCalculator_MAUIapp"

To this:

xmlns:local="clr-namespace:MPC_MassPropertiesCalculator_MAUIapp.Views"

Basically if you wanna refer a View in your XAML you need to have its exact namespace and then the name of your View.

Good luck!

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading