Пример #1
0
        static IMember Resolve(XAttribute attribute, ITextEditor editor)
        {
            XamlContext context = CompletionDataHelper.ResolveCompletionContext(editor, default(char), editor.Document.PositionToOffset(attribute.GetLineNumber(), attribute.GetLinePosition()));
            string      prefix  = context.XmlnsDefinitions.GetKeyByValue(attribute.Name.NamespaceName);

            if (!string.IsNullOrEmpty(prefix))
            {
                prefix += ":";
            }
            var mrr = XamlResolver.Resolve(prefix + attribute.Name.LocalName, context) as MemberResolveResult;

            if (mrr != null)
            {
                return(mrr.ResolvedMember);
            }

            return(null);
        }