Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 960689
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T01:13:18+00:00 2026-05-16T01:13:18+00:00

I have a list box in WPF as under <ListBox Name=lstName DisplayMemberPath =ListName ToolTip={Binding

  • 0

I have a list box in WPF as under

<ListBox Name="lstName" DisplayMemberPath ="ListName" ToolTip="{Binding Path=ListName}" />

My requirement is that what ever items I am displaying in the listbox, should also appear in the tooltip. i.e. if the items are say “Item1”, “Item2” etc. then when the user will point(hover) to “Item1” through mouse, the toolltip should display “Item1”. Same for others

So my DisplayMemberPath is set to the Property which I am supposed to display (and it is coming properly). However, the tooltip is not coming at all.

The entity is as under

public class ItemList
{
  public string ListName { get; set; }
}

The binding is happening as under

this.lstName.ItemsSource = GetData(); // Assume that the data is coming properly
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T01:13:18+00:00Added an answer on May 16, 2026 at 1:13 am

    Instead of setting the ToolTip property on the ListBox, set it on the ListBoxItems by applying a style:

    <ListBox Name="lstName" DisplayMemberPath="ListName">
        <ListBox.ItemContainerStyle>
            <Style TargetType="ListBoxItem">
                <Setter Property="ToolTip" Value="{Binding ListName}"/>
            </Style>
        </ListBox.ItemContainerStyle>
    </ListBox>
    

    That way, each ListBoxItem will have its own tooltip that displays the value for that item.

    Since you are setting the ItemsSource on the ListBox directly, you probably haven’t set a DataContext, so the Binding won’t work there. If you do set the DataContext to the list, then that binding would display the currently selected item as the tooltip no matter where the mouse was on the ListBox.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to have a wpf combobox that displays the dropdown list box with
Hi I have made checked List Box in WPF but the binding is not
I have a WPF application that has a list box of images. Right now
I have a list box control: <asp:ListBox runat=server id=lbox autoPostBack=true /> The code behind
I have a asp:ListBox wrapped inside an asp:UpdatePanel. The list box contains all the
I have a list box that contains a list of WorkItems (from TFS). I
I have WPF ListBox which is bound to a ObservableCollection, when the collection changes,
I have a WPF ListBox bound to a data object. Inside the listbox are
I have a WPF listbox which displays messages. It contains an avatar on the
Each item in a WPF ListBox control seems to have a bit of left

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.