title: How to set font size of Grid using Slider in WPF
body: <p>I am created WPF Project. In this i  have used GridControl and Slider! I have used slider Value to change FontSize of GridControl via <code>Binding</code> and <code>INotifyProperty</code>. Problem is that it changes value of FontSize but it doesn't apply and generated <code>Null Object Reference Error</code> at:</p>
  
  <p><strong>CS FILE:</strong></p>
  
  <pre><code>private void Slider_ValueChanged(object sender, RoutedPropertyChangedEventArgs&lt;double&gt; e)
          {
              // ... Get Slider reference.
              var slider = sender as Slider;
              // ... Get Value.
              double value = slider.Value;
              // ... Set Window Title.
              this.grid.FontSize = value;   // Error HERE
          }
  </code></pre>
  
  <p><strong>XAML CODE</strong></p>
  
  <pre><code> &lt;Grid&gt;
             &lt;Slider Minimum="15" Maximum="30" Value="{Binding GridFontSize, Mode=TwoWay}" ValueChanged="Slider_ValueChanged" /&gt;
  
             &lt;dxg:GridControl AutoGenerateColumns="AddNew" Name="grid"  Margin="0,25,0,0"&gt;
              &lt;dxg:GridControl.View&gt;
                           &lt;dxg:TableView Name="View" AllowEditing="False" ShowTotalSummary="True" PreviewMouseDown="View_PreviewMouseDown" MouseDown="View_MouseDown"  /&gt;
                 &lt;/dxg:GridControl.View&gt;
              &lt;/dxg:GridControl&gt;
      &lt;/Grid&gt;
  </code></pre>
  
  <p>How to solve this Problem? Can anyone answer my query?</p>