title: MVVM c# how to load async data into a property?
body: <p>I wonder if there's a better approach to load async data into a property. now I create an async function and raise a Task in the Get part of the property like this:</p>
  
  <pre><code>private ObservableCollection&lt;CProyecto&gt; prope;
  
  public ObservableCollection&lt;CProyecto&gt; Prope
  {
      get 
      {
          if (prope == null)
          {
              Task.Run(()=&gt; LoadData()).Wait();
          }
  
          return proyectos;
      }
      set 
      { 
          prope = value; 
          RaisePropertyChanged(); 
      }
  }
  
  async private Task LoadData() 
  {
      Prope = await clsStaticClassDataLoader.GetDataFromWebService();
  }
  </code></pre>
  
  <p>This approach works, but I don't like the use of .Wait, because that can freeze the screen if the service doesn´t respond fast.</p>
  
  <p>Can you please guide me on this matter? </p>
  
  <p>thanks in advance</p>