title: WPF Grid - How to apply a style for just one column?
body: <p>I have a WPF Grid with many rows and columns, all containing things like TextBlocks and TextBoxes.</p>
  
  <p>For this specific situation I want all the stuff in column 1 to have padding, and all the stuff in column 2 to be aligned right. It seems to be very non-WPF to have to set those properties on each item in the grid.</p>
  
  <p>I know I can create a style for all TextBlocks within a grid by doing something like this:</p>
  
  <pre><code>&lt;Grid&gt;
    &lt;Grid.Resources&gt;
      &lt;Style TargetType="{x:Type TextBox}"&gt;
        &lt;Setter Property="HorizontalAlignment" Value="Right"/&gt;
      &lt;/Style&gt;
    &lt;/Grid.Resources&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p>But is there a way to apply that style to only the controls in say, column 2?</p>
  
  <p>Should I be using a different control?</p>