title: How to Bind the Cursor property of a Grid to a Property of my ViewModel in Silverlight 3.0?
body: <p>I'm attempting to bind an IsLoading property to the Cursor property of my UI's LayoutRoot Grid. I'm trying to have the main app cursor become an hourglass whenever the property says it's loading.</p>
  
  <p>I'm binding the property as follows:</p>
  
  <pre><code>&lt;Grid Cursor="{Binding IsLoading, Converter={StaticResource CursorConverter}}"&gt;
  </code></pre>
  
  <p>The key "CursorConverter" maps to the BoolToCursorConverter in the resources. The converter code is:</p>
  
  <pre><code>public class BoolToCursorConverter : IValueConverter
  {
      public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
      {
          if (parameter == null)
              return ((bool)value == true) ? Cursors.Wait : Cursors.Arrow;
          return false;
      }
  
      public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
      {
          Cursor cursor = value as Cursor;
          if (cursor != null)
              return cursor == Cursors.Wait ? true : false;
          return false;
      }
  }
  </code></pre>
  
  <p>When I try to run this though I get the XamlParseException "The given key was not present in the dictionary."</p>
  
  <p>Any help would be appreciated, thanks,</p>