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

  • Home
  • SEARCH
  • 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 183667
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T15:09:24+00:00 2026-05-11T15:09:24+00:00

I have an entities model with a many to many relationship. For simiplicity, lets

  • 0

I have an entities model with a many to many relationship. For simiplicity, lets assume its a car entity and a feature(cd player, moonroof, etc.) entity.

I have a Silverlight/WPF form in which you edit the car entity. I would like to have the list of possible features (everything in the features table) be a list of checkboxes. That part is easy. However, I am trying to think of an elegant way to bind the checkboxes so that when I check, uncheck one of them, it add/removes the association between that feature and car.

I know that this can easily be done with good old WinForms-style event handlers, but I would like to know if anybody has a way of doing this using data binding so that I can still keep my presentation and my logic separated

  • 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. 2026-05-11T15:09:25+00:00Added an answer on May 11, 2026 at 3:09 pm

    Have you looked at the MVVM presentation pattern?

    I would suggest creating a ViewModel class to bind to. This class could contain properties like HasSunroof for the checkboxes to bind to. In the set methods of these properties they could alter the related property (like the Sunroof property).

    An alternative would be to use an IValueConverter. Bind to the actual property (say Sunroof). In the converter, return true (checked) if the value of Sunroof is not equal to null, otherwise return false. The ConvertBack() function could turn the case where IsChecked is equal to true into the required object for the property.

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

Sidebar

Related Questions

I have an Entity Framework 4 model, with 2 entities containing many-to-many relationship, so
Suppose i have a one to many relationship between two model entities Entity One
I have a 1 to many relationship between 2 entities in my model. I
I have one many-to-many relationship in my model. There are two entities, Emergencies and
I have a many-to-many relationship in my Entity Framework 4 model (which works with
I have a Core Data model setup like so: Blockbuster Entity To-Many relationship to
I have core data model with two entities that have a many-to-many relationship with
I have a parent entity in my model Event. And two child entities: Birthday,
I have entities Word and Tag . Both have To-Many relationship to each other,
I have the following core data model with two entities: entity item which holds

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.