Пример #1
0
        private static void PopulateHTMLElementList()
        {
            AutoCompleteService.Instance.ClearListboxItems();

            foreach (var element in HTMLElements)
            {
                var lItem = new AutoCompleteItem(element.Name, AutoCompleteItemType.Object);
                AutoCompleteService.Instance.AddItem(lItem);
            }

            _listState = AutoCompleteListState.Elements;
        }
Пример #2
0
        private static void PopulateHTMLAttributeList(Token token, List<Token> tokens)
        {
            AutoCompleteService.Instance.ClearListboxItems();

            // add element-specific attributes
            if (IsInsideIncompleteAttributeName(token, tokens))
            {
                var element = GetElementWhileTypingAttribute(token, tokens);

                if (element != null)
                    AddHTMLAttributesToList(element.Attributes);
            }

            // add global attributes
            AddHTMLAttributesToList(GlobalHTMLAttributes);

            _listState = AutoCompleteListState.Attributes;
        }