WPF learning path (7) applications and windows (continued), wpf windows

Source: Internet
Author: User

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...

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.