public void ExecuteSemanticZoom()
{
#if NETFX_CORE
var page = App.ApplicationFrame.Content as Views.MainPage;
if (page == null) return;
var videoColumn = page.GetFirstDescendantOfType<VideoColumn>() as VideoColumn;
var semanticZoom = videoColumn.GetDescendantsOfType<SemanticZoom>().First() as SemanticZoom;
var semanticZoomVertical = videoColumn.GetDescendantsOfType<SemanticZoom>().ElementAt(1) as SemanticZoom;
var collection = videoColumn.Resources["MediaGroupedByAlphabet"] as CollectionViewSource;
if (semanticZoom == null) return;
try
{
var listviewbase = semanticZoom.ZoomedOutView as ListViewBase;
var listviewBaseVertical = semanticZoomVertical.ZoomedOutView as ListViewBase;
if (collection == null) return;
// Collection or Collection View can also be null. In these cases, return.
if (collection.View == null) return;
if (listviewbase != null)
listviewbase.ItemsSource = collection.View.CollectionGroups;
if (listviewBaseVertical != null)
listviewBaseVertical.ItemsSource = collection.View.CollectionGroups;
}
catch { }
#endif
}