Exemple #1
0
        void Animate(WindowContentHolder wch)
        {
            DoubleAnimation da = new DoubleAnimation(0, 250, new Duration(TimeSpan.FromMilliseconds(350)));

            da.FillBehavior = FillBehavior.Stop;
            wch.BeginAnimation(WindowContentHolder.HeightProperty, da);
            wch.BeginAnimation(WindowContentHolder.OpacityProperty, new DoubleAnimation(0, 1.0, new Duration(TimeSpan.FromMilliseconds(350))));
        }
Exemple #2
0
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            WindowContentHolder wch = LayoutHelper.FindParentObject <WindowContentHolder>((DependencyObject)value);

            Application.Current.Dispatcher.BeginInvoke(new StartAnimationEventDelegate(Animate), wch);
            wch.IsVisibleChanged += new DependencyPropertyChangedEventHandler(wch_IsVisibleChanged);
            return(wch.Background);
        }