コード例 #1
0
        void TodaysScheduleViewer_Completed(object sender, EventArgs e)
        {
            TodaysScheduleViewer.SetValue(Panel.ZIndexProperty, 0);
            NextDaysScheduleViewer.SetValue(Panel.ZIndexProperty, 100);

            double width = ScheduleViewerContainerPanel.ActualWidth;

            NextDaysScheduleViewer.CacheMode = new BitmapCache();

            Storyboard sb = new Storyboard();

            {
                DoubleAnimation slide_left = new DoubleAnimation(width, 0, TimeSpan.FromMilliseconds(500))
                {
                    EasingFunction = QEaseOut
                };
                Storyboard.SetTarget(slide_left, NextDaysScheduleViewer);
                Storyboard.SetTargetProperty(slide_left, new PropertyPath("(FrameworkElement.RenderTransform).(TranslateTransform.X)"));
                sb.Children.Add(slide_left);
            }
            sb.Completed += (_o, _e) =>
            {
                NextDaysScheduleViewer.CacheMode = null;
                NextDaysScheduleViewer.StartCompletionTimer();
            };
            sb.Begin();

            CurrentShowing = ClassScheduleViewer.ShowModes.NextDay;
        }
コード例 #2
0
        void SetUI()
        {
            TodaysScheduleViewer.Completed   += TodaysScheduleViewer_Completed;
            NextDaysScheduleViewer.Completed += NextDaysScheduleViewer_Completed;

            CurrentShowing = ClassScheduleViewer.ShowModes.Today;
            TodaysScheduleViewer.Loaded += (o, e) =>
            {
                TodaysScheduleViewer.StartCompletionTimer();
            };
        }