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)); }
public static string GetPackUriFromType(Type type, OpcReferencedTypeStrategy strategy) { return(OpcUtility.GetPackUriFromType(type, strategy, "xaml")); }