title: DataGridTemplateColumn : Items collection must be empty before using ItemsSource.
body: <p>Why is the error code :</p>
  
  <pre><code>        &lt;dg:DataGrid  Name="dataGrid" AutoGenerateColumns="False"                                  
                  HeadersVisibility="Column" SelectedIndex="-1" Margin="0,315,0,0" Background="#FF484040" BorderBrush="#FF484040"&gt;
          &lt;dg:DataGrid.Columns&gt;
              &lt;dg:DataGridTextColumn Binding="{Binding IdBook}" Header="IdBook"&gt;&lt;/dg:DataGridTextColumn&gt;
              &lt;dg:DataGridTextColumn Binding="{Binding NameBook}" Header="NameBook"&gt;&lt;/dg:DataGridTextColumn&gt;
              &lt;dg:DataGridTextColumn Binding="{Binding Author}" Header="Author"&gt;&lt;/dg:DataGridTextColumn&gt;
          &lt;/dg:DataGrid.Columns&gt;
  
          &lt;dg:DataGridTemplateColumn Header="Delete"&gt;
  
              &lt;dg:DataGridTemplateColumn.CellTemplate&gt;
                  &lt;DataTemplate&gt;
                      &lt;Button Style="{DynamicResource GlassButton}" Background="{DynamicResource DeleteButton}"&gt;
  
                      &lt;/Button&gt;
                  &lt;/DataTemplate&gt;
              &lt;/dg:DataGridTemplateColumn.CellTemplate&gt;
  
              &lt;/dg:DataGridTemplateColumn&gt;
      &lt;/dg:DataGrid&gt;
  </code></pre>
  
  <p>The following code is correct :</p>
  
  <pre><code>        &lt;dg:DataGrid  Name="dataGrid" AutoGenerateColumns="False"                                  
                  HeadersVisibility="Column" SelectedIndex="-1" Margin="0,315,0,0" Background="#FF484040" BorderBrush="#FF484040"&gt;
          &lt;dg:DataGrid.Columns&gt;
              &lt;dg:DataGridTextColumn Binding="{Binding IdBook}" Header="IdBook"&gt;&lt;/dg:DataGridTextColumn&gt;
              &lt;dg:DataGridTextColumn Binding="{Binding NameBook}" Header="NameBook"&gt;&lt;/dg:DataGridTextColumn&gt;
              &lt;dg:DataGridTextColumn Binding="{Binding Author}" Header="Author"&gt;&lt;/dg:DataGridTextColumn&gt;
          &lt;/dg:DataGrid.Columns&gt;
  
      &lt;/dg:DataGrid&gt;
  </code></pre>
  
  <p>But I can not be add button to datagrid</p>