Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tooltip is not visible on the disabled checkbox wpf

Tooltip is not visible on disabled checkbox even after setting ToolTipService.ShowOnDisabled="True".

<CheckBox Grid.Column="0" HorizontalAlignment="Center" Visibility="{Binding Converter={StaticResource TaskCompletionVisbilityConverter},ConverterParameter='chkbox'}" 
                             Height="16" Width="16" Foreground="{Binding Converter={StaticResource TaskColorConverter}}"
                               ToolTipService.ShowOnDisabled="True" ToolTipService.IsEnabled="True"
                              ToolTip="Check To complete Task"
                               IsEnabled="{Binding State, Converter={StaticResource EnableDisableConverter},
                        ConverterParameter='checkbox',Mode=TwoWay}" Margin="37,5,0,0">
like image 779
Pa1 Avatar asked Aug 27 '15 08:08

Pa1


2 Answers

Your code works for me. ToolTipService.ShowOnDisabled="True" should be what you need.

Please check that you haven't set IsHitTestVisible to false in any Style/ControlTemplate associated with the checkbox.

Setting IsHitTestVisible to false means that it will ignore any mouse events associated with the control and so you won't get the tooltip.

like image 85
spaceplane Avatar answered Oct 11 '22 18:10

spaceplane


ToolTipService.ShowOnDisabled="True" was not working for me. Below works :

<DataGridCheckBoxColumn.CellStyle>
    <Style>                                     
        <Setter Property="ToolTipService.ShowOnDisabled" Value="True" />
    </Style>                                 
</DataGridCheckBoxColumn.CellStyle>
like image 20
Palash Roy Avatar answered Oct 11 '22 18:10

Palash Roy