1. 程式人生 > >WPF 實現水紋效果

WPF 實現水紋效果

att article ase val blog edev osi ofo get

原文:WPF 實現水紋效果

鼠標滑過產生水紋,效果圖如下:

?

技術分享圖片

?

XMAL就放置了一個img標簽

?

後臺主要代碼

窗體加載:

?

計時器:

?

鼠標移動事件:

?

?

水紋的算法參考

http://dev.gameres.com/Program/Visual/2D/2DWater.htm
http://topic.csdn.net/u/20100331/16/7b52e46e-d859-4af1-921d-10a9c2bd88ff.html

?

代碼實例:

http://download.csdn.net/source/3117591

?

WPF 實現水紋效果