title: How to display empty readonly row in DataGrid only for empty ItemsSource?
body: <p>I overrided DataGrid witn my class KDataGrid (needed some functionality for our purposes).  </p>
  
  <pre><code>public class KDataGrid : System.Windows.Controls.DataGrid { *** }
  </code></pre>
  
  <p>It can be used with any collection with any RecordType (generic type). </p>
  
  <p>Example XAML with simple KDataGrid:  </p>
  
  <pre><code>&lt;components:KDataGrid
      CanUserAddRows="False"
      IsReadOnly="True"
      ItemsSource="{Binding Path=SomeCollection}"&gt;
      &lt;DataGrid.Columns&gt;
          &lt;DataGridTextColumn
              Header="ID"
              Binding="{Binding Id}"
              Width="50"/&gt;
          &lt;DataGridTextColumn
              Header="Code"
              Binding="{Binding Code}"
              Width="130"/&gt;
      &lt;/DataGrid.Columns&gt;
  &lt;/components:KDataGrid&gt;
  </code></pre>
  
  <p>ViewModel contains:</p>
  
  <pre><code>public class SomeRecord: BaseRecord
      {
          public long ID { get; set; }
          public string Code { get; set; }
      }
  
  public List&lt;SomeRecord&gt; SomeCollection { get; }
  </code></pre>
  
  <p>KDataGrid (DataGrid) is readonly. Because of that standart empty row in bottom of DataGrid not shows.<br>
  If collection <em>SomeCollection</em> is empty, it's not possible to set focus on DataGrid (for add new record for example).  </p>
  
  <p>Easiest way to fix that (as I think) is: display empty row (which is focusable).<br>
  But if collection contains at least one row thats not need to display empty row.</p>
  
  <p>Is there any ideas how can I do that ?</p>