title: WPF Binding: Static resource cannot be resolved
body: <p>I tried to run <a href="http://www.infosysblogs.com/microsoft/2008/09/wpf_displaying_enums_in_combob.html" rel="nofollow noreferrer">this example</a> but I got binding problem.</p>
  
  <p>Designer highlights the error <code>The resource "monthCollection" could not be resolved</code></p>
  
  <p>How can I use Utility.MonthCollection as local resource? </p>
  
  <p>XAML part:</p>
  
  <pre><code>&lt;Window x:Class="FaceReport.WindowMain"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  
  Title="Rapor" Height="402" Width="600" WindowState="Normal"&gt;
  &lt;Grid Name="gridMain" x:Uid="uidGridMain"&gt;
      &lt;Grid.RowDefinitions&gt;
          &lt;RowDefinition Height="Auto" /&gt;
      &lt;/Grid.RowDefinitions&gt;
      &lt;ComboBox SelectedIndex="0" 
                DisplayMemberPath="Value" SelectedValuePath="Key" Margin="132,9,200,0"
                Grid.Row="3" Height="24" VerticalAlignment="Top" Name="cbBind" 
  
                ItemsSource="{Binding Source={StaticResource Utility.ReportForCollection},
                  Path=Utility.ReportForCollection}"                   
                /&gt;
   &lt;/Grid&gt;
   &lt;/Window&gt;
  </code></pre>
  
  <p>C# part:</p>
  
  <pre><code>namespace FaceReport
  {
  internal class Utility
  {
      public enum ReportFor
      {
          Choose,
          All,
          Group,
          Person
      }
  
      private static Dictionary&lt;ReportFor, string&gt; _dictReportFor;
      public static Dictionary&lt;ReportFor, string&gt; ReportForCollection
      {
          get
          {
              return _dictReportFor;
          }
      }
  
      static Utility()
      {
          //initialize the collection with user friendly strings for each enum
          _dictReportFor = new Dictionary&lt;ReportFor, string&gt;(){
              {ReportFor.Choose, "Lütfen seçiniz..."},        
              {ReportFor.All, "Herkes"},
              {ReportFor.Group, "Grup"},
              {ReportFor.Person, "Şahıs"}};
      }
  }
  
  /// &lt;summary&gt;
  /// Application's main form
  /// &lt;/summary&gt;
  public partial class WindowMain : Window
  {
      /// &lt;summary&gt;
      /// Constructor
      /// &lt;/summary&gt;
      public WindowMain()
      {
          InitializeComponent();
      }
  }
  </code></pre>