Exemplo n.º 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);
     }
 }
Exemplo n.º 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);
            }
        }