Skip to content

How to add tooltip for each item in listbox in WPF? #7564

Answered by miloush
VahidEra asked this question in Q&A
Discussion options

You must be logged in to vote

If you just want the tooltip to be the same as the content, in your ItemContainerStyle you can do

<Setter Property="ToolTip" Value="{Binding}" />

If you want it to be different, you would need to be either adding your own class to the ListBox.Items that can hold both content and tooltip and databind to these properties, or, you would need to be explicitly adding ListBoxItem and use its Content and ToolTip properties.

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@VahidEra
Comment options

Answer selected by VahidEra
Comment options

You must be logged in to vote
3 replies
@miloush
Comment options

@VahidEra
Comment options

@miloush
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants