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

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

            if (itemsControl != null)
            {
                expandingStoryboard?.Begin(itemsControl);
            }
        }
Esempio 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();
            }
        }