Reputation: 4179
How I can add ToolTip to this code ?
<Style TargetType="{x:Type ListBoxItem}">
</Style>
Upvotes: 0
Views: 318
Reputation: 143
For a more complex ToolTip use
<Style TargetType="{x:Type ListBoxItem}">
<Setter Property="ToolTip">
<Setter.Value>
<!--Content Here-->
<!--<Grid> or <StackPanel> or <ContentPresenter>...-->
</Setter.Value>
</Setter>
</Style>
Upvotes: 0
Reputation: 4149
You can set ToolTip property in a style the same way you set any other property.
Sample code as below
<Style TargetType="{x:Type ListBoxItem}">
<Setter Property="ToolTip" Value="ToolTip Value" />
</Style>
Upvotes: 2