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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T17:53:30+00:00 2026-05-29T17:53:30+00:00

I am working on my first WPF/MVVM application, and I have come across a

  • 0

I am working on my first WPF/MVVM application, and I have come across a limitation in my knowledge of commands!

Here is my scenario.

I have a window – Customer.xaml.

It houses 2 usercontrols

  • viewCustomerSearch.xaml
  • viewCustomerDetails.xaml

Each of THOSE has it’s own view model.

So, the hierarchy looks like this:

… Customer.xaml

… … viewCustomerSearch.xaml

… … … viewmodelCustomerSearch.xaml

… … viewCustomerDetails.xaml

… … … viewmodelCustomerDetails.xaml

I understand this to be a ‘not uncommon’ scenario.

For what it is worth, the user selects a customer by double clicking on a listview line in the viewCustomerSearch.xaml control.

The problem is: I now need to tell the viewmodelCustomerDetails.xaml class which customer the user has just selected. I cannot work this out at all.

Does anyone have any help on where I declare the command I need, how it gets hooked up, where the implementation code fires, etc?

Any help gratefully appreciated,
DS

  • 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-29T17:53:31+00:00Added an answer on May 29, 2026 at 5:53 pm

    Typically, to do inter-viewmodel communication, you can either:

    1. Use standard .NET events, and use the parent view model as the mediator – in your case the Customer view model would have references to the 2 child view models, and can subscribe to events, and call appropriate methods on the child view models when the events are published
    2. Use an event aggregator pattern

    Frameworks such as Caliburn.Micro and Prism provide an implementation of the event aggregator pattern.

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

Sidebar

Related Questions

I'm working on my first true WPF MVVM pattern application. Currently I have a
I am new to wpf and i am working on first application i have
I'm working on my first big WPF MVVM application now, which uses MVVM Light
I have pretty much finished my first working Symbian application, but in my hastened
I'm working on my first WPF application and I'm testing out a custom control
I'm currently working on my first WPF application, and I'm curious as to whether
I'm working with WPF and EF 4.2 to build a desktop application. I have
I'm currently working on a WPF application, it's my first so I'm learning as
I am just working on my first GUI application on Windows. I have a
I am working on a program in WPF for the first time. I have

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.