Example #1
0
        void FadeOut_Completed(object sender, EventArgs e)
        {
            FadeOut.Stop();
            FadeIn.Stop();
            currentTextBlock.Text = textCollection[textCounter];
            textCounter++;
            if (textCounter == 5)
            {
                textCounter = 0;

                if (currentTextBlock == PageTitle)
                {
                    currentTextBlock = ApplicationTitle;
                }
                else
                {
                    currentTextBlock = PageTitle;
                }

                Storyboard.SetTarget(FadeIn, currentTextBlock);
                Storyboard.SetTarget(FadeOut, currentTextBlock);
            }

            FadeIn.Begin();
        }
Example #2
0
 private void FadeIn_Tick(object sender, EventArgs e)
 {
     if (PresentationViewModelProp.FrontElement.IsActive)
     {
         if (PresentationViewModelProp.OpacitiyFrontElement > 1)
         {
             PresentationViewModelProp.OpacitiyFrontElement = 1;
             FadeIn.Stop();
         }
         else if (PresentationViewModelProp.OpacitiyFrontElement < 1)
         {
             PresentationViewModelProp.OpacitiyFrontElement += 0.020;
         }
     }
     else
     {
         if (PresentationViewModelProp.OpacitiyBackElement > 1)
         {
             PresentationViewModelProp.OpacitiyBackElement = 1;
             FadeIn.Stop();
         }
         else if (PresentationViewModelProp.OpacitiyBackElement < 1)
         {
             PresentationViewModelProp.OpacitiyBackElement += 0.020;
         }
     }
 }