xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="WpfApplication1.Window1"
Title="Add Content to a Table">
TableRow
//File:Window.xaml.cs
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
namespace WpfApplication1
{
public partial class Window1 : Window
{
public void AddRow(object sender, RoutedEventArgs e)
{
TableRow row = new TableRow();
trg1.Rows.Add(row);
Paragraph para = new Paragraph();
para.Inlines.Add("A new Row and Cell have been Added to the Table");
TableCell cell = new TableCell(para);
row.Cells.Add(cell);
}
}
}