Hi,
I have a problem hiding tooltip on the cell, so I thought that maybe someone already had this problem and could help. I generate the datagrid dynamically in the code behind(I get binding strings from a service call for the columns) and some of the columns have tooltips. I use the ToolTipTemplate property on the column to assign the tooltip. I generate the tooltips for the columns on the fly by calling a method which returns the following
Everything works fine till here. But the problem comes when there is no value present and an empty tooltip is displayed for the cells (in the column) which doesnt have a string value to show.
How can I hide this empty tooltip and show the tooltip when there is value to show?
Thanks in advance
YK
I have a problem hiding tooltip on the cell, so I thought that maybe someone already had this problem and could help. I generate the datagrid dynamically in the code behind(I get binding strings from a service call for the columns) and some of the columns have tooltips. I use the ToolTipTemplate property on the column to assign the tooltip. I generate the tooltips for the columns on the fly by calling a method which returns the following
return
(DataTemplate)XamlReader.Load(@"<DataTemplate xmlns=""http://schemas.microsoft.com/client/2007"">
<TextBlock Text=""{Binding "
+ toolTip + @"}"" TextWrapping=""Wrap"" MaxWidth=""200""/>
</DataTemplate>"
);
Everything works fine till here. But the problem comes when there is no value present and an empty tooltip is displayed for the cells (in the column) which doesnt have a string value to show.
How can I hide this empty tooltip and show the tooltip when there is value to show?
Thanks in advance
YK