Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
30
XamBusyIndicator using Binding ViewModel
posted

Hi Team,

I Need to use XamBusyIndicator using Binding ViewModel

But It's not working as expected.

When I giving the hard-coded value in IsBusy it's working. But when I use Binding its not working

In XAML

<ig:XamBusyIndicator IsBusy="{Binding IsBusy, Mode=TwoWay}" BusyContent="Please, wait ...">
<Grid>

< code for the grid>

</Grid>
</ig:XamBusyIndicator>

in Viemodel

private bool isBusy;
public bool IsBusy
{
get { return isBusy; }
set
{
SetAndCallOnPropertyChanged(ref isBusy, value, () => IsBusy);
}
}

I will be making IsBusy= true and false inside my code logic. but it's not reflecting in XAML

if I use IsBusy="True" it's working but I need to get from Binding

Can anyone please guide and suggest me how to proceed further.

Thanks,

Nirmal

  • 30210
    Offline posted

    Hello Nirmal,

    I am attaching a sample project that demonstrates binding the XamBusyIndicator to an IsBusy property in your ViewModel. I am guessing that something could potentially be wrong with your binding to IsBusy in this case, or potentially the work that you are doing could be blocking up the UI thread? In the sample project, I am populating and loading 10 million records into a XamDataGrid asynchronously through usage of a BackgroundWorker element on a Button click. The XamBusyIndicator works as expected in this sample project.

    I hope this helps you. Please let me know if you have any other questions or concerns on this matter.

    BusyIndicatorBinding.zip