WPF Programmatically add DataGridTextColumn with DataTrigger
<p>I have a <code>DataGrid</code> that is made of dynamically by the user.  That means each time it runs the columns could and will be very different.  Each column is programmatically added for that reason.  I need to add some <code>DataTriggers</code> to it so figured this would work:</p>

<pre><code>Style style = new Style();
style.TargetType = typeof(DataGridTextColumn);
DataTrigger tg = new DataTrigger()
{
    Binding = new Binding(value),
    Value = "bad data"
};
tg.Setters.Add(new Setter()
{
    Property = UIElement.VisibilityProperty,
    Value = Visibility.Hidden
});
</code></pre>

<p>While this gives no errors in the IDE when run it crashes and gives me 
<code>'DataGridTextColumn' type must derive from FrameworkElement or FrameworkContentElement.</code></p>

<p>What is the correct way of adding a <code>DataTrigger</code> to a <code>DataGridTextColumn</code> Programmatically</p>