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

  • Home
  • SEARCH
  • 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 481525
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T01:00:12+00:00 2026-05-13T01:00:12+00:00

In WPF, I have a ListBox with a UserControl as its ItemTemplate – all

  • 0

In WPF, I have a ListBox with a UserControl as its ItemTemplate – all data shown ok. I have now added a text box for input in that user control. In an MVVM design, I want to take some action (re-calculate values) in the main window when the user edits the content of the text box in the user control, in the item template, in the list box. Question is – how to propagate that event up to the model? The user control is bound to a business object and I can see the value being changed there ok (INotifyPropertyChanged is implemented in the BO), but, how to get that event up to the model (as opposed to the code-behind)?
Any examples or pointers most welcome!

jas

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

    I’m assuming, given that this is an MVVM application, that you are trying to propogate the text changed event up to the ViewModel.

    You can do this without adding code behind in the View by using an Attached Property or a Behavior. There is actually a Behavior on the Expression Gallery that Invokes a command when you hit Enter in a TextBox. This could easily be reworked to fire a custom ICommand on your ViewModel whenever the TextBox changes its value (it’s very similar in goals).

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

Sidebar

Related Questions

I have a WPF ListBox bound to a data object. Inside the listbox are
I have WPF ListBox which is bound to a ObservableCollection, when the collection changes,
I have a WPF listbox which displays messages. It contains an avatar on the
I have a WPF TabControl with two TabItems. Each TabItem contains a ListBox with
Each item in a WPF ListBox control seems to have a bit of left
I am a newbie to WPF and have a couple of questions about WPF
I'm making my first foray into WPF - I have a simple form with
I have a WPF project and I'm trying to setup a NAnt build script
I have a WPF application in VS 2008 with some web service references. For
I have a WPF Window which has a among other controls hosts a Frame.

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.