Stack Overflow is a community of 4.7 million programmers, just like you, helping each other.

Join them; it only takes a minute:

Sign up
Join the Stack Overflow community to:
  1. Ask programming questions
  2. Answer and help your peers
  3. Get recognized for your expertise

Can we access the current System.Windows.Application object inside a Window class in WPF ?

share|improve this question
up vote 9 down vote accepted

Yes sure. You can access it everywhere in a WPF application.

// assuming that you derivate of Application is named App
((App)Application.Current).SomePropertyOfApp = ...
share|improve this answer

Yes - it's as easy as Application.Current.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.