I have the following code:
<DataTemplate>
<!--<sdk:DataGridTextColumn Binding="{Binding Description}" Header="Description" Width="205" />-->
<TextBlock Text="{Binding Description}" Width="232">
<ToolTipService.ToolTip >
<ToolTip Visibility="{Binding }">
<sdk:DataGrid AutoGenerateColumns="False" GridLinesVisibility="None" HeadersVisibility="None" Height="Auto" ItemsSource="{Binding Contains}" >
<sdk:DataGrid.Columns>
<sdk:DataGridTextColumn Binding="{Binding Code}" Header="Code" CanUserSort="False" />
<sdk:DataGridTextColumn Binding="{Binding Description}" Header="Description" CanUserSort="False"/>
</sdk:DataGrid.Columns>
</sdk:DataGrid>
</ToolTip>
</ToolTipService.ToolTip>
</TextBlock>
</DataTemplate>
I would like my tooltip to show, only if there are at least one row in the ItemsSource="{Binding Contains}"
What do I have to write in the Visibility
property?
Something like
<ToolTip Visibility="{Binding Contains.Length > 0}">
But I can't figure out what the syntax should be! Any ideas?