Exemple #1
0
        public static Uri GetRelativePackUri(string absoluteUri)
        {
            if (!OpcUtility.IsPackUriValid(absoluteUri))
            {
                throw new ArgumentException("The URI string is not valid.", "absoluteUri");
            }

            string uri = absoluteUri
                         .Replace("pack://application:,,,", string.Empty);

            return(new Uri(uri, UriKind.Relative));
        }
Exemple #2
0
 public static string GetPackUriFromType(Type type, OpcReferencedTypeStrategy strategy)
 {
     return(OpcUtility.GetPackUriFromType(type, strategy, "xaml"));
 }