The life cycle of a window
A Windows class in WPF represents a window
The life cycle 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, the user and the window to interact (actived and deactived state switch each other)
7. The Window.closing event is triggered
8. The window.uloaded event is triggered
9. The window.closed event is triggered
Activated and deactivated occur multiple times in the window's life cycle when the user switches between multiple windows. The contentrendered event fires only when the window is fully present for the first time.
In order to get things done immediately before all content is displayed to the user, you can use the loaded event;
To make things happen immediately after all the content is displayed to the user, you can use the Contentrendered event.
Window Properties
It is divided into two main categories: position size, appearance style
Detailed Introduction to MSDN
Https://msdn.microsoft.com/en-us/library/system.windows.window_properties (v=vs.110). aspx
To be continue ...
WPF Learning Path (vii) Applications and Windows (cont.)