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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T05:26:57+00:00 2026-05-30T05:26:57+00:00

I am using WPF and MVVM. In my app it would be nice to

  • 0

I am using WPF and MVVM.
In my app it would be nice to select from a main screen an item and then press a button to see details. A new window should be opened and (multiple) selections can be made in a listview where the IsSelected is bound to the items in a ObservebleCollection.

When the user pressed that button again (for the same selection on the main screen) another window is opened with the same details. However, I assume that if a different selection is made, the first window is synced and will show the same selections.

I would like to have the two windows possible with different selections. Is this possible and what should be done to make it work?

Update:
Example: let’s say I would have a car with 4 wheels (Collection). The listviews in both windows show the 4 wheels (one item is one wheel). When I select wheel 1 and 2 in the list view I think in the other window also wheel 1 and 2 will be selected. But I want to select maybe 3 and 4 in window 2 and wheel 1 and 2 in window 1). And I don’t want to add another collection of 4 wheels otherwise I would have a car with 8 wheels … or 2 cars with 4 wheels but if I change wheel 3 and 4, it would change only the second car.

Update 2:
Btw, in my app:

  • I have 0 to n windows with a list view.
  • I create a window including a view model.
  • Each view model is referencing the ‘real’ model.

The binding variable for the selected items are inside the real model, I guess I need to move this to the view model, but I don’t know how. Because the properties (of the wheels in the example) are in the ‘real’ model and those are binded also in the same list view (items).
I c

  • 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-30T05:26:58+00:00Added an answer on May 30, 2026 at 5:26 am

    If there are only two lists, you could bind IsSelected to two separate properties (ie. IsSelectedInList1, IsSelectedInList2).

    But really, a viewmodel is supposed to be an in-code view-less representation of your UI. So, if you have two (or N) copies of the list in your UI which are supposed to have different states, it makes sense to create two (or N) copies of that viewmodel in memory to represent it.

    And I don’t want to add another collection of 4 wheels otherwise I would have a car with 8 wheels … or 2 cars with 4 wheels but if I change wheel 3 and 4, it would change only the second car.

    I think this is more true when thinking about your model. In your model, you want one instance of a particular car, and that car should have one collection of four wheels. But if you want two different views (with different states), it is OK to create two viewmodels from that model.

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

Sidebar

Related Questions

I'm developing a WPF app using MVVM. Most of my views have only xaml
I am creating a WPF app using MVVM. The app manages tagged documents, called
I'm creating a WPF app using the MVVM design pattern, and I'm trying to
I'm using MVVM in a WPF app. I'm very new to both. Let me
I have a WPF app that is using the MVVM pattern. Hooking up buttons
I'm using the MVVM pattern in my first WPF app and have a problem
I'm writting an WPF application using the mvvm toolkint. In the main windows I
I am using MVVM pattern to implement a WPF App. My question is, I
I am developing a WPF app using MVVM and need some help. for the
I am building an wpf app using MVVM. I have viewModels the employ lazy

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.