/// <summary> /// Jumps to the first item in the <see cref="GridView"/>. /// </summary> public void GridViewJumpToFirstItem() { if (IconFontCollectionGridView.Items?.Any() ?? false) { IconFontCollectionGridView.SelectedIndex = 0; IconFontCollectionGridView.ScrollIntoView(IconFontCollectionGridView.Items[0]); } }
/// <summary> /// Invoked when the Zoom on the <see cref="SemanticZoom"/> control has been changed. /// </summary> private void SemanticZoom_ViewChangeStarted(object sender, SemanticZoomViewChangedEventArgs e) { if (!e.IsSourceZoomedInView) { var selectedGroupFirst = (e.SourceItem.Item as IconFontCollectionGroup)?.Items?.First(); if ((IconFontCollectionGridView.Items?.Any() ?? false) && selectedGroupFirst != null) { IconFontCollectionGridView.SelectedItem = selectedGroupFirst; IconFontCollectionGridView.ScrollIntoView(selectedGroupFirst); } } }
/// <summary> /// Jump to the first item in the <see cref="GridView"/>. /// </summary> public void GridViewJumpToFirstItem() { if (IconFontSemantics.IsZoomedInViewActive) { if (IconFontCollectionGridView.Items?.Any() ?? false) { IconFontCollectionGridView.SelectedIndex = 0; IconFontCollectionGridView.ScrollIntoView(IconFontCollectionGridView.Items[0]); } } else { if (IconFontCollectionGroupGridView.Items?.Any() ?? false) { IconFontCollectionGroupGridView.SelectedIndex = 0; IconFontCollectionGroupGridView.ScrollIntoView(IconFontCollectionGroupGridView.Items[0]); } } }