title: Running a async function in my INotifyPropertyChanged-class and the code doesnt run
body: <p>I am trying to make each listcell in a listview different depending what they clicked previously and I am doing this with a INotifyPropertyChanged.</p>
  
  <p>I have a if/else code in my class but it doesn't run.. i get no color. 
  If i for example us a color = Color.Green; inside my Public Current then it works. But not when I do this if/else statement it doesnt run.</p>
  
  <p>This is my class:</p>
  
  <pre><code>public class Current : INotifyPropertyChanged
  {
  Color color;
  
      public event PropertyChangedEventHandler PropertyChanged;
  
      public Current()
      {
           RunThis ();
      }
  
  
      async void RunThis ()
      {
          var checkWhatOption = await parseAPI.WhatOption ();
  
          if ((checkWhatOption ["results"] as JArray).Count &gt; 0) {
  
               color =  Color.Black;
          }
          else {
              color = Color.Red;
          }
  
      }
  
      public Color Color
      {
          set
          {
              if (color != value)
              {
                  color = value;
  
                  if (PropertyChanged != null)
                  {
                      PropertyChanged(this,
                          new PropertyChangedEventArgs("Color"));
                  }
              }
          }
          get
          {
              return color;
          }
  
      }
    }
  </code></pre>
  
  <p>And in my XAML on the page where  I use it I have this code :</p>
  
  <pre><code>&lt;Label BackgroundColor="{Binding Color}"  &gt;  
  &lt;Label.BindingContext&gt;
    &lt;local:Current /&gt;
  &lt;/Label.BindingContext&gt;
  </code></pre>
  
  <p></p>
  
  <p>UPDATED: </p>
  
  <pre><code>    public static async Task RunThis()
      {
  
          if ((Stringone ["results"] as JArray).Count &gt; 0) {
  
              Color = Color.Black; //An object reference is required to access non-static member.
          }
          else {
              color = Color.Red; //An object reference is required to access non-static member.
  
          }
  
      }
  
  
  protected override async void OnAppearing()
      {
          await Current.RunThis ();
  
      }
  </code></pre>