title: Clearing out a Dependency Property
body: <p>I'm having some issues updating a dependency property from a standard property. </p>
  
  <p>If I set the property to null or update it with new data I was under the impression that it would reset the dependency property. However it looks as tho it just piles the new data on top.</p>
  
  <p>Here's a couple of properties / dependency properties I'm using:</p>
  
  <p><strong>Dependency Properties</strong></p>
  
  <pre><code>public static readonly DependencyProperty DataTableChartProperty = DependencyProperty.Register
      ("DataTableChart", typeof(DataTable), typeof(MainWindowViewModel));
  
  public static readonly DependencyProperty ContentElementProperty = DependencyProperty.Register
      ("ContentElement", typeof(FrameworkElement), typeof(MainWindowViewModel));
  </code></pre>
  
  <p><strong>Standard Properties</strong></p>
  
  <pre><code>public DataTable DataTableChart
  {
      get { return (DataTable)this.GetValue(DataTableChartProperty); }
      set { this.SetValue(DataTableChartProperty, value); }
  
  public FrameworkElement ContentElement
  {
      get { return (FrameworkElement)this.GetValue(ContentElementProperty); }
      set { this.SetValue(ContentElementProperty, value); }
  }
  </code></pre>
  
  <p>I would greatly appreciate any suggestions. Thanks in Advance!</p>
  
  <p>This is how I'm setting it for now... for testing...</p>
  
  <pre><code>void _bw_DoWork(object sender, DoWorkEventArgs e)
      {
          var loadLog = new LoadLog();
          e.Result = loadLog.LoadCaseLogs(SelectedFiles);
      }
  
      void _bw_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
      {
          DataTableChart = null;
          ContentElement = null;
          ContentElement = blah;
          DataTableResult = e.Result as DataTable;
          DataTableChart = caseData.LoadUserData(DataTableResult);
  
          LoadingScreen = false;
      }
  
  public ChartControl blah = new ChartControl();
  </code></pre>