title: Binding static property and implementing INotifyPropertyChanged
body: <p>I'm trying to bind a static property of some class to some control. I've tryied a few implementation but each has its problem:</p>
  
  <p>All examples use the next XAML:</p>
  
  <pre><code> &lt;Label Name="label1" Content="{Binding Path=text}"/&gt;  
  </code></pre>
  
  <p>1st approach - don't use INotifyPropertyChanged</p>
  
  <pre><code>public class foo1
  {
      public static string text { get; set; }
  }
  </code></pre>
  
  <p>The problem is that when 'text' propery changes the control is not notified.</p>
  
  <p>Second approach - use INotifyPropertyChanged</p>
  
  <pre><code>public class foo1 : INotifyPropertyChanged
  {
      public event PropertyChangedEventHandler PropertyChanged;
      public void OnPropertyChanged(string propertyName)
      {
          if (PropertyChanged != null)
              PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
      }
  
      private static string _text;
      public static string text
      {
          get { return _text; }
          set
          {
              _text = value;
              OnPropertyChanged("text");
          }
      }
  }
  </code></pre>
  
  <p>This doesn't compile because OnPropertyChanged() method is not static and it's called within a static method.</p>
  
  <p>Second approach try 2: make OnPropertyChanged() method static => this doesn't compile because OnPropertyChanged() is now static and it tries to use 'PropertyChanged' event which is not static.</p>
  
  <p>Second approach try 3: make 'PropertyChanged' event static => this doesn't compile because the class does not implement 'INotifyPropertyChanged.PropertyChanged' event (the event is defined in 'INotifyPropertyChanged interface is not static but here it is static).</p>
  
  <p>At this point I gave up.</p>
  
  <p>Any Ideas?</p>