How to use content view in content page.

Dani_S 4,501 Reputation points
2024-03-07T03:34:58.8533333+00:00

Hi,

In continue to https://learn.microsoft.com/en-us/answers/questions/1610129/navigation

all my "pages" except login and main page are content views using MVVM.

how to convert them to pages ?

Thanks,

Developer technologies .NET .NET MAUI
{count} votes

Accepted answer
  1. Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 36,436 Reputation points Microsoft External Staff
    2024-03-08T06:13:40.51+00:00

    Hello,

    You could display the contentview on a page, then navigate to a page. As you said, you found the solution:

    <?xml version="1.0" encoding="utf-8" ?>
    
    <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
    
    ```ruby
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
    
             x:Class="MauiApp26.DashboradPage"
    
             xmlns:**view**="clr-namespace:MauiApp26" x:Name="page"
    
             >
    
    <Grid>
    
        **<view:DashboardView/>// this is content view presented in content page.**
    
    </Grid>
    ```</ContentPage>
    
    

    Best Regards,

    Wenyan Zhang


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.