ViewModelBase on Csla.Xaml

ViewModelBase on Csla.Xaml

Old forum URL: forums.lhotka.net/forums/t/11126.aspx


st3fanus posted on Sunday, February 05, 2012

Hi all,

 

I have a scenario where :

MyViewModel class derived from ViewModelBase has a string property ( SummarySizeText ) that is bound into content's label on MyView.

CODE :

 

public MyViewModel()

{

       BeginRefresh(callback =>GoodList.GetGoodList(callback) );
}

 

protected override void OnModelChanged(GoodList oldValue, GoodList newValue)
        {
            base.OnModelChanged(oldValue, newValue);
            OnPropertyChanged("SummarySizeText");
        }

public string SummarySizeText
        {
            get
            {
                if (IsBusy)
                    return "- underconstruction -";
                else
                    return "Jumlah : " + Model.Count + " Baris";
            }
        }

 

My Problem is :

When asynchronous call on begin refresh is started : My View display an "underconstruction" on label.

BUT, WHY after that call is completed, OnPropertyChanged("SummarySizeText"); can't refresh My Label Content.

Is there any something that I missed ??

thanks a lot

 

Stefanus

RockfordLhotka replied on Monday, February 06, 2012

It is possible (likely) that IsBusy remains true until after the ModeChanged event processing is complete.

Copyright (c) Marimer LLC