hi,
i have style for xamdatagrid cellvalue presenter as follows..
<Style x:Key="CheckBoxFeild" TargetType="{x:Type igDP:CellValuePresenter}"> <Setter Property="BorderThickness" Value="0,0,1,1"/> <Setter Property="BorderBrush" Value="DarkGray"/> <Setter Property="HorizontalContentAlignment" Value="Center"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type igDP:CellValuePresenter}"> <StackPanel x:Name="ImagePanel" Orientation="Horizontal" HorizontalAlignment="Center" > <Border BorderThickness="0,0,1,1" Width="30" BorderBrush="DarkGray" > <CheckBox HorizontalAlignment="Center" VerticalAlignment="Center" IsChecked="{Binding Path=DataItem.IsChecked,Mode=TwoWay}"> </CheckBox> </Border> </StackPanel> </ControlTemplate> </Setter.Value> </Setter> </Style>
But when the grid is populated,cell border is not displayed.
is there any way to set cell border when we apply template to cell value presenter???
thanks...
Hi Jafar,
Try with removing the StackPanel from your ControlTemplate and also remove the Width of the Border. That way the Border should take the whole size of the Cell.
Thanks,
George
hi george,
thanks for ur reply..its working fine..
Regards,
Jafar VM