title: Access WPF Name properties in static method
body: <p>I have a WPF application. In one of the XAML I have used Name attribute like as follows</p>
  
  <pre><code> x:Name="switchcontrol"
  </code></pre>
  
  <p>I have to access the control/property in .cs file using <code>this.switchcontrol</code>
  My question is, I need to access the control in static method like</p>
  
  <pre><code>public static getControl()
  {
   var control = this.switchcontrol;//some thing like that
  }
  </code></pre>
  
  <p>How to achieve this?</p>