Beispiel #1
0
 public static double AddFadeable(Fadeable f)
 {
     Fadeables.Add(f);
     if (Fadeables.Count == 1)
         return 10;
     var last = Fadeables[Fadeables.Count - 2];
     return last.Top + last.Height + 10;
 }
Beispiel #2
0
        public static double AddFadeable(Fadeable f)
        {
            Fadeables.Add(f);
            if (Fadeables.Count == 1)
            {
                return(10);
            }
            var last = Fadeables[Fadeables.Count - 2];

            return(last.Top + last.Height + 10);
        }
Beispiel #3
0
 public static void RemoveFadeable(Fadeable f)
 {
     lock (LockObject)
     {
         if (f == null)
             return;
         var index = Fadeables.IndexOf(f);
         if(index < 0)
             return;
         var height = f.Height + 10;
         Fadeables.Remove(f);
         for (int i = index; i < Fadeables.Count; i++)
         {
             var fadeable = Fadeables[i];
             var da = new DoubleAnimation(fadeable.Top, fadeable.Top - height, 150.Milliseconds());
             fadeable.BeginAnimation(Window.TopProperty, da);
         }
     }
 }
Beispiel #4
0
 public static void RemoveFadeable(Fadeable f)
 {
     lock (LockObject)
     {
         if (f == null)
         {
             return;
         }
         var index = Fadeables.IndexOf(f);
         if (index < 0)
         {
             return;
         }
         var height = f.Height + 10;
         Fadeables.Remove(f);
         for (int i = index; i < Fadeables.Count; i++)
         {
             var fadeable = Fadeables[i];
             var da       = new DoubleAnimation(fadeable.Top, fadeable.Top - height, 150.Milliseconds());
             fadeable.BeginAnimation(Window.TopProperty, da);
         }
     }
 }