wpf工具提示和样式
如何将工具提示添加到此代码中wpf工具提示和样式,wpf,xaml,tooltip,Wpf,Xaml,Tooltip,如何将工具提示添加到此代码中 可以使用与设置任何其他属性相同的方式设置样式中的工具提示属性 示例代码如下所示 <Style TargetType="{x:Type ListBoxItem}"> <Setter Property="ToolTip" Value="ToolTip Value" /> </Style> 了解更复杂的工具提示使用 <Style TargetType="{x:Type ListBoxItem}">
可以使用与设置任何其他属性相同的方式设置样式中的工具提示属性 示例代码如下所示
<Style TargetType="{x:Type ListBoxItem}">
<Setter Property="ToolTip" Value="ToolTip Value" />
</Style>
了解更复杂的工具提示使用
<Style TargetType="{x:Type ListBoxItem}">
<Setter Property="ToolTip">
<Setter.Value>
<!--Content Here-->
<!--<Grid> or <StackPanel> or <ContentPresenter>...-->
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type ListBoxItem}">
<Setter Property="ToolTip">
<Setter.Value>
<!--Content Here-->
<!--<Grid> or <StackPanel> or <ContentPresenter>...-->
</Setter.Value>
</Setter>
</Style>