title: How to add a Template/DataTemplate to a TableCell
body: <p>I googled around but I did't find any really useful stuff;
  my purpose is to display a specified <code>DataTemplate</code> for a specified <code>Class</code>:</p>
  
  <pre><code>    &lt;FlowDocumentScrollViewer&gt;
          &lt;FlowDocument&gt;
              &lt;Table BorderBrush="Black" BorderThickness="1" CellSpacing="0"&gt;
                  &lt;Table.Columns&gt;
                      &lt;TableColumn&gt;&lt;/TableColumn&gt;
                      &lt;TableColumn&gt;&lt;/TableColumn&gt;
                      &lt;TableColumn&gt;&lt;/TableColumn&gt;
                      &lt;TableColumn&gt;&lt;/TableColumn&gt;
                  &lt;/Table.Columns&gt;
                  &lt;Table.RowGroups&gt;
                      &lt;TableRowGroup &gt;
                          &lt;TableRow&gt;
                              &lt;TableCell&gt;DataTemplate1&lt;/TableCell&gt;//class1
                              &lt;TableCell&gt;DataTemplate2&lt;/TableCell&gt;//class2
                              &lt;TableCell&gt;DataTemplate3&lt;/TableCell&gt;//class3
                              &lt;TableCell&gt;DataTemplate4&lt;/TableCell&gt;//class4
                          &lt;/TableRow&gt;
                      &lt;/TableRowGroup&gt; 
                  &lt;/Table.RowGroups&gt;
              &lt;/Table&gt;
          &lt;/FlowDocument&gt;
      &lt;/FlowDocumentScrollViewer&gt;
  </code></pre>
  
  <p>Important it must be a XAML only solution because I load this xaml per <code>XamlReader.Load()</code> so there wont be a codebehind file.</p>