private void ShowShadow(AyLayerOptions options) { if (options.HasShadow) { DropShadowEffect de = new DropShadowEffect(); //de.BlurRadius = options.ShadowRadius; de.Color = options.ShadowColor; de.ShadowDepth = options.ShadowDepth; body.Effect = de; body.Opacity = 0.1; de.BlurRadius = options.ShadowRadius; AyAniDouble _1 = new AyAniDouble(body); _1.AutoDestory = true; _1.AniPropertyPath = new PropertyPath("(FrameworkElement.Effect).(DropShadowEffect.BlurRadius)"); _1.FromDouble = 0; _1.ToDouble = options.ShadowRadius; _1.AniEasingMode = 2; _1.AnimateSpeed = 200; _1.Begin(); _1.Completed += () => { SetRealPoint(options); }; } else { SetRealPoint(options); } if (options.Opened.IsNotNull()) { options.Opened(); } }
private void SkinGetterXuanChuan_Loaded(object sender, RoutedEventArgs e) { //double _1 = 0; for (int i = 0; i < Number; i++) { RadioButton rb = new RadioButton(); rb.AddHandler(UIElement.MouseEnterEvent, new MouseEventHandler(Rb_MouseEnter), true); rb.AddHandler(UIElement.MouseLeaveEvent, new MouseEventHandler(Rb_MouseLeave), true); rb.Checked += Rb_Checked; rb.SetResourceReference(RadioButton.StyleProperty, "rdoNavSkin"); if (i == 0) { rb.IsChecked = true; } if (i > 0) { rb.Margin = new Thickness(12, 0, 0, 0); } rb.Tag = i; //_1 = _1 + LeftWidth; sp_navs.Children.Add(rb); } ad = new AyAniDouble(prev); isfirst = true; autoPlay = AyTime.setInterval(1000, () => { if (currplayIndex == (Number - 1)) { //最后1个 currplayIndex = 0; var _1 = sp_navs.Children[currplayIndex.ToInt()]; var _2 = _1 as RadioButton; _2.IsChecked = true; } else { currplayIndex++; var _1 = sp_navs.Children[currplayIndex.ToInt()]; var _2 = _1 as RadioButton; _2.IsChecked = true; } }); }
//IEasingFunction d2 = new System.Windows.Media.Animation.CircleEase { EasingMode = EasingMode.EaseOut }; public void AnimateShowCard() { List <AyAniDouble> anis = new List <AyAniDouble>(); //ug.Children; foreach (var item in ug.Children) { AyAniDouble ad = new AyAniDouble(item as SkinGetterViewBox2); ad.FromDouble = 0; ad.ToDouble = 1; ad.AniPropertyPath = pp; ad.AnimateSpeed = 200; ad.AniEasingMode = 1; anis.Add(ad); } if (ug.Children.Count > 0) { anis[0].Animate().End(); } int diz = 500; int first = 500; AyTime.setTimeout(first, () => { if (ug.Children.Count > 0) { anis[1].Animate().End(); } }); first = first + diz; AyTime.setTimeout(first, () => { if (ug.Children.Count > 0) { anis[2].Animate().End(); } }); first = first + diz; AyTime.setTimeout(first, () => { if (ug.Children.Count > 0) { anis[3].Animate().End(); } }); first = first + diz; AyTime.setTimeout(first, () => { if (ug.Children.Count > 0) { anis[4].Animate().End(); } }); first = first + diz; AyTime.setTimeout(first, () => { if (ug.Children.Count > 0) { anis[5].Animate().End(); } }); first = first + diz; AyTime.setTimeout(first, () => { if (ug.Children.Count > 0) { anis[6].Animate().End(); } }); first = first + diz; AyTime.setTimeout(first, () => { if (ug.Children.Count > 0) { anis[7].Animate().End(); } }); first = first + diz; AyTime.setTimeout(first, () => { if (ug.Children.Count > 0) { anis[8].Animate().End(); } }); first = first + diz; AyTime.setTimeout(first, () => { if (ug.Children.Count > 0) { anis[9].Animate().End(); } }); first = first + diz; var bn = new AyAniSlideInLeft(ugEx, () => { }); bn.FromDistance = -192; bn.OpacityNeed = false; bn.AnimateSpeed = 200; AyTime.setTimeout(first, () => { if (ug.Children.Count > 0) { bn.Animate().End(); } }); }