コード例 #1
0
        bool TryGetUriProperty(object imageSource, out AbstractProperty uriProperty)
        {
            uriProperty = null;
            if (imageSource == null)
            {
                return(false);
            }

            MultiImageSource miSource = imageSource as MultiImageSource;

            if (miSource != null)
            {
                uriProperty = miSource.UriSourceProperty;
                return(true);
            }

            BitmapImageSource bSource = imageSource as BitmapImageSource;

            if (bSource != null)
            {
                uriProperty = bSource.UriSourceProperty;
                return(true);
            }
            return(false);
        }
コード例 #2
0
        public override void DeepCopy(IDeepCopyable source, ICopyManager copyManager)
        {
            base.DeepCopy(source, copyManager);
            Detach();
            MultiImageSource mis = (MultiImageSource)source;

            UriSource          = mis.UriSource;
            DecodePixelWidth   = mis.DecodePixelWidth;
            DecodePixelHeight  = mis.DecodePixelHeight;
            Thumbnail          = mis.Thumbnail;
            ThumbnailDimension = mis.ThumbnailDimension;
            Attach();
            FreeData();
        }