Esempio n. 1
0
        private void FlipToDataUsage(bool animated)
        {
            HasDataUsageSideUp = true;
            OnPropertyChanged("HasDataUsageSideUp");
            HasVpnConnectionSideUp = false;
            OnPropertyChanged("HasVpnConnectionSideUp");

            SpeedVisual.DrawCurves();

            DataUsage.Visibility = Visibility.Visible;

            if (animated)
            {
                Storyboard flipAnimation = Resources["FlipToDataUsageStoryboard"] as Storyboard;

                flipAnimation.Completed += (sender, e) =>
                {
                    VpnConnection.Visibility = Visibility.Collapsed;
                };

                flipAnimation.Begin();
            }
            else
            {
                VpnConnection.Visibility = Visibility.Collapsed;
            }
        }
Esempio n. 2
0
        private void FlipToDataUsage(bool animated)
        {
            HasDataUsageSideUp = true;
            OnPropertyChanged("HasDataUsageSideUp");
            HasVpnConnectionSideUp = false;
            OnPropertyChanged("HasVpnConnectionSideUp");

            SpeedVisual.DrawCurves();

            if (animated)
            {
                Storyboard flipAnimation = Resources["FlipToDataUsageStoryboard"] as Storyboard;

                AddTimelineCompleteHandler(flipAnimation, () => UpdateCardVisibility());

                DataUsage.Visibility = Visibility.Visible;
                flipAnimation.Begin();
            }
            else
            {
                UpdateCardVisibility();
            }
        }