用于启动简单WPF应用程序的所有组件是什么? [英] What are all the components used for starting a simple WPF Application?

查看:79
本文介绍了用于启动简单WPF应用程序的所有组件是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道所有用于启动简单WPF应用程序的组件,dll和所有其他内容.
另外,是否有什么方法可以找出导致WPF应用程序启动延迟的主要原因?
我还想在Visual Studio 2010中跟踪耗时的代码.

I would like to know which are all the components, dll''s and all other things being used to start a simple WPF application.
Also if there is any way by which we can find out the main reasons for delay in startup of WPF application?
I also want to trace the code for time consumption in my Visual Studio 2010.

推荐答案

DLLs…什么是DLL?在WPF应用程序中要参考什么?为什么这是一个问题?如果可以使用Visual Studio,则只需从WPF应用程序模板创建一个新项目.它将为您创建一个框架应用程序.查看所有引用(找到的引用将是最小引用,但确实不需要某些引用,例如System.DeploymentSystem.Data.*;您可以一个一个地删除引用以查看哪些是多余的)和文件该项目-您将了解所需.

延迟启动应用程序?我从未见过明显的延迟.也许您看到应用程序做错了. :-)要跟踪时间消耗,请使用类System.Diagnostics.Stopwatch,请参见 http://msdn.microsoft.com/en-us/library/system.diagnostics.stopwatch.aspx [
DLLs… what DLLs? What to reference in your WPF application? Why this is a problem? If you can use Visual Studio, just create a new project from WPF Application template. It will create a skeleton application for you. Look at all the references (what you find will be about the minimum, but certain references are really not needed, such as System.Deployment and System.Data.*; you can remove references one by one to see which ones are redundant) and files of the project — you will learn what you need.

Delay in application startup? I never saw significant delay. Maybe you saw applications doing it wrong. :-) To trace time consumption, use the class System.Diagnostics.Stopwatch, see http://msdn.microsoft.com/en-us/library/system.diagnostics.stopwatch.aspx[^] and the code sample at the end of this MSDN help page.

—SA


尝试以下操作:
Try this : http://stackoverflow.com/questions/450039/how-to-programmatically-get-dll-dependencies[^]

The DependencyReporter code will give you a list of the DLL''s used by your application.


这篇关于用于启动简单WPF应用程序的所有组件是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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