惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Help Net Security
Help Net Security
G
Google Developers Blog
雷峰网
雷峰网
WordPress大学
WordPress大学
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Engineering at Meta
Engineering at Meta
Security Latest
Security Latest
T
Threat Research - Cisco Blogs
AWS News Blog
AWS News Blog
F
Full Disclosure
C
Cybersecurity and Infrastructure Security Agency CISA
T
The Exploit Database - CXSecurity.com
J
Java Code Geeks
U
Unit 42
C
Cyber Attacks, Cyber Crime and Cyber Security
V
V2EX
C
Cisco Blogs
博客园 - 司徒正美
Project Zero
Project Zero
L
LINUX DO - 热门话题
阮一峰的网络日志
阮一峰的网络日志
Blog — PlanetScale
Blog — PlanetScale
Scott Helme
Scott Helme
A
About on SuperTechFans
Hugging Face - Blog
Hugging Face - Blog
S
Securelist
小众软件
小众软件
aimingoo的专栏
aimingoo的专栏
S
Schneier on Security
G
GRAHAM CLULEY
酷 壳 – CoolShell
酷 壳 – CoolShell
Cyberwarzone
Cyberwarzone
MongoDB | Blog
MongoDB | Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 叶小钗
T
Threatpost
Recorded Future
Recorded Future
C
CXSECURITY Database RSS Feed - CXSecurity.com
宝玉的分享
宝玉的分享
N
News and Events Feed by Topic
人人都是产品经理
人人都是产品经理
The Register - Security
The Register - Security
S
Security Archives - TechRepublic
博客园 - Franky
N
News | PayPal Newsroom
Simon Willison's Weblog
Simon Willison's Weblog
S
SegmentFault 最新的问题
W
WeLiveSecurity
A
Arctic Wolf
B
Blog

博客园 - caoyang.org

jupyter centos 6 yum源记录,离线下载rpm包的办法 使用命令提示符连接到无线网络 linux系统的ssh服务开启方法 nodejs dateformat date-utils nodejs async nodejs dateformat date-utils nodejs timer block-timer timer-ease linux 修改 ssh 的端口号,启动hg服务 linux 下添加 路由 【msdn wpf forum翻译】TextBox中文本 中对齐 的方法 - caoyang.org 【msdn wpf forum翻译】TextBlock等类型的默认样式(implicit style)为何有时不起作用? 【msdn wpf forum翻译】获取当前窗口焦点所在的元素 【msdn wpf forum翻译】如何在wpf程序(程序激活时)中捕获所有的键盘输入,而不管哪个元素获得焦点? 【msdn wpf forum翻译】在wpf程序中显示一个doc文件的内容 《Applications=Code+Markup》读书笔记 2(第二章 基本画刷) Bind Enum to Combobox.SelectedIndex 如何捕获正在执行的函数名? wpf中显示HTML(转自http://steeven.cnblogs.com/archive/2006/06/12/424258.html)
《Applications=Code+Markup》读书笔记 1(第一章 初识Application和Window)
caoyang.org · 2007-09-24 · via 博客园 - caoyang.org

知识点

[STAThread] WPF程序的Main函数必须声明为[STAThread]:

In any WPF program, the [STAThread] attribute must precede Main or the C# compiler will complain.
This attribute directs the threading model of the initial application thread to be a single-threaded apartment,
which is required for interoperability with the Component Object Model (COM).
"Single-threaded apartment" is an old COM-era, pre-.NET programming term,
but for our purposes you could imagine it to mean
our application won't be using multiple threads originating from the runtime environment.

app.Run();开始进入消息循环,可带参数(win)

介绍Application中的事件

包括Startup, SessionEnding 等 以及 可override的函数(default event handler) OnStartup , OnSessionEnding

Window 中的事件(继承自UIElement)(TextInput,MouseDown等)

Following initialization, virtually everything a program does is in response to an event.
These events usually indicate keyboard, mouse, or stylus input from the user.
The UIElement class (which refers to the user interface, of course) defines a number of keyboard-,
mouse-, and stylus-related events; the Window class inherits all those events.
One of those events is named \MouseDown. A window's \MouseDown event occurs 
whenever the user clicks the client area of the window with the mouse.

Window的一些属性(Height,Width,Top,Left; Title; WindowStartupLocation; WindowStyle; ResizeMode;WindowState )

由Background 引出Brushes(见下一章)

关键

熟悉Application和Window的事件

在需要的情况下可继承Window以及Application

在子类中override其中的一些event handler, 修改一些属性

一个WPF程序只有一个Application(对象),这个Application可创建多个Window

这些Window的各种属性都可以通过程序控制.

Window可以以Show()和ShowDialog()两种方式Show出来,弄清二者的区别

隐藏一个Window可以用Hide(),关闭则调用它的Close();