title: WPF static property binding not working on a list view
body: <p>I'm currently binding a list view to a list of objects and everytrhing is working.</p>
  
  <p>I can bind fine to my code behind of the xaml as long as I put in my Window element <code>DataContext="{Binding RelativeSource={RelativeSource Self}}"</code></p>
  
  <p>My ListView looks like this and bindings work correctly for my binded columns to the properties of the items of MyCollection.</p>
  
  <pre><code>&lt;ListView ItemsSource="{Binding MyCollection}"&gt;
  </code></pre>
  
  <p>For one of the columns though I always want it to say the same thing.  For example this column would always contain "Hello World"</p>
  
  <p>The following code gives me an error for binding:</p>
  
  <pre><code>&lt;GridViewColumn Header="I want all fields to be Hello World" DisplayMemberBinding="{Binding Source={x:Static Member=MyNamespace.MyStaticClass},Path=MyStaticStringField}" /&gt;
  </code></pre>
  
  <p>I get the error:</p>
  
  <blockquote>
    <p>error MC3050: Cannot find the type 'MyNamespace'. Note that type names are case sensitive.</p>
  </blockquote>
  
  <p><strong>MyNamespace is the same namespace as the window itself and MyStaticClass is public</strong> </p>
  
  <p>If I try instead:</p>
  
  <pre><code>&lt;GridViewColumn Header="I want all fields to be Hello World" DisplayMemberBinding="{Binding Source={x:Static Member=MyStaticClass},Path=MyStaticStringField}" /&gt;
  </code></pre>
  
  <p>I get the error:</p>
  
  <blockquote>
    <p>error MC3029: 'MyStaticClass' member is not valid because it does not have a qualifying type name.</p>
  </blockquote>
  
  <p><strong>Strangely enough, when I do this it works:</strong></p>
  
  <pre><code>&lt;GridViewColumn Header="This works" DisplayMemberBinding="{Binding Source={x:Static Member=SystemFonts.IconFontFamily}, Path=Source}" /&gt;
  </code></pre>
  
  <p><strong>The code for the field I'm trying to bind to:</strong></p>
  
  <pre><code>namespace MyNamespace
  {
      public static class MyStaticClass
      {
          public static string MyStaticStringField{ get; set; }
  
      }
  }
  </code></pre>