private void HamburgerControl_OnSizeChanged(object sender, SizeChangedEventArgs e) { if (e.NewSize.Width == 250.0) //opened { ViewModel.HamburgerWidthChanged(true); MidSeparator.Width = BottomSeparator.Width = 250; Mid2Separator.Width = BottomSeparator.Width = 250; //double column ButtonImages.SetValue(Grid.RowProperty, 0); ButtonImages.SetValue(Grid.ColumnProperty, 1); ButtonImages.SetValue(Grid.ColumnSpanProperty, 1); ButtonForums.SetValue(Grid.ColumnSpanProperty, 1); ButtonNews.SetValue(Grid.RowProperty, 0); ButtonNews.SetValue(Grid.ColumnProperty, 1); ButtonNews.SetValue(Grid.ColumnSpanProperty, 1); ButtonArticles.SetValue(Grid.ColumnSpanProperty, 1); SubProfileSection.Visibility = Visibility.Visible; } else //closed { ViewModel.HamburgerWidthChanged(false); MidSeparator.Width = BottomSeparator.Width = 48; Mid2Separator.Width = BottomSeparator.Width = 48; if (_topCategoriesExpanded) { CollapseTopAnimeCategoriesStoryboard.Begin(); RotateBackTopAnimeCategoriesStoryboard.Begin(); _topCategoriesExpanded = false; } if (_animeFiltersExpanded) { CollapseAnimeListFiltersStoryboard.Begin(); RotateBackAnimeListFiltersStoryboard.Begin(); _animeFiltersExpanded = false; } if (_mangaFiltersExpanded) { CollapseMangaListFiltersStoryboard.Begin(); RotateBackMangaListFiltersStoryboard.Begin(); _mangaFiltersExpanded = false; } //double column ButtonImages.SetValue(Grid.RowProperty, 1); ButtonImages.SetValue(Grid.ColumnProperty, 0); ButtonImages.SetValue(Grid.ColumnSpanProperty, 2); ButtonForums.SetValue(Grid.ColumnSpanProperty, 2); ButtonNews.SetValue(Grid.RowProperty, 1); ButtonNews.SetValue(Grid.ColumnProperty, 0); ButtonNews.SetValue(Grid.ColumnSpanProperty, 2); ButtonArticles.SetValue(Grid.ColumnSpanProperty, 2); SubProfileSection.Visibility = Visibility.Collapsed; } }
private void ButtonExpandTopCategoriesOnClick(object sender, RoutedEventArgs e) { if (!_topCategoriesExpanded) { ExpandTopAnimeCategoriesStoryboard.Begin(); RotateTopAnimeCategoriesStoryboard.Begin(); } else { CollapseTopAnimeCategoriesStoryboard.Begin(); RotateBackTopAnimeCategoriesStoryboard.Begin(); } _topCategoriesExpanded = !_topCategoriesExpanded; }