private void ScrollDeactivate_Click(object sender, RoutedEventArgs e)
        {
            double time = .75;
            double delay = 0;
            PercentHandler ease = AnimationTransitions.CubicEaseIn;

            newWindow.CurrentMarquee.AlphaTo(0, time, ease, 0);
            //newWindow.CurrentTitleBackground.AlphaTo(0, time, ease, .6);

            var timeout2 = new Artefact.Animation.Timeout(500, true).OnUpdate((w) =>
            { }).OnComplete(w =>
            {
                newWindow.CurrentTitleBackground.SlideTo(-86, 1200, time, ease, delay);

            });
        }
 //**************************************************************
 //
 //  Functions to control name and titles
 //
 //**************************************************************
 private void replaceLowerThirdText(string tempName, string tempTitle)
 {
     MainLowerThirdActivateFunc();
     var timeout3 = new Artefact.Animation.Timeout(750, true).OnUpdate((x) =>
     { }).OnComplete(x =>
     {
         FadeOut(newWindow.LowerThirdNameTag);
         FadeOut(newWindow.LowerThirdJobTag);
         var timeout2 = new Artefact.Animation.Timeout(750, true).OnUpdate((w) =>
         { }).OnComplete(w =>
         {
             newWindow.LowerThirdNameTag.Content = tempName;
             newWindow.LowerThirdJobTag.Content = tempTitle;
             FadeIn(newWindow.LowerThirdNameTag);
             FadeIn(newWindow.LowerThirdJobTag);
         });
     });
 }
 //******************************************************************
 //
 // Various other Animation controls
 //
 //******************************************************************
 private void button2_Click_1(object sender, RoutedEventArgs e)
 {
     FadeOut(newWindow.LowerThirdNameTag);
     FadeOut(newWindow.LowerThirdJobTag);
     var timeout2 = new Artefact.Animation.Timeout(750, true).OnUpdate((w) =>
     { }).OnComplete(w =>
     {
         newWindow.LowerThirdNameTag.Content = "Al Allen";
         newWindow.LowerThirdJobTag.Content = "District 11";
         FadeIn(newWindow.LowerThirdNameTag);
         FadeIn(newWindow.LowerThirdJobTag);
     });
 }
        private void MainLowerThirdDeactivateFunc()
        {
            double time = 1.5;
            double delay = 0;
            PercentHandler ease = AnimationTransitions.CubicEaseOut;
            PercentHandler ease2 = AnimationTransitions.CubicEaseIn;

            FadeOut(newWindow.LowerThirdNameTag);
            FadeOut(newWindow.LowerThirdJobTag);

            var timeout2 = new Artefact.Animation.Timeout(500, true).OnUpdate((w) =>
            { }).OnComplete(w =>
            {
                newWindow.LowerThirdBackground.DimensionsTo(0, 139, time, ease2, delay);

            });
        }
        // Function to manually select an agenda item my double clicking on it.
        private void agendaItemsTree_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            double time = .75;
            String test = "";

            PercentHandler ease = AnimationTransitions.CubicEaseOut;
            TreeViewItem temp = (TreeViewItem) agendaItemsTree.SelectedItem;

            ScrollActivateFunc();

            //Fades the current marquee text
            newWindow.CurrentMarquee.AlphaTo(0, time, ease, 0);

            var timeout2 = new Artefact.Animation.Timeout(750, true).OnUpdate((w) =>
            { }).OnComplete(w =>
            {
                // Stops the current marquees animation and changes it's value
                newWindow.CurrentMarquee.BeginAnimation(Canvas.LeftProperty, null);
                newWindow.CurrentMarquee.Content = temp.Header.ToString();

                //Restarts the animation wiht new data
                test = newWindow.CurrentMarquee.ToString();
                DoubleAnimation doubleAnimation = new DoubleAnimation();
                doubleAnimation.To = -test.Length * 17;
                doubleAnimation.From = newWindow.Main.ActualWidth;
                doubleAnimation.RepeatBehavior = RepeatBehavior.Forever;
                doubleAnimation.Duration = new Duration(TimeSpan.Parse("0:0:30"));
                if (test.Length > 72)
                {
                    newWindow.CurrentMarquee.BeginAnimation(Canvas.LeftProperty, doubleAnimation);
                }

                //Fades the marqee text back into view
                newWindow.CurrentMarquee.AlphaTo(1, time, ease, .3);
            });
        }