没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示


试读
6页
一、WPF应用程序由System.Windows.Application类进行管理 二、创建WPF应用程序 创建WPF应用程序有两种方式: 1、Visual Studio和Expression Blend默认的方式,使用App.xaml文件定义启动应用程序 App.xaml文件的内容大致如下..... 更多WPF资源:http://cleopard.download.csdn.net/
资源推荐
资源详情
资源评论
















WPF
应用程序管理 (更多资源:http:// cleopard.download.csdn.net/ )
一、WPF 应用程序由 System.Windows.Application 类进行管理
二、创建 WPF 应用程序
创建 WPF 应用程序有两种方式:
1、Visual Studio 和 Expression Blend 默认的方式,使用 App.xaml 文件定
义启动应用程序
App.xaml 文件的内容大致如下:
1: <Application x:Class="WpfApplicationLifeCycle.App"
2:
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/prese
ntation"
3:
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4: StartupUri="Window1.xaml">
5: <Application.Resources>
6: </Application.Resources>
7: </Application>
其中 StartupUri 指定启动的 WPF 窗体
2、可以自已定义类,定义 Main 方法实现对 WPF 应用程序的启动
在项目中添加一个类,类的代码如下,在项目选项中,设定此类为启动项。
1: using System;
2: using System.Windows;
3:-
4: namespace WpfApplicationLifeCycle
5: {
6: public class MainClass
7: {
8: [STAThread]
9: static void Main()
10: {
11: // 定义 Application 对象
12: Application app = new
Application();

CLeopard
- 粉丝: 178
- 资源: 450
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助


安全验证
文档复制为VIP权益,开通VIP直接复制

- 1
- 2
- 3
- 4
- 5
- 6
前往页