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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:50:48+00:00 2026-05-26T22:50:48+00:00

I have a TextBox in my app, and an ApplicationBarIconButton in the ApplicationBar which

  • 0

I have a TextBox in my app, and an ApplicationBarIconButton in the ApplicationBar which acts as a “submit” for the contents of the TextBox.

When editing the TextBox using the virtual keyboard, the ApplicationBarIconButton is still visible below the SIP, so you can submit straight away without dismissing the keyboard: nice!

However, when clicking the button, the viewmodel to which the TextBox is bound does not update.

I found someone else with the same problem here, and they have used the pretty nasty workaround of manually updating the viewmodel on the TextBox‘s TextChanged event.

Removes all the elegance of using databound view models!

Is this a bug in WP7?

Or is there a nicer way around this that I haven’t found yet?

  • 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-26T22:50:48+00:00Added an answer on May 26, 2026 at 10:50 pm

    The problem is that silverlight bindings do not support the PropertyChanged value for UpdateSourceTrigger. This means that by default a TextBox will update the property bound to Text when the TextBox loses focus and the only other possibility is to update it explicitly in code as is done in the example from your link.

    You only really have two options here: Update the binding when the button is clicked or remove focus from the TextBox when the button is clicked.

    I usually update the binding on the TextChanged event. I use an extension method to do this:

    public static void UpdateBinding(this TextBox textBox)
    {
        BindingExpression bindingExpression = 
                textBox.GetBindingExpression(TextBox.TextProperty);
        if (bindingExpression != null)
        {
                bindingExpression.UpdateSource();
        }
    }
    

    allowing me to just call this in code behind:

    textBox.UpdateBinding();
    

    You may also be able to use a custom behaviour for this.

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

Sidebar

Related Questions

I have search functionality in my app, in which when user clicks in textbox,
I have a windows forms app with a textbox control that I want to
I have TextBox (multiline) and Label in an UpdatePanel which I refresh with javascript
I'm writing a WPF calculator app. In this application I have TextBox that get
I would like to have a textbox in a Silverlight app where the user
I have a form in my winforms app that acts as a built-in browser.
I have am building a win forms app which will have a text box
I have a search textbox on silverlight app where user types in search term
I have an Access app where I use search functionality. I have a TextBox
i have an app and when i write a number in a textbox,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.