实现效果如下:

思路:基本原理同博文WPF实现聚光灯动画效果一致,难点在与正弦曲线的绘制和动态效果。
步骤:
1、自定义控件MyLoadingControl的封装
添加自定义Value属性:
public static readonly DependencyProperty ValueProperty = DependencyProperty.Register("Value", typeof(int), typeof(MyLoadingControl), new PropertyMetadata(null));
public int Value
{
get { return (int)GetValue(ValueProperty); }
set { SetValue(ValueProp
本文介绍如何在WPF中实现Loading加载时的文字水波纹动画效果,通过自定义控件MyLoadingControl,利用StreamGeometry绘制正弦曲线,并使用DispatcherTimer创建动态效果。
订阅专栏 解锁全文
2259

被折叠的 条评论
为什么被折叠?



