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 7066341
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:04:16+00:00 2026-05-28T05:04:16+00:00

I have a WPF application and am using the WPF toolkit autocomplete box in

  • 0

I have a WPF application and am using the WPF toolkit autocomplete box in VS 2008. I am getting inconsistent results for the SelectedItem property.

My ItemSource data is like the following (in an object)

Address X - Person A
Address X - Person B

So its two records, with the same address but each record has a different person listed. My searches in the autocomplete box are by address (which is also my ValueMemberPath). So when Address X is typed in, both of these names pop-up, no problems there. However, if I were to choose Person B from the drop-down list (i.e. the second record) the SelectedItem property is ALWAYS the object for Person A. No matter how I select the records or what not, SelectedItem is always Person A, I can never get SelectedItem to return Person B.

What am I doing wrong?

  • 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-28T05:04:16+00:00Added an answer on May 28, 2026 at 5:04 am

    When selecting items by value in an AutocompleteBox/ListBox/ComboBox you should make sure the selected value is unique in the list of items (like an ID of some sort), because the control doesn’t know which item to choose when there are two items with the same key property. So it sends a random one (the first, since this isn’t actually an expected use case) back to the viewmodel.

    It’s the same problem you’d have when I told you that there were two possible items (“Kendo Suit”, “Keyboard”) from which I owned the one that started with a ‘K’ and you had to tell me which item I meant.

    I hope my example is comprehensible enough 😉

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

Sidebar

Related Questions

I have a WPF application with the autocomplete box via the toolkit (VS 2008).
I have a WPF Application using Fluent NHibernate 1.0 RTM and System.Data.SQLite 1.0.65 that
I have a very simple WPF application in which I am using data binding
I have this WPF application using NHibernate and lazy data loading. I also use
I am developing an application using WPF/MVVM. I have a WCF data service project
I have a .Net 4.0 WPF application using a data grid. Currently after sorting
I have a WPF application using Aero Glass. When using the application under a
In my WPF application I have some drawing functionality. I have solved this using
Using the MVVM pattern creating WPF applications you have the ViewModel providing data to
I have a WPF application in VS 2008 with some web service references. For

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.