question

vzmon1-5739 avatar image
0 Votes"
vzmon1-5739 asked vzmon1-5739 commented

WPF App.xaml Root Element

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

windows-wpfdotnet-wpf-xaml
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

HuiLiu-MSFT avatar image
0 Votes"
HuiLiu-MSFT answered vzmon1-5739 commented

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.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you for the guidance and information. This will help me move along in my understanding of WPF.

0 Votes 0 ·