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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T05:46:58+00:00 2026-05-19T05:46:58+00:00

Well..its working BUT only when user creates a property that is of type List.

  • 0

Well..its working BUT only when user creates a property that is of type List.

Here’s the complete scenario.

I have a templated control (Multi Select ComboBox with Checkboxes)
User gives a List/ObservableCollection as its ItemsSource. The collection can be of any type (Employee, Chair, Person etc). The DependencyProperty for ItemsSource is of Type IList.

User can also give a List with two-way binding in a DependencyProperty called SelectedItems (so that he can show some items as checked and get back the items which gets checked)

Now the issue is with the SelectedItems dp. It is of type IList in the templated control.
The two-way binding does not work if user has bind it to, say, List<Person>.
But it works if List<Person> is changed to List<object>.

I cant figure out what is it that I am not doing right!

  • 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-19T05:46:59+00:00Added an answer on May 19, 2026 at 5:46 am

    It doesn’t make sense to place a TwoWay binding on the SelectedItems property. This would imply that the control should create and assign an instance of an object implementing IList to the property on the source object. However there is no way for control to know what actual type to create to assign to the property.

    Instead you should be using a OneWay bind to a List that pre-exists in the source object albeit an empty one. The controls task then is to simply add or remove members in that list from the list supplied in the ItemsSource property.

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

Sidebar

Related Questions

I am implementing the facebook connect and its working partially well for me. Its
I am trying to create my own little MVC system, its working very well,
I have used ajax auto completeextender in my program well its works fine no
Ok I do have a small messaging site for my client. Well its more
I'm working with a Classic ASP web app that typically runs well considering the
I'm working on a Java/Groovy program. I have a double variable that holds a
I'm having some problems with ActiveRecord. Well everything works fine, but it's working sometimes.
I have a little bookmarklet that opens up a new window, only problem is,
I have started working on my own project, but I am stuck due to
I have recently complete Hartl's Rails tutorial, and have devised a little app that

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.