title: How to bind children of ItemsControl on a custom user control to a 2D array WPF C#?
body: <p>I have a custom user control in XAML that creates a ItemsControl which ItemsPanel is a 15 * 15 uniform grid. The ItemsControl is then populated with Cells on startup.</p>
  
  <pre><code>&lt;UserControl x:Class="Words.GameBoard"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
           xmlns:Words="clr-namespace:Words"
           xmlns:Cell="Words.CellCollection"
           xmlns:CellTile="Words.Cell"
           mc:Ignorable="d" 
           d:DesignHeight="300" d:DesignWidth="300"&gt;
  &lt;UserControl.Resources&gt;
      &lt;Words:CellCollection x:Key="CellCollectionData"&gt;
      &lt;/Words:CellCollection&gt;
      &lt;Style TargetType="ItemsControl"&gt;
          &lt;Setter Property="ItemsPanel"&gt;
              &lt;Setter.Value&gt;
                  &lt;ItemsPanelTemplate&gt;
                      &lt;UniformGrid IsItemsHost="True" Margin="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/&gt;
                  &lt;/ItemsPanelTemplate&gt;
              &lt;/Setter.Value&gt;
          &lt;/Setter&gt;
          &lt;Setter Property="ItemTemplate"&gt;
              &lt;Setter.Value&gt;
                  &lt;DataTemplate&gt;
                      &lt;Words:Cell&gt;
                      &lt;/Words:Cell&gt;
                  &lt;/DataTemplate&gt;
              &lt;/Setter.Value&gt;
          &lt;/Setter&gt;
      &lt;/Style&gt;
  &lt;/UserControl.Resources&gt;
  &lt;ItemsControl Name="BoardControl"&gt;
  &lt;/ItemsControl&gt;
  </code></pre>
  
  <p></p>
  
  <p>The control is added to the MainWindow like this</p>
  
  <pre><code>            &lt;clr:GameBoard&gt;
              &lt;/clr:GameBoard&gt;
  </code></pre>
  
  <p>How do i bind the Items of a ItemsControl to a Array? I don't need Observables and stuff, I just want the Items to refresh when I click a button. Is this possible? I've very new to both C# and XAML</p>
  
  <p>Thanks</p>