title: RefreshView in CollectionView Xamarin.Forms
body: <p>I am trying to use <code>RefreshView</code> in my <code>CollectionView</code>, but I have problem.
  when I change manually data in my viewmodels, then I try to refresh with pulled down my screen, refresh circle is appear but my data is not updated</p>
  <p>Am I missing something?</p>
  <p>This is my code</p>
  <p><strong>View</strong></p>
  <pre><code>&lt;ContentPage.Content&gt;
      &lt;RefreshView IsRefreshing=&quot;{Binding IsRefreshing}&quot;
                   Command=&quot;{Binding RefreshCommand}&quot;&gt;
          &lt;CollectionView ItemsSource=&quot;{Binding ListOfColor}&quot;
                      Margin=&quot;10&quot;
                      SelectionMode=&quot;Single&quot;&gt;
              &lt;CollectionView.ItemsLayout&gt;
                  &lt;GridItemsLayout Orientation=&quot;Vertical&quot;/&gt;
              &lt;/CollectionView.ItemsLayout&gt;
              &lt;CollectionView.ItemTemplate&gt;
                  &lt;DataTemplate&gt;
                      &lt;Grid ColumnSpacing=&quot;7&quot; RowSpacing=&quot;5&quot;&gt;
                          &lt;Grid.ColumnDefinitions&gt;
                              &lt;ColumnDefinition Width=&quot;Auto&quot;/&gt;
                              &lt;ColumnDefinition Width=&quot;150&quot;/&gt;
                          &lt;/Grid.ColumnDefinitions&gt;
                          &lt;Grid.RowDefinitions&gt;
                              &lt;RowDefinition Height=&quot;Auto&quot;/&gt;
                              &lt;RowDefinition Height=&quot;Auto&quot;/&gt;
                          &lt;/Grid.RowDefinitions&gt;
  
                          &lt;BoxView BackgroundColor=&quot;{Binding Color}&quot;
                              Grid.Column=&quot;0&quot; Grid.Row=&quot;0&quot; Grid.RowSpan=&quot;2&quot;
                              HeightRequest=&quot;60&quot;
                              WidthRequest=&quot;60&quot; /&gt;
                          &lt;Label Text=&quot;{Binding ColorName}&quot;
                          Grid.Column=&quot;1&quot; Grid.Row=&quot;0&quot;
                          TextColor=&quot;{Binding Color}&quot;
                          FontAttributes=&quot;Bold&quot;/&gt;
                          &lt;Label Text=&quot;{Binding ColorDesc}&quot;
                          Grid.Column=&quot;1&quot; Grid.Row=&quot;1&quot;
                          TextColor=&quot;{Binding Color}&quot;/&gt;
                      &lt;/Grid&gt;
                  &lt;/DataTemplate&gt;
              &lt;/CollectionView.ItemTemplate&gt;
          &lt;/CollectionView&gt;
      &lt;/RefreshView&gt;
  &lt;/ContentPage.Content&gt;
  </code></pre>
  <p><strong>ViewModel</strong></p>
  <pre><code>class ColorCollectionViewModel : INotifyPropertyChanged
  {
      const int RefreshDuration = 2;
      bool isRefreshing;
  
      public bool IsRefreshing
      {
          get
          {
              return isRefreshing;
          }
          set
          {
              isRefreshing = value;
              OnPropertyChanged();
          }
      }
  
      public ObservableCollection&lt;ListColorModel&gt; ListOfColor { get; private set; }
  
      public ICommand RefreshCommand =&gt; new Command(async () =&gt; await RefreshDataAsync());
  
      public ColorCollectionViewModel()
      {
          ListOfColor = new ObservableCollection&lt;ListColorModel&gt;();
          NewData();
      }
  
      void NewData()
      {
          ListOfColor.Add(new ListColorModel { ColorName = &quot;Hitam&quot;, Color = &quot;Black&quot;, ColorDesc = &quot;Ini Warna Hitam&quot; });
          ListOfColor.Add(new ListColorModel { ColorName = &quot;Coklat&quot;, Color = &quot;Brown&quot;, ColorDesc = &quot;Ini Warna Coklat&quot; });
          ListOfColor.Add(new ListColorModel { ColorName = &quot;Merah&quot;, Color = &quot;Red&quot;, ColorDesc = &quot;Ini Warna Merah&quot; });
          ListOfColor.Add(new ListColorModel { ColorName = &quot;Orange&quot;, Color = &quot;Orange&quot;, ColorDesc = &quot;Ini Warna Orange&quot; });
          ListOfColor.Add(new ListColorModel { ColorName = &quot;Kuning&quot;, Color = &quot;Yellow&quot;, ColorDesc = &quot;Ini Warna Kuning&quot; });
          ListOfColor.Add(new ListColorModel { ColorName = &quot;Hijau&quot;, Color = &quot;Green&quot;, ColorDesc = &quot;Ini Warna Hijau&quot; });
          ListOfColor.Add(new ListColorModel { ColorName = &quot;Biru&quot;, Color = &quot;Blue&quot;, ColorDesc = &quot;Ini Warna Blue&quot; });
          ListOfColor.Add(new ListColorModel { ColorName = &quot;Ungu&quot;, Color = &quot;Purple&quot;, ColorDesc = &quot;Ini Warna Ungu&quot; });
          ListOfColor.Add(new ListColorModel { ColorName = &quot;Abu-Abu&quot;, Color = &quot;Gray&quot;, ColorDesc = &quot;Ini Warna Abu-Abu&quot; });
          ListOfColor.Add(new ListColorModel { ColorName = &quot;Pink&quot;, Color = &quot;Pink&quot;, ColorDesc = &quot;Ini Warna Pink&quot; });
  
          OnPropertyChanged(nameof(ListOfColor));
      }
  
      async Task RefreshDataAsync()
      {
          IsRefreshing = true;
          await Task.Delay(TimeSpan.FromSeconds(RefreshDuration));
          IsRefreshing = false;
      }
  
      #region INotifyPropertyChanged
  
      public event PropertyChangedEventHandler PropertyChanged;
  
      void OnPropertyChanged([CallerMemberName] string propertyName = null)
      {
          PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
      }
      #endregion
  }
  </code></pre>