【问题标题】:Why is this tooltip still enabled?为什么仍然启用此工具提示?
【发布时间】:2020-05-21 23:20:12
【问题描述】:

我正在开发一个 WPF 应用程序,并且我正在尝试有条件地启用工具提示。这很奇怪,我意识到即使我明确地将工具提示设置为未启用 (ToolTipService.IsEnabled="False"),工具提示仍然会出现。谁能弄清楚这里发生了什么?

 <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>

【问题讨论】:

    标签: c# wpf xaml telerik


    【解决方案1】:

    设置ToolTipService.ShowOnDisabled = false;

    ToolTipService.ShowOnDisabled

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-04-17
      • 2010-12-22
      • 2011-07-28
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多