Exemplo n.º 1
0
        private void StartCollapsingAnimation()
        {
            if (collapsingStoryboard == null)
            {
                collapsingStoryboard = AnimationProvider.GetCollapsingAnimation(this);
            }

            if (itemsControl != null)
            {
                collapsingStoryboard?.Begin(itemsControl);
            }
        }
Exemplo n.º 2
0
        private void StartExpandAnimation()
        {
            if (expandingStoryboard == null)
            {
                expandingStoryboard = AnimationProvider.GetExpandingAnimation(this);
            }

            if (itemsControl != null)
            {
                expandingStoryboard?.Begin(itemsControl);
            }
        }
Exemplo n.º 3
0
        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();
            }
        }