示例#1
0
        public void Update(bool actualSize, bool preserveAspectRatio, string sourceUrl = null)
        {
            if (NeedToDownloadImage && sourceUrl != null)
            {
                Uri imageUri;
                try
                {
                    imageUri = new Uri(sourceUrl);
                }
                catch (UriFormatException ex)
                {
                    throw ExceptionFactory.SourceFormat(ex);
                }

                LoadImageFromRemoteUrl(imageUri, actualSize, preserveAspectRatio);

                NeedToDownloadImage = false;
            }
            else if (SourceFileId != null)
            {
                LoadImage(SourceFileId, actualSize, preserveAspectRatio);
            }
        }
示例#2
0
 protected override void SetItem(int index, T item)
 {
     throw ExceptionFactory.CollectionSetterNotSupported();
 }