How to refresh TableView data after tapping ViewCell in Xamarin Forms?
<p>So I have the following code that creates ViewCells for my <code>TableView</code> dynamically:</p>

<p>XAML:</p>

<pre><code>&lt;StackLayout&gt;
   &lt;TableView Intent="Settings"&gt;
      &lt;TableView.Root&gt;
         &lt;TableSection x:Name="tableSection"&gt;&lt;/TableSection&gt;
      &lt;/TableView.Root&gt;
   &lt;/TableView&gt;
&lt;/StackLayout&gt;
</code></pre>

<p>C#: </p>

<pre><code>categories = getCategories();
foreach (var category in categories)
{
   var viewCell = new ViewCell 
   { 
      View = new StackLayout()
      {
         Padding = new Thickness(20, 0, 20, 0),
         HorizontalOptions = LayoutOptions.FillAndExpand,
         Children = { 
            new StackLayout() {
               Orientation = StackOrientation.Horizontal,
               VerticalOptions = LayoutOptions.CenterAndExpand,
               Children = {
                  new StackLayout() {
                     HorizontalOptions = LayoutOptions.StartAndExpand,
                     Children = {
                        new Label { Text = category.Name}
                      },
                  new StackLayout() {
                     HorizontalOptions = LayoutOptions.EndAndExpand,
                     Orientation = StackOrientation.Horizontal,
                     Children = {
                        new Label { Text = category.Count},
                        new Image { Source = "right1.png",
                                    IsVisible = category.Selected }
                     }
                  }
               }
            }
         }
       }
    };
    viewCell.Tapped += (sender, e) =&gt;
    {
       if (category.Selected == false)
       {
          App.DB.UpdateSelected(true);
       }
       else
       {
          App.DB.UpdateSelected(false);
       }
       categories = getCategories();
       totalPhraseCount = getTotalPhraseCount();
       Title = totalPhraseCount.ToString() + " phrases";
     };
    tableSection.Add(viewCell);
}
</code></pre>

<p>What I wanted to do is whenever I tap on a view cell to update the selected property, the data in the table view are also updated. In ListView I could call the ItemSelected event and call the ItemSource again with the updated categories. Is this possible with TableView?</p>