I am displaying tool tip with specific field of XDG altering cellpresentorvalue tooltip data template. It is working fine, it just it had added a new line to the column of associated field which looks weired.
Can you suggest the reason and workaround to get rid of that line.
Can you show me how you are altering the tooltip template and how you are applying it to the XamDataGrid?
Where is the new line exactly? In the column header or in the data cells for that column?
Please find the below snippet. Line appears to right most boundary of the cell area of field for which we are showing tooltip.
<igDP:TextField Name="Field" Label="Field1" AllowEdit="False">
<igDP:Field.Settings>
<igDP:FieldSettings>
<igDP:FieldSettings.CellValuePresenterStyle>
<Style TargetType="{x:Type igDP:CellValuePresenter}">
<Setter Property="ToolTip">
<Setter.Value>
<ItemsControl ItemsSource="{Binding DataItem.ToolTipEntityCollection}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Vertical"></StackPanel>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Label Grid.Column="0" Content="{Binding TooltipData1}"></Label>
<Label Grid.Column="1" Content="{Binding TooltipData2}"></Label>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</Setter.Value>
</Setter>
</Style>
</igDP:FieldSettings.CellValuePresenterStyle>
</igDP:FieldSettings>
</igDP:Field.Settings>
</igDP:TextField>
Hi Tarun,
OH! You must have a theme applied and that theme gets rid of the column lines by default. When you provide your own CellValuePresenter style you are overriding the styling provided by the theme so you end up seeing the line.
You should modify your CellValuePresenter style and base it on the theme you are using. For example, if you are using the IGTheme then your style should look like this:
xmlns:igThemes="http://infragistics.com/Themes"
<Style TargetType="{x:Type igDP:CellValuePresenter}" BasedOn="{x:Static igThemes:DataPresenterIGTheme.CellValuePresenter}">
Hope this makese sense. Let me know if you have any questions.
You were absolutely right, some other theme was interfering in cellvaluepresenter style, many Thanks.