WPF learning path (7) applications and windows (continued), wpf windows
Window Lifecycle
A Window class in WPF represents a Window.
The lifecycle of a window also has several stages:
1. the constructor is called.
2. The Window. Initialized event is triggered.
3. The Window. Activated event is triggered.
4. The Window. Loaded event is triggered.
5. The Window. ContentRendered event is triggered.
6. Interaction between users and windows (switching between Actived and Deactived statuses)
7. The Window. Closing event is triggered.
8. The Window. Uloaded event is triggered.
9. The Window. Closed event is triggered.
When you switch between multiple windows, Activated and Deactivated occur multiple times in the window lifecycle. The ContentRendered event is only triggered when the window is completely rendered for the first time.
You can use the Loaded event to execute some tasks immediately before all the content is displayed to the user;
You can use the ContentRendered event to execute some tasks immediately after all the content is displayed to the user.
Window Properties
There are two main categories: location size and appearance style
Detailed description in MSDN
Https://msdn.microsoft.com/en-us/library/system.windows.window_properties (v = vs.110). aspx
To be continue...