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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T00:33:43+00:00 2026-06-06T00:33:43+00:00

I have a simple button: <Button Content=Login Command={Binding StartAction} IsEnabled={Binding Path=Loading, Converter={StaticResource InverseBooleanConverter}}/> As

  • 0

I have a simple button:

<Button Content="Login" Command="{Binding StartAction}" IsEnabled="{Binding Path=Loading, Converter={StaticResource InverseBooleanConverter}}"/>

As you can see, IsEnabled is bound to a boolean property. When StartAction is executed, the boolean is set on true so the button gets disabled (note that I’m using a InverseBooleanConverter). This works fine.

After changing the boolean, the StartAction-method creates a new thread which calls a callback on the ViewModel (where the thread was created, so where the StartAction-method can be found) when it’s finished. This callback is very simple:

private void DisplayResult()
{
    Loading = false;
}

This should enable the button again, however, this doesn’t happen.

If I set loading on false somewhere else, the button DOES get enabled. Together with the button, some other elements (also bound to this boolean) should get invisible/visible when the boolean changes and that DOES work fine too, even when the Loading property is changed by the callback method.

I’m a bit confused here. Why doesn’t it work? I think it may have something to do with the thread, but I don’t see any reason why this shouldn’t work, especially since it works with other elements on the UI.

Just to be clear, this is the Loading property:

public bool Loading
{
    get { return loading; }
    set
    {
        if (loading != value)
        {
            loading = value;
            RaisePropertyChanged("Loading");
        }
    }
}

Any idea what might be wrong here?

Thanks

  • 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-06-06T00:33:45+00:00Added an answer on June 6, 2026 at 12:33 am

    On your callback you may need to instruct the UI to check that property again and update accordingly. This is performed with the CommandManager. I’ve added a bit to your callback code:

    private void DisplayResult()
    {
        Loading = false;
        CommandManager.InvalidateRequerySuggested();
    }
    

    The CommandManager.InvalidateRequerySuggested instructs WPF to update any bound controls as necessary right away.

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

Sidebar

Related Questions

I have a simple Button control that contains an Image object as its content.
I have a simple button (3 of them - all same except the content
I have a simple login layout that contains two EditText fields and a Button
I have a simple submit button. I am wanting to align it to the
This is probably a basic html/css question... I have a simple one-button form that
I have a simple form with a single button and a datatable with a
I have a simple metro app contains a button, a label and a drop
I have a simple aspx page with a few TextBoxes and a submit button.
I have a simple search form with a box and a button. <form action
I currently have a simple form that when you click the save button will

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.