Esempio n. 1
0
        /// <summary>
        /// If overriding don't forget to call base.Load() or make sure to
        /// assign the WrappedElement.
        /// </summary>
        /// <returns></returns>
        /// <exception cref="InvalidElementStateException">
        /// Element is missing the id attribute.
        /// </exception>
        public override ILoadableComponent Load()
        {
            base.Load();

            var id = WrappedElement.GetAttribute("id");

            if (String.IsNullOrEmpty(id))
            {
                throw new InvalidElementStateException("Element is missing " +
                                                       "the id attribute.");
            }

            var indexOfWrappedEl = WrappedElement.GetIndexRelativeToSiblings();

            TagEditorContainerElement = WrappedElement
                                        .GetParentElement()
                                        .Children()
                                        .ElementAt(indexOfWrappedEl + 1);

            return(this);
        }