예제 #1
0
        /// <summary>
        /// 深度拷贝
        /// </summary>
        /// <returns>返回一个副本</returns>
        public object Clone()
        {
            var animatedImage = new AnimatedGif
            {
                Source  = (Content as AnimatedGif)?.Source,
                Stretch = Stretch.Fill
            };

            var imageControl = new ImageControl(ControlManager)
            {
                IsLockAspect    = IsLockAspect,
                Width           = Width,
                Height          = Height,
                Content         = animatedImage,
                Template        = Template,
                RenderTransform = RenderTransform.Clone(),
            };

            return(imageControl);
        }