void SetCompletionWindowWidth(ICompletionListWindow completionWindow, XmlCompletionItemCollection completionItems) { XmlCompletionItem firstListItem = completionItems[0]; if (firstListItem.DataType == XmlCompletionItemType.NamespaceUri) { completionWindow.Width = double.NaN; } }
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); }