title: C# WPF datgird IvalueConverter binding problems
body: <p>I have a datagrid, and the itemssoure is a ObservableCollection.
  And I want to change it's values format before it goes to the datagrid.
  Below is the code of xaml.</p>
  
  <pre><code>                &lt;DataGrid.CellStyle&gt;
                      &lt;Style TargetType="DataGridCell"&gt;
                          &lt;Style.Setters&gt;
                              &lt;Setter Property="TextBlock.Text" Value="{Binding Path=Cash, Converter={StaticResource DecimalConverter}}"/&gt;
                              &lt;Setter Property="TextBlock.TextAlignment" Value="Center"&gt;&lt;/Setter&gt;                                
                          &lt;/Style.Setters&gt;
                      &lt;/Style&gt;
                  &lt;/DataGrid.CellStyle&gt;
  </code></pre>
  
  <p>The column I want to change is "Cash", and the IValueConverter is here.</p>
  
  <pre><code>public class DecimalConverter : IValueConverter
  {
      public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
      {
          double result = 0;
          if (value is double)
              result = (double)value;
          return result.ToString("F2");
      }
  
      public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
      {
          throw new NotImplementedException();
      }
  }
  </code></pre>
  
  <p>When I put the break the break point on the function DecimalConverter, it is actually begining called, and processing as the way I want(return The format as F2).
  But It is not working, the datagrid still showing the value in a unprocessed way.
  I know I have other ways to achieve this, but I just want to know why this is not working. It is the IValueConverter or the xaml code is not correct.</p>