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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T08:16:55+00:00 2026-05-31T08:16:55+00:00

I have four entity Customer, product, order and order details. On my WPF window

  • 0

I have four entity Customer, product, order and order details. On my WPF window I have customer list box showing customer name and on select of customer I would like to populate the order list box which also in my window.

Since i am using MVVM, I should have two view model, one for customer and another for order, right? and i should pass the customer to orderview model so that it can populate the orderview.

How do I even pass selected customer to the order view model? I have a property named selected item on customer., but I still dont c how shall I get that in my order view model.

Update:

@Craig Trombly I have created the ObservableCollection of my order entity and has property on my view model that is binding to in Xaml. I am implementing master detail behavior like on select of customer populate my order list box. For that i need to have a property on my customer view model and I am binding that property to selectedItem in the list box in my customerView Xaml. i named that property as selectedItem. however whenever i am trying to access that selected item property from orderview model. it is not working. can you plz tell what i am doing wrong? that selectedItem property in my customer view model should set everytime I select a new item in the list on customer view. it s not doing that either.

  • 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-31T08:16:56+00:00Added an answer on May 31, 2026 at 8:16 am

    enter image description hereThe ViewModel is tied to your View (the xaml & cs), it is not around the data.

    For instance, MainWindow.xaml & cs should have a MainWindowViewModel.cs

    You use one ViewModel to your view. I would suggest using the entity framework for your data.

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

Sidebar

Related Questions

I used JPA and mysql. Each table have entity class.I have four tables. Table1
Let me explain my problem: I have four tables created as objects using Entity
I have four input boxes. If the user fills the first box and clicks
Some help with some T-SQL would be most appreciated. I have the following four
I have a category entity that has a category as parent and a list
I have a Core Data entity with four boolean non-optional properties, defaulted to NO.
All, I have a core data entity, CreditCard , and each entity has four
I have an entity BattleUser which contains four properties: Id, BattleId, UserId and DateTime.
Each product in my database can have at least three and sometimes four or
I am trying to implement code-first approach of entity framework. I have four entities

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.