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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T23:27:54+00:00 2026-06-03T23:27:54+00:00

I tried to use InvokeOperation to get a boolean value from the DomainContext in

  • 0

I tried to use InvokeOperation to get a boolean value from the DomainContext in my ViewModel.

As calls to the server are asynchronous, including invokes. I need to wait for the invoke to complete (i.e. ctx.epidemicContext().Completed += [an event handler]). And in invoke complete event I’m retriving the bool value and setting a property.

_context.IsChangeLogStarted(OnInvokeCompleted, null);

//OnInvoke complete set the property

private void OnInvokeCompleted(InvokeOperation<bool> invOp)
        {           
            IsChangeLogExist = invOp.Value;
        }

//Property

 public bool IsChangeLogExist
        {
            get { return this._IsChangeLogExist; }
            set { this._IsChangeLogExist = value; }
        }

And In my View I’m trying to bind the “IsChangeLogExist” to IsEnabled property of Button.
//View

<Button IsEnabled="{Binding IsChangeLogExist}" Command="{Binding Source={StaticResource ProxyViewModel}, Path=StartChangeLogCommand}" CommandParameter="{Binding}" />

But the problem is when I run the application, Button’s IsEnabled property is binding with default value (false) of IsChangeLogExist, With out setting its property value from the domaincontext due the Invoke’s asynchronous operation.
before invoke callback calls the OnInvokeCompleted, The button’s Isenabled property is already getting the value. value is always false (since we are not setting the value and the invoke call is still at server)

Can some one suggest me how to bind IsEnabled property of button after getting the bool value from server and setting it in OnInvokeCompleted method.

  • 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-03T23:27:55+00:00Added an answer on June 3, 2026 at 11:27 pm

    You need to implement INotifyPropertyChanged in your view model and then raise this PopertyChanged event in setter of the property “IsChangeLogExists”. This will refresh UI and new value of IsChangeLogExist will be used after callback completed.

    public bool IsChangeLogExist
    {
        get { return this._IsChangeLogExist; }
        set 
        { 
            this._IsChangeLogExist = value;
            if(PropertyChanged != null)
                  PropertyChanged(this, "IsChangeLogExists")
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I tried to use php mailer but errors as follows. SMTP -> FROM SERVER:
I tried use javascript spilt to get part of the word : new from
I tried to use git cherry-pick for merging some commits from master and then
I tried use js to change my url from http://localhost/text/index.php#mainpage%20menu1 to http://localhost/text/index.php#homepage%20menu1 My code
$(input[name='add'].my).click(function(){ //i tried use this <input type=button name=add value=..../> //element to find his parent's
I tried to use an image file in my HTML template. But when I
I tried to use object expression to extend the IDelegateEvent, but in fsi there
I tried to use $.cssRule() plugin and found that it makes it inconvenient to
I tried to use the Http Authentication Digest Scheme with my php (apache module)
I tried to use InvokeSelf for silverlight to communicate with html: InvokeSelf can take

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.