This question is locked. New answers and comments are not allowed.
This is just a general question about when to use the datatemplate when styling a cell. I've seen examples where you style using:
and other examples of where you include the datatemplate:
What is the rule of thumb in these situations?
| <Style x:Key="cellStyle" TargetType="telerikGrid:GridViewCell" > |
| <Setter Property="Template"> |
| <Setter.Value> |
| <ControlTemplate TargetType="telerikGrid:GridViewCell"> |
| <StackPanel Orientation="Vertical"> |
| <TextBlock Text="{Binding name}"/> |
| <TextBlock Text="{Binding address}"/> |
| </StackPanel> |
| </ControlTemplate> |
| </Setter.Value> |
| </Setter> |
| <Style x:Key="cellStyle2" TargetType="telerikGrid:GridViewCell" > |
| <Setter Property="ContentTemplate"> |
| <Setter.Value> |
| <DataTemplate> |
| <StackPanel Orientation="Vertical"> |
| <TextBlock Text="{Binding name}"/> |
| <TextBlock Text="{Binding address}"/> |
| </StackPanel> |
| </DataTemplate> |
| </Setter.Value> |
| </Setter> |
| </Style> |
