注册
登录
会员
标签
统计
帮助
WPF技术网
»
资源共享
» winnerzone wpf学习笔记(2)
‹‹ 上一主题
|
下一主题 ››
发新话题
发布投票
发布商品
发布悬赏
发布活动
发布辩论
发布视频
打印
winnerzone wpf学习笔记(2)
wpf
管理员
个人空间
发短消息
加为好友
当前离线
1
#
大
中
小
发表于 2007-10-26 14:51
只看该作者
winnerzone wpf学习笔记(2)
今天早上一来打开昨天的wpf项目,从一个错误中发现了许多的新东西.
打开项目中的Debug文件夹(在vs下是隐藏的)可以发现App.g.cs和Window1.g.cs两个文件。
App.g.cs应该是程序的入口点文件。
Window1.g.cs有知道的解释下。谢谢了。
我们现在来看下App.xaml.cs这个类。这个类里包含了许多程序初始化的东西。
我们首先在类中增加下面代码:
protected
override
void
OnStartup(StartupEventArgs e)
...
{
base
.OnStartup(e);
Window1 win
=
new
Window1();
win.Title
=
"
MyApp
"
;
win.Show();
}
运行会发现启动的时候出现了window窗体。
该方法是当程序启动的时候调用的方法。
总共有的方法如下:
Activated
Occurs when an application becomes the foreground application.
Deactivated
Occurs when an application stops being the foreground application.
DispatcherUnhandledException
Occurs when an exception is raised by the application but not handled.
Exit
程序退出时调用
FragmentNavigation
Occurs when a navigator in the application begins navigation to a content fragment, Navigation occurs immediately if the desired fragment is in the current content, or after the source XAML content has been loaded if the desired fragment is in different content.
LoadCompleted
Occurs when content that was navigated to by a navigator in the application has been loaded, parsed, and has begun rendering.
Navigated
Occurs when the content that is being navigated to by a navigator in the application has been found, although it may not have completed loading.
Navigating
Occurs when a new navigation is requested by a navigator in the application.
NavigationFailed
Occurs when an error is raised while a navigator in the application is navigating to the requested content.
NavigationProgress
Occurs periodically during a download that is being managed by a navigator in the application to provide navigation progress information.
NavigationStopped
Occurs when the
StopLoading
method of a navigator in the application is called, or when a new navigation is requested by a navigator while a current navigation is in progress.
SessionEnding
当用户注销或者停止运行系统时终止session时调用
Startup
程序启动时调用的方法
本人英文翻译不好,其他的自己看吧。
Application = Code + Markup ------- 一个名人说的
本节结束。
UID
2
帖子
271
精华
0
积分
60
阅读权限
200
在线时间
44 小时
注册时间
2007-9-29
最后登录
2008-7-8
查看详细资料
TOP
winmail
新手上路
个人空间
发短消息
加为好友
当前离线
2
#
大
中
小
发表于 2007-12-5 00:00
只看该作者
有点麻烦啊,WPF
UID
99
帖子
4
精华
0
积分
0
阅读权限
10
在线时间
0 小时
注册时间
2007-12-4
最后登录
2007-12-9
查看详细资料
TOP
‹‹ 上一主题
|
下一主题 ››
控制面板首页
编辑个人资料
积分记录
公众用户组
个人空间管理
基本概况
版块排行
主题排行
发帖排行
积分排行
交易排行
在线时间
管理团队
本站与当当网合作推出买书返现活动
1.必须通过点击本链接进入当当网购物
2.成功购物后将订单号以及您的收款信息以站内短消息发送给wpf管理员
3.管理员将支付给您返现
比如您通过我站链接花100元在当当网买后,我站将支付您10元的返现