title: How to create DataGrid with fixed number of columns?
body: <p>I have DataGrid control with fixed count of columns (5 columns), which is created via following code:</p>
  
  <pre><code>    m_dictionary_data = new DataGrid();
      {
          //  Dictionary data initialization
          {
              //  Columns generation
              m_dictionary_data.Columns.Add(new DataGridTextColumn() { Header = "Color name", Width = 100 });
              m_dictionary_data.Columns.Add(new DataGridTextColumn() { Header = "Color", Width = 100 });
              m_dictionary_data.Columns.Add(new DataGridTextColumn() { Header = "R", Width = 100 });
              m_dictionary_data.Columns.Add(new DataGridTextColumn() { Header = "G", Width = 100 });
              m_dictionary_data.Columns.Add(new DataGridTextColumn() { Header = "B", Width = 100 });
          }
      }
  </code></pre>
  
  <p>I have such picture:</p>
  
  <p><a href="https://i.stack.imgur.com/jCIOr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jCIOr.png" alt="enter image description here"></a></p>
  
  <p>This data grid has extra right 6th column</p>
  
  <p>How can I create data grid with fixed count of columns? (I want to remove extra empty column)</p>
  
  <p>EDIT: I made mistake. Actually my data grid has 5 columns. Rest part of control is just extra space</p>