none
Understanding how Cross-Platform App starts and uses xaml pages

    Question

  • (I have experience with MVC, WebForms, WinForms. I am getting started with Cross-Platform App projects.)

    I created a Cross-Platform App project including Xamarin.Forms. Visual Studio created 4 sub-projects: "MyProject" "MyProject".Android "MyProject".iOS "MyProject".UWP

    I suppose that I actually have to develop most of my project in "MyProject" except for UI specifics things?

    Then I have two questions:

    • Where is it written in "MyProject".UWP that it has to display "MyProject"\MainPage.xaml?
    • Why can't I view "MyProject"\MainPage.xaml in designer mode?

    • Edited by TTT0 Tuesday, April 04, 2017 2:49 PM
    Tuesday, April 04, 2017 2:46 PM

All replies

  • Hi TTT0

    In xamarin forms see link XAML Previewer for Xamarin.Forms

    Regards


    Si ayudé a resolver tu consulta, no olvides marcar como respuesta y/o votar como útil.

    Tuesday, April 04, 2017 2:56 PM
  • I think I found both aswers:

    Where is it written in "MyProject".UWP that it has to display "MyProject"\MainPage.xaml?

    Somewhere in "MyProject".UWP\MainPage.xaml.cs is the line MainPage = new MyProject.App(); and in "MyProject".UWP\App.xaml.cs is MainPage = new MyProject.MainPage(); (For those not used to work XAML files: the .cs code can be viewder click on the arrow left to the XAML file.)

    Why can't I view "MyProject"\MainPage.xaml in designer mode?

    According to developer.xamarin.com/guides/xamarin-forms/troubleshooting/questions/forms-xaml-designer/ Possible answer: "There is not yet a visual designer for generating XAML in Xamarin.Forms applications, so all XAML must be hand-written."



    Tuesday, April 04, 2017 3:00 PM
  • Hi TTT0,

    Welcome to the MSDN forum.

    I'm so glad to hear that your issue is solved and thank you for your sharing, it will help other community members who have the same doubts.

    If you have any other issue is about Xamarin, please redirect to the Xamarin support forum: https://forums.xamarin.com/ to seek for a more professional support. If you have any other issues about VS IDE, please create a new thread and I will help you to research it, thank you for your understanding.

    BTW, could you please mark your reply as answer and that will help other community members to easier search this useful information:)

    Best regards,

    Sara


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, April 05, 2017 3:02 AM
    Moderator