GetSourceUri() private method

private GetSourceUri ( Image image ) : Uri
image Image
return System.Uri
Example #1
0
        private static Uri GetAbsoluteUri(Image image)
        {
            Uri relativeUri = AnimationBehavior.GetSourceUri(image);

            if (relativeUri == null)
            {
                return(null);
            }
            if (!relativeUri.IsAbsoluteUri)
            {
                Uri baseUri = new Uri("");
                if (!(baseUri != null))
                {
                    throw new InvalidOperationException("Relative URI can't be resolved");
                }
                relativeUri = new Uri(baseUri, relativeUri);
            }
            return(relativeUri);
        }