My View calls a method in ViewModel to Fetch Data. After fetching the data, I build my View(Grid) based on the data that got back from the ViewModel. 

getData() Method in the View Model runs in a BackgroundWorker thread. Now my question is how do I get back to View after the View is done fetching all the data?

```
    ViewModel
    {
       getData()
       {
            WorkerMethods()
            WorkerCompletedMethod()
            {
               Refresh()
            }
       }

       Refresh()
       {
           WorkerMethod()
           WorkerCompleted()
           {
                 data - Retrieved.
                 This is where all the calls are really DONE
           }
       }

     }

```

From the View, I will be calling 

```
View()
{
     VM.getData()
     //Before I call this method, I want to make sure Refresh() is completed
     BuildUI()
}

```

I want the BuildUI() method to be executed only after the VM.getData() is executed fully and in turn is done with Refresh() method as well which is what has the Data I need to be able to build the UI Dynamically. 

---

This is what I am going to do. Please correct me if this is not right approach. 

In the View code behind, 

```
  View
  {

      public delegate void DelegateRefresh();
      Init()
      {
          DelegateRefresh fetcher = RefreshData;
          fetcher.BeginInvoke(null, null);
      }

      public void RefreshData()
      {
        _viewModel.GetData();
        **while (_viewModel.IsBusy)**
        {               
            continue;
        }
        BuildUI();
      }

      BuildUI()
      {
         //Code to build the UI Dynamically using the data from VM.
      }

```