示例#1
0
        void SetCompletionWindowWidth(ICompletionListWindow completionWindow, XmlCompletionItemCollection completionItems)
        {
            XmlCompletionItem firstListItem = completionItems[0];

            if (firstListItem.DataType == XmlCompletionItemType.NamespaceUri)
            {
                completionWindow.Width = double.NaN;
            }
        }
示例#2
0
        public XmlCompletionItemCollection GetNamespaceCompletion()
        {
            XmlCompletionItemCollection completionItems = new XmlCompletionItemCollection();

            foreach (XmlSchemaCompletion schema in this)
            {
                XmlCompletionItem completionItem = new XmlCompletionItem(schema.NamespaceUri, XmlCompletionItemType.NamespaceUri);
                if (!completionItems.Contains(completionItem))
                {
                    completionItems.Add(completionItem);
                }
            }

            return(completionItems);
        }