WPF App.xaml Root Element

vzmon1 41 Reputation points
2021-11-06T23:52:16.64+00:00

I'm new to Windows Presentation Foundation, and I'm looking for documentation what root elements can be added to the app.xaml file. The default root element is Application, which has sufficient documentation that I have a relatively clear understanding of this tag. Unfortunately I couldn't find any information of a root element of views.

I was following the MVVMCross TipCalc demo when I saw this entry in the App.xaml file: <views:MvxApplication .... I'm trying to understand what this line is doing versus the original line of <Application.

I greatly appreciate if someone could point to the appropriate documentation that explains what root elements can be added to the app.xaml file besides Application, as well as what the <views root element is doing.

Thank you

Developer technologies | Windows Presentation Foundation
Developer technologies | XAML
0 comments No comments
{count} votes

Accepted answer
  1. Hui Liu-MSFT 48,676 Reputation points Microsoft External Staff
    2021-11-08T03:12:05.947+00:00

    For some purposes, you may use the root element corresponding to the third-party package in app.xaml when you use the third-party package. As you can see from this document , you could add the xaml:XamlApplication root element to the app.xaml file.

    what the <views root element is doing

    The role of the view here is to map to custom classes and assemblies. For more mapping content of wpf, you could refer here.

    I'm trying to understand what this line is doing versus the original line of <Application.

    For the question of <views:MvxApplication>, it is a third-party product MVVMCross, you can ask questions in the forum mentioned here.


    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.


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.