实现效果如下:
思路:照片自定义控件中放置两个Image分别展示照片墙图片和拼图裁切部分的图片,鼠标点击时执行旋转、位移、透明度组合动画。
步骤:
1、照片自定义控件MyPhotoControl
public static readonly DependencyProperty PuzzleImageProperty = DependencyProperty.Register("PuzzleImage", typeof(BitmapImage), typeof(MyPhotoControl), new PropertyMetadata(null));
public BitmapImage PuzzleImage
{
get { return (BitmapImage)GetValue(PuzzleImageProperty); }
set { SetValue(PuzzleImageProperty, value); }
}
public static readonly DependencyProperty BackgroundImageProperty = DependencyProperty.Register("BackgroundImage", typeof(BitmapSource), typeof(MyPhotoControl),