Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
200
ContentTemplate for CellValuePresenter will not size to the content's height when the content is a wrapped TextBox
posted

This is the ContentTemplate for my XamDataGrid Field.  No matter what I do, the cell height will not expand to accommodate the TextBlock.  Please help.  thanks

<Style x:Key="CellValuePresenterStyle" TargetType="{x:Type igDP:CellValuePresenter}">

<Setter Property="ContentTemplate">

<Setter.Value>

<DataTemplate>

<TextBlock Text="{Binding Comment}" DataContext="{Binding DataContext.DataItem, RelativeSource={RelativeSource AncestorType={x:Type igDP:CellValuePresenter}}}" TextWrapping="Wrap">

</TextBlock>

</DataTemplate>

</Setter.Value>

</Setter>

</Style>

WpfApplication3.zip
Parents Reply Children