/// <summary>
 /// Construct a <c>TextElement</c> with the specified <see cref="TextStyle"/>
 /// </summary>
 public TextElement(TextStyle textStyle)
 {
     TextStyle = textStyle ;
 }
        public void AddRange(TextStyle [] textStyles)
        {
            foreach(TextStyle textStyle in textStyles) {
                if (textStyle != null) {
                    textStyle.PropertyChange += new UIComponents.TextElementPropertyChangeEventHandler(TextStyleCollection_PropertyChange);
                    base.InnerList.Add(textStyle) ;
                }
            }

            OnChangeEvent() ;
        }
 public void Insert(int index,TextStyle textStyle)
 {
     if (textStyle != null) {
         List.Insert(index,textStyle) ;
         textStyle.PropertyChange += new UIComponents.TextElementPropertyChangeEventHandler(TextStyleCollection_PropertyChange);
         OnChangeEvent() ;
     }
 }
        public int Add(TextStyle textStyle)
        {
            if (textStyle == null)
                return -1 ;

            int result = base.InnerList.Add(textStyle) ;

            if (result != -1) {
                textStyle.PropertyChange += new UIComponents.TextElementPropertyChangeEventHandler(TextStyleCollection_PropertyChange);
                OnChangeEvent() ;
            }

            return result ;
        }