liran63
liran63

Reputation: 1336

WPF what is the event before rendering

I create a simple game in WPF application and I want to change objects in the window before it render them. What is my best option? :)

Upvotes: 2

Views: 5659

Answers (1)

Maverick
Maverick

Reputation: 801

Following events are fired before the content is rendered in WPF :

  1. Startup (Application)
  2. Initialized (Window)
  3. SourceInitialized (Window)
  4. Activated (Application)
  5. Activated (Window)
  6. Loaded (Window)

Loaded is the last event fired before the contents are rendered and you can use it to make changes to the objects.

Read this article to know more : Lifetime Events of a WPF application

Upvotes: 14

Related Questions