什么是一个XAML应用程序的工作流程看起来像 [英] What does a XAML app workflow look like

查看:114
本文介绍了什么是一个XAML应用程序的工作流程看起来像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在试图找到如何申请与用XAML的GUI生命周期的样子。 本博客文章真糊涂我。报价:




要充分认识以提高启动时间机会的地区,要了解一个启动应用程序的工作流程是非常重要的




  1。该应用程序调用构造函数中App.xaml.cs. 
2.在App.xaml中XAML解析。
3. Application_Launching被称为App.xaml.cs.
4.您的MainPage页构造函数被调用。
5. XAML在你的MainPage解析。
6的OnNavigatedTo被称为在你的MainPage。



我虽然这XAML被编译成BAML和嵌入式DLL。运行时只是将BAML到.NET对象。



时它WP7的Silverlight有什么不同?是否运行时解析它就像一个浏览器解析HTML?
什么是从XAML生成的C#文件的地步? (如Main.xaml.g.cs)是对C ++和XAML应用程序不同?


解决方案

.g.cs 文件都涉及到一个XAML页面的总体布局自动生成的,并且包含的​​信息。 这是一个相当不错的描述



运行时确实解析嵌入在组件中的XAML - 不像WPF中,它不嵌入作为BAML


I've been trying to find how does the lifecycle of an application with a GUI written in XAML looks like. This blog post really confused me. The quote:

To fully understand the areas of opportunity for improving startup time, it's important to understand the workflow of a launching application.

1. The App constructor is called in App.xaml.cs.
2. XAML in App.xaml is parsed.
3. Application_Launching is called in App.xaml.cs.
4. The Page constructor of your MainPage is called.
5. XAML in your MainPage is parsed.
6. OnNavigatedTo is called in your MainPage.

I though that XAML is compiled to BAML and embedded to dll. Runtime just translates BAML to .Net objects.

Is it different for WP7 Silverlight? Does Runtime parse it like a browser parses HTML? What is the point of C# files generated from XAML? (e.g. Main.xaml.g.cs) Is it different for C++ and XAML apps?

解决方案

.g.cs files are auto-generated and contain information related to the general layout of a XAML page. Here is a pretty good description.

The runtime indeed parses the XAML that is embedded in the assembly - unlike WPF, it is not embedded as BAML.

这篇关于什么是一个XAML应用程序的工作流程看起来像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆