工具提示样式 ToolTipService.ShowDuration
ToolTip Style ToolTipService.ShowDuration
属性ToolTipService.ShowDuration不受影响
其他属性设置
如何通过 Style 设置 ToolTipService.ShowDuration?
<Style TargetType="ToolTip">
<Setter Property="FontFamily" Value="Segoe UI SemiLight" />
<Setter Property="ToolTipService.ShowDuration" Value="20000" />
<Setter Property="Foreground" Value="{StaticResource BrushLightBlue}" />
</Style>
具体来说,我在使用 MenuItem 时遇到了这个问题
TooltipService.ShowDuration
附加 属性 应该设置在具有 ToolTip
的元素上。例如:
<Style TargetType="{x:Type Button}">
<Setter Property="ToolTipService.ShowDuration" Value="20000" />
</Style>
对于 MenuItem 这应该有效
<Style TargetType="Menu">
<Style.Resources>
<Style TargetType="MenuItem">
<Setter Property="ToolTipService.ShowDuration" Value="20000"/>
</Style>
</Style.Resources>
</Style>
属性ToolTipService.ShowDuration不受影响
其他属性设置
如何通过 Style 设置 ToolTipService.ShowDuration?
<Style TargetType="ToolTip">
<Setter Property="FontFamily" Value="Segoe UI SemiLight" />
<Setter Property="ToolTipService.ShowDuration" Value="20000" />
<Setter Property="Foreground" Value="{StaticResource BrushLightBlue}" />
</Style>
具体来说,我在使用 MenuItem 时遇到了这个问题
TooltipService.ShowDuration
附加 属性 应该设置在具有 ToolTip
的元素上。例如:
<Style TargetType="{x:Type Button}">
<Setter Property="ToolTipService.ShowDuration" Value="20000" />
</Style>
对于 MenuItem 这应该有效
<Style TargetType="Menu">
<Style.Resources>
<Style TargetType="MenuItem">
<Setter Property="ToolTipService.ShowDuration" Value="20000"/>
</Style>
</Style.Resources>
</Style>