how to set row VerticalAlignment/VerticalContentAlignment ?

Dec 7, 2009 at 7:21 AM
Edited Dec 7, 2009 at 7:28 AM

I want to set the text/content of a row to at bottom, with space above (increased the height) during the dataGrid.LoadingRow event.

e.Row.Height = 30;
e.Row.VerticalAlignment = VerticalAlignment.Bottom;
e.Row.VerticalContentAlignment = VerticalAlignment.Bottom;

It didnt work. so I tried:

<Style x:Key="vBtm" TargetType="{x:Type my:DataGridRow}">
  <Setter Property="VerticalAlignment" Value="Bottom" ></Setter>
  <Setter Property="VerticalContentAlignment" Value="Bottom" ></Setter>

e.Row.Style = (Style)Resources["vBtm"];

still doesn't work.

can anyone help?