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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:36:25+00:00 2026-05-29T10:36:25+00:00

I have the task to write a user control to display some results by

  • 0

I have the task to write a user control to display some results by using the MVVM patern.

The main application (called ApplicationVM) has two a properties UserControlViewModel and SelectedRecord. The first property contains an instance of the UserControlViewModel. In XAML I use these property to bind the UserControl to the UserControlViewModel. The DependencyProperty PageCount is for simple notifications between a display function in the view and the UserControlViewModel.

<control:UserControl DataContext="{Binding UserControlViewModel}" PageCount="{Binding DocumentPageCount}" />

Here is the implementation of the second property in the ApplicationViewModel.

public Record SelectedRecord
{
    get
    {
        return m_SelectedRecord;
    }
    set
    {
        m_SelectedRecord = value;
        OnPropertyChanged("SelectedRecord");
    }
}

Later, this property will by replaced. But what I should to do is to make a dependency between the property “SelectedRecord” and a “Record” of the “UserControlViewModel” which calls a function to generate the new content (e.g. GenerateContent()). How can I make it possible that a change of the SelectedRecord property updates the Record Property of the UserControlViewModel to genereate the new content? Or can my UserControlViewModel hear the OnPropertyChanged("SelectedRecord") to generate automaticcly new content?

  • 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-29T10:36:26+00:00Added an answer on May 29, 2026 at 10:36 am

    I would use a messenger – that way your view models can be nicely decoupled.

    Here’s a thread on SO talking about the one in MVVM light:

    MVVM light – how to access property in other view model

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

Sidebar

Related Questions

I have a task and I want to generate some code using the CodeDom.
I have been assigned wit the task to write a program that takes a
I have this task for the project with 4 nested subprojects using Maven: For
I have a C# Application that does some maintenance tasks. It needs to run
Say I have a User model, a Task model that belongs_to :user , :has_one
I have a task to write a set of http unit tests, which should
I am currently writing an application that will allow a user to install some
I have models as follows: User has_many goals, Goal has_many tasks, Task has_many day_tasks.
I have to: 1. Write an information to user. 2. Read the typed message.
I am new this sharepoint development and i have task in hand to do

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.