title: Refresh SemanticZoom ObservableCollection in ViewModel
body: <p>When using a SemanticZoom control, is there a way to update the ObservableCollection in the ViewModel after a table change?  After making changes to the table in SQLite, within the same page (categories.xaml.cs), the SemanticZoom control does not update.  Reloading the page from menu navigation does reload the page with the correct data.  If the control just took an ObservableCollection as it's items source, the ObservableCollection could just be refreshed.  Using a ViewModel was the only code example I could find for the SemanticZoom control.  Thanks in advance!</p>
  
  <p>categories.xaml</p>
  
  <pre><code>&lt;Page.DataContext&gt;
      &lt;vm:CategoriesViewModel&gt;&lt;/vm:CategoriesViewModel&gt;
  &lt;/Page.DataContext&gt;
  &lt;Page.Resources&gt;
      &lt;CollectionViewSource  x:Name="Collection" IsSourceGrouped="true" ItemsPath="Items" Source="{Binding CategoryGroups}" /&gt;
  &lt;/Page.Resources&gt;
  
  &lt;SemanticZoom Name="szCategories" ScrollViewer.ZoomMode="Enabled"&gt;
      &lt;SemanticZoom.ZoomedOutView&gt;
          &lt;GridView ScrollViewer.IsHorizontalScrollChainingEnabled="False"&gt;
              &lt;GridView.ItemTemplate&gt;
                  &lt;DataTemplate&gt;
                      &lt;TextBlock Text="{Binding Group.Name }" Foreground="Gray" Margin="5" FontSize="25" /&gt;
                  &lt;/DataTemplate&gt;
              &lt;/GridView.ItemTemplate&gt;
          &lt;/GridView&gt;
      &lt;/SemanticZoom.ZoomedOutView&gt;
      &lt;SemanticZoom.ZoomedInView&gt;
          &lt;ListView Name="lvCategories" ItemsSource="{Binding Source={StaticResource Collection}}" Tapped="lvCategories_Tapped"&gt;
              &lt;ListView.ItemTemplate&gt;
                  &lt;DataTemplate x:DataType="data:Category"&gt;
                      &lt;StackPanel&gt;
                          &lt;TextBlock Text="{Binding Title}" Margin="5" /&gt;
                      &lt;/StackPanel&gt;
                  &lt;/DataTemplate&gt;
              &lt;/ListView.ItemTemplate&gt;
              &lt;ListView.GroupStyle&gt;
                  &lt;GroupStyle&gt;
                      &lt;GroupStyle.HeaderTemplate&gt;
                          &lt;DataTemplate&gt;
                              &lt;StackPanel Orientation="Vertical"&gt;
                                  &lt;TextBlock Text='{Binding Name}' Foreground="Gray" FontSize="25" Margin="5,5,5,0" /&gt;
                              &lt;/StackPanel&gt;
                          &lt;/DataTemplate&gt;
                      &lt;/GroupStyle.HeaderTemplate&gt;
                  &lt;/GroupStyle&gt;
              &lt;/ListView.GroupStyle&gt;
          &lt;/ListView&gt;
      &lt;/SemanticZoom.ZoomedInView&gt;
  &lt;/SemanticZoom&gt;
  </code></pre>
  
  <p>categories.xaml.cs</p>
  
  <pre><code>    public Categories()
      {
          this.InitializeComponent();
  
          var collectionGroups = Collection.View.CollectionGroups;
          ((ListViewBase)this.szCategories.ZoomedOutView).ItemsSource = collectionGroups;
      }
  </code></pre>
  
  <p>CategoriesViewModel.cs</p>
  
  <pre><code>internal class CategoriesViewModel : BindableBase
  {
      public CategoriesViewModel()
      {
          CategoryGroups = new ObservableCollection&lt;CategoryDataGroup&gt;(CategoryDataGenerator.GetGroupedData());
      }
  
      private ObservableCollection&lt;CategoryDataGroup&gt; _groups;
      public ObservableCollection&lt;CategoryDataGroup&gt; CategoryGroups
      {
          get { return _groups; }
          set { SetProperty(ref _groups, value); }
      }
  }
  
  public abstract class BindableBase : INotifyPropertyChanged
  {
      public event PropertyChangedEventHandler PropertyChanged;
  
      protected virtual bool SetProperty&lt;T&gt;(ref T storage, T value, [CallerMemberName] string propertyName = null)
      {
          if (object.Equals(storage, value)) return false;
  
          storage = value;
          this.OnPropertyChanged(propertyName);
  
          return true;
      }
      protected void OnPropertyChanged(string propertyName)
      {
          var eventHandler = this.PropertyChanged;
          if (eventHandler != null)
          {
              eventHandler(this, new PropertyChangedEventArgs(propertyName));
          }
      }
  }
  </code></pre>
  
  <p>SymanticZoom.cs</p>
  
  <pre><code>internal class CategoryDataGroup
  {
      public string Name { get; set; }
  
      public List&lt;CategoryData&gt; Items { get; set; }
  }
  
  internal class CategoryData
  {
      public CategoryData(string grp, string title)
      {
          Grp = grp;
          Title = title;
      }
  
      public string Grp { get; private set; }
      public string Title { get; private set; }
  }
  
  internal class CategoryDataGenerator
  {
      private static List&lt;CategoryData&gt; _data;
  
      public static List&lt;CategoryDataGroup&gt; GetGroupedData()
      {
          if (_data != null)
              _data.Clear();
          GenerateData();
  
          return _data.GroupBy(d =&gt; d.Grp[0],
              (key, items) =&gt; new CategoryDataGroup() { Name = key.ToString(), Items = items.ToList() }).ToList();
      }
  
      private static void GenerateData()
      {
          ObservableCollection&lt;Category&gt; ocCategories = new ObservableCollection&lt;Category&gt;();
          SQLiteManager.Categories.Select(ocCategories);
  
          _data = new List&lt;CategoryData&gt;();
          foreach (var temp in ocCategories)
          {
              _data.Add(new CategoryData(temp.Name.Substring(0,1), temp.Name));
          }            
      }
  }
  </code></pre>