private void StartCollapsingAnimation() { if (collapsingStoryboard == null) { collapsingStoryboard = AnimationProvider.GetCollapsingAnimation(this); } if (itemsControl != null) { collapsingStoryboard?.Begin(itemsControl); } }
private void StartExpandAnimation() { if (expandingStoryboard == null) { expandingStoryboard = AnimationProvider.GetExpandingAnimation(this); } if (itemsControl != null) { expandingStoryboard?.Begin(itemsControl); } }
private void OnLoaded(object sender, RoutedEventArgs e) { expandingStoryboard = AnimationProvider.GetExpandingAnimation(this); collapsingStoryboard = AnimationProvider.GetCollapsingAnimation(this); itemsControl = Template.FindName("itemsControl", this) as Grid; switchButton = Template.FindName("switchButton", this) as ToggleButton; if (switchButton != null) { switchButton.Checked += RaiseMenuOpenedEvent; switchButton.Unchecked += RaiseMenuCompactedEvent; } CacheHamburgerMenuItems(); itemController.InjectData(Feeds); if (IsOpen) { StartExpandAnimation(); } }