Search code examples
c#wpfxamltelerik

Why is this tooltip still enabled?


I am working on a WPF app, and I am trying to make a tooltip conditionally enabled. It was being odd, and I realized that even when I explicitly set the tooltip to not enabled (ToolTipService.IsEnabled="False"), the tooltip still shows up. Can anyone figure out what is going on here?

 <TextBlock Grid.Row="2"
    Grid.Column="0"
    VerticalAlignment="Center"
    FontSize="15"
    ToolTipService.IsEnabled="False"
    Visibility="{Binding IsConnected, Converter={StaticResource BooleanToVisibilityConverter}}">
    <fa:ImageAwesome Icon="{Binding Path=BatteryLevelIcon, UpdateSourceTrigger=PropertyChanged}"
       Height="20"
       Width="20"
       Foreground="Green"
       Visibility="{Binding IsConnected, Converter={StaticResource BooleanToVisibilityConverter}}" />
    <ToolTipService.ToolTip>
       <TextBlock>
          <TextBlock.Text>
             <MultiBinding StringFormat="{}{0}%">
                <Binding Path="BatteryPercentage" />
             </MultiBinding>
          </TextBlock.Text>
       </TextBlock>
    </ToolTipService.ToolTip>
 </TextBlock>

Solution

  • Set ToolTipService.ShowOnDisabled = false;

    ToolTipService.ShowOnDisabled