예제 #1
0
 void HideBackground(ITransitionControl container)
 {
     if (container.Contains(_background))
     {
         Animate.The(UIElement.OpacityProperty)
             .From(1d)
             .To(0d)
             .For(_duration)
             .UponCompletion(() => container.Remove(_background))
             .Create()
             .AnimateOn(_background);
     }
 }
예제 #2
0
        void ShowBackground(ITransitionControl container)
        {
            if (!container.Contains(_background))
            {
                container.Add(_background);

                Animate.The(UIElement.OpacityProperty)
                    .From(0d)
                    .To(1d)
                    .For(_duration)
                    .Create()
                    .AnimateOn(_background);
            }
        }