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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T01:33:42+00:00 2026-05-14T01:33:42+00:00

Building my first SL MVVM application (Silverlight4 RC) and have some issues i don’t

  • 0

Building my first SL MVVM application (Silverlight4 RC) and have some issues i don’t understand.

Having a WPF background i don’t know what is going on here:

ViewModel has several properties, in which one is called SelectedRecord. This is a get only property and is defined like this:

    public Culture SelectedRecord { 
get { return culturesView.View.CurrentItem as Culture;  } }

As you can see it is gets the current value of a CollectionViewSource (called culturesView). So if i select a Culture, the SelectedRecord (gets a value directly from within the CollectionViewSource) as expected. (Actually there is a datagrid control bound to the CollectionViewSource, hence it is possible to change the selected item)

OK. Now to the View . There are several views which access this ViewModel and in particular there is one which shows the values of the aforementioned property SelectedRecord (let’s call it the EditView). To show this EditView there is a button (which has its Command property bound to an ICommand in the ViewModel) which functions (the first time) as expected.

This means:

1st try : i select a record, switch to EditView, outcome: selected record values are shown (as expected!!).

2nd try: switch back to datagrid, select another record, switch to EditView, outcome: the values of the previous shown record are shown again!!! WHY??

First i thought that the SelectedRecord has not the correct value set, but i was mistaken: it HAS the correct value! So it should be shown!?

What am i missing? In WPF this would work!!

Thanks in advance

  • 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-14T01:33:43+00:00Added an answer on May 14, 2026 at 1:33 am

    When CurrentItem value changes, your ViewModel that has SelectedRecord must call RaisePropertyChanged(“SelectedRecord”) so whatever View is bound to it is notified about the change.

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

Sidebar

Related Questions

I am building a WPF application and using the MVVM for the first time.
I'm building my first ASP.NET MVC application and I am having some troubles with
I am building my first chrome extension, for that I want to have some
So, i'm building my first SL application. I tried to use the MVVM approach,
I am building my first extension and have problems getting background page loaded scripts
I am building my first rails application and I expect it to eventually have
I'm building my first Caliburn WPF application, and I find myself in the following
I'm building a WPF MVVM application and I'd like to keep what I can
I'm building my first jquery mobile site and have run into a problem. When
My team is building our first significant Silverlight application, using a 3 layered architecture

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.