hi,
iam using xamdatagrid and i had set style for one of the cell value as follows.
<igDP:FieldSettings.CellValuePresenterStyle>
<Style TargetType="{x:Type igDP:CellValuePresenter}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate> <StackPanel Orientation="Horizontal"> <Button x:Name="edit_btn" Content="Edit" Margin="3,3,0,3" Width="50" Height="Auto" Command="{Binding RelativeSource={RelativeSource AncestorType={x:Type igDP:XamDataGrid} }, Path=DataContext.Commands.DeleteProjectReferenceCommand}"> <Button.Template> <ControlTemplate> <Image Source="pack://application:,,,/Cet.BaseModule.Client;component/Images/delete.ico" Width="16" Height="16"/> </ControlTemplate> </Button.Template>
</Button> </StackPanel> </ControlTemplate> </Setter.Value> </Setter> <Setter Property="BorderBrush" Value="red"></Setter> <Setter Property="BorderThickness" Value="0,1,0,1"></Setter> </Style>
</igDP:FieldSettings.CellValuePresenterStyle>
but the problem is that after applying this style ,the border is not displaying .
how can i set border for cell value presenter with this style.??
if any idea ,pls share me.
Jafar VM
Regards.
Hello Jafar ,
I am just checking if you require any further assistance on the matter.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics
www.infragistics.com/support
Hello Jafar,
Thank you for your post. I have been reading through it and the reason for the border of the CellValuePresenter to not appear is that you have changed the default template of the CellValuePresenter and it does not contains a Border, which should display the border settings. What I can suggest is wrapping the StackPanel of the Template of the CellValuePresenter in a Border and bind the BorderBrush and BorderThickness of that border to the same properties of the CellValuePresenter. By doing so, the Border will have the appearance set by the setters of the CellValuePresenter. I have created a sample application for you, based on the style that you have provided, which shows how you can implement this approach.
Please let me know if you need any further assistance on the matter.