






















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.
包括Startup, SessionEnding 等 以及 可override的函数(default event handler) OnStartup , OnSessionEnding
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.
在子类中override其中的一些event handler, 修改一些属性
这些Window的各种属性都可以通过程序控制.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。