title: How to call async method from a listbox selection change mvvm?
body: <p>I read a lot online about how bad awaiting a void method is. I just wanted to know what are the possible consequence(s)? Could it slow down my application over time if I am getting data from another machine over a network?(I use Task.Run and it works fine but just is there an alternative?)</p>
  
  <p><code>CallTheCurrentWFControls()</code> load data from a json file on my local machine but my async method gets only a list index over the network. </p>
  
  <p>I find my self using allot of async voids how can I break this pattern? Is there a part of the MVVM pattern I am missing(That handles async methods on selection changed on a bonded list box)?</p>
  
  <pre><code>MainWindow _MainWindow = Application.Current.MainWindow as MainWindow;
  
  private ObservableCollection&lt;WFControl&gt; _CurrentFilteredControls;
  public ObservableCollection&lt;WFControl&gt; CurrentFilteredControls
  {
      get { return _CurrentFilteredControls; }
      set
      {
          if (_CurrentFilteredControls != value)
          {
              _CurrentFilteredControls = value;
              OnPropertyChanged();
          }
      }
  }
  
  private WFControl _SelectedCurrentFilteredControls;
  public WFControl SelectedCurrentFilteredControls
  {
      get { return _SelectedCurrentFilteredControls; }
      set
      {
          if (_SelectedCurrentFilteredControls != value)
          {
              _SelectedCurrentFilteredControls = value;
              CallTheCurrentWFControls();
              Task.Run(() =&gt; _MainWindow.UpdateIndex());
              OnPropertyChanged();
  
          }
      }
   }
  
  public async void UpdateIndex()
  {
      try
      {
          object o = await GetVentuxIndex(".Index");
  
      }
      catch (Exception ex)
      {
              LogFileController.WriteCurrentErrorOrWarningToXmlFile(ex.Message, "UpdateIndex");
      }
  }
  </code></pre>
  
  <p>WPF:</p>
  
  <pre><code>&lt;ListBox x:Name="lbx" ItemsSource="{Binding VM.CurrentFilteredControls, Mode=TwoWay}"   ItemContainerStyle="{StaticResource listContainerStyle}"   ItemTemplate="{DynamicResource dtWFC}"  SelectedItem="{Binding VM.SelectedCurrentFilteredControls, Mode=TwoWay}"  HorizontalAlignment="Right" Width="500" Margin="0,102,140,0" Height="338" VerticalAlignment="Top" Grid.Column="3" BorderThickness="4" BorderBrush="Black" /&gt;
  </code></pre>