title: How to bind property in C#
body: <p>In My solution i have passed one autogenerated grid.In this grid one column added by using datatemplate.</p>
  
  <pre><code>&lt;DataTemplate x:Key="IdTextBlockTemplate"&gt;
   &lt;TextBlock&gt;
     &lt;Run Text="l" Loaded="OnLoad" FontSize="20" FontFamily="Wingdings" /&gt;
     &lt;Run Text="{Binding ConnectionState, Mode=TwoWay}"  /&gt;
   &lt;/TextBlock&gt;
  &lt;/DataTemplate&gt;
  </code></pre>
  
  <p>In xaml.cs</p>
  
  <pre><code> private void dataGrid_AutoGeneratingColumn(object sender, Telerik.Windows.Controls.GridViewAutoGeneratingColumnEventArgs e)
   {
      switch (e.Column.Header.ToString())
      {   
          case "ConnectionState":
              GridViewDataColumn item = new GridViewDataColumn();
              item.CellTemplate = Resources["IdTextBlockTemplate"] as DataTemplate;
              item.IsReadOnly = true;
              item.Header = "ConnectionState";
              e.Column = item;                    
              break;  
      }
  }
  </code></pre>
  
  <p>But this will work when header is equal to "connectionstate"</p>
  
  <p>in onload method i have added</p>
  
  <p>private void OnLoad(object sender, RoutedEventArgs e)
      {</p>
  
  <pre><code>        if (((sender as Run).DataContext as DataRowView)[8].ToString() == "OffLine")
          {
              (sender as Run).Foreground = new SolidColorBrush(Color.FromRgb(255, 0, 0));
          }
          else
          {
              (sender as Run).Foreground = new SolidColorBrush(Color.FromRgb(0, 255, 0));
          }
  
      }
  </code></pre>
  
  <p>Now am localizing my solution .I am changing english language to chinese.
  That time header connection state will convert to chinese.
  But am not able to see the value inside the Connectionstate column</p>
  
  <p>when change the language,the property also need to change.How to do that?</p>
  
  <p>How to solve this?</p>