title: wpf c# public var of Application.Current.Windows
body: <p>I have multiple windows in my wpf app.  Im finding that I have to constantly reference those windows inside various private functions like this:</p>
  
  <pre><code>var P1 = Application.Current.Windows
          .Cast&lt;Window&gt;()
          .FirstOrDefault(window =&gt; window is Player1Screen) as Player1Screen;
  </code></pre>
  
  <p>What is the easiest way to declare this once and then access it everywhere?</p>