title: Binding DataGrid's FontWeight property to value converter
body: <p>I'm trying to make cell bold or normal if item new/old inside DataGrid but stumbled upon erro..</p>
  
  <p>Looks like my issue described here: <a href="https://stackoverflow.com/questions/3433396/why-can-i-not-bind-the-visiblity-of-a-datagridtemplatecolumn-in-silverlight-4">Why can I not bind the Visiblity of a DataGridTemplateColumn in Silverlight 4?</a></p>
  
  <p>I'm getting following error:</p>
  
  <blockquote>
    <p>Object of type 'System.Windows.Data.Binding' cannot be converted to
    type 'System.Windows.FontWeight'.</p>
  </blockquote>
  
  <p>And my XAML looks like so:</p>
  
  <pre><code>&lt;sdk:DataGridTextColumn Header="Subject" Binding="{Binding Subject}" CanUserReorder="True" CanUserResize="True" CanUserSort="True" Width="Auto" FontWeight="{Binding IsNew, Converter={StaticResource BoolToFontWeightConverter}}" /&gt;
  </code></pre>
  
  <p>My question is there any workaround to get this working? I'm not even using template column, it's plain text column..</p>
  
  <pre><code>public class BoolToFontWeightConverter : IValueConverter
      {
          public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
          {
              return ((bool)value) ? FontWeights.Bold : FontWeights.Normal;
          }
  
          public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
          {
              return (FontWeight)value == FontWeights.Bold;
          }
      }
  </code></pre>