/// <summary> /// Removes specified object from the collection. /// </summary> /// <param name="value"></param> public void Remove(MarkupElement value) { List.Remove(value); }
internal void SetParent(MarkupElement parent) { m_Parent = parent; }
/// <summary> /// Returns index of the object inside of the collection. /// </summary> /// <param name="value">Reference to the object.</param> /// <returns>Index of the object.</returns> public int IndexOf(MarkupElement value) { return List.IndexOf(value); }
/// <summary> /// Returns whether collection contains specified object. /// </summary> /// <param name="value">Object to look for.</param> /// <returns>true if object is part of the collection, otherwise false.</returns> public bool Contains(MarkupElement value) { return List.Contains(value); }
/// <summary> /// Adds new object to the collection. /// </summary> /// <param name="MarkupElement">Object to add.</param> /// <returns>Index of newly added object.</returns> public int Add(MarkupElement MarkupElement) { return List.Add(MarkupElement); }
/// <summary> /// Inserts new object into the collection. /// </summary> /// <param name="index">Position of the object.</param> /// <param name="value">Object to insert.</param> public void Insert(int index, MarkupElement value) { List.Insert(index, value); }
/// <summary>Creates new instance of the class.</summary> public MarkupElementCollection(MarkupElement parent) { m_Parent = parent; }
/// <summary> /// Copies contained items to the MarkupElement array. /// </summary> /// <param name="array">Array to copy to.</param> internal void CopyTo(MarkupElement[] array) { List.CopyTo(array,0); }
/// <summary> /// Copies collection into the specified array. /// </summary> /// <param name="array">Array to copy collection to.</param> /// <param name="index">Starting index.</param> public void CopyTo(MarkupElement[] array, int index) { List.CopyTo(array, index); }
public EndMarkupElement(MarkupElement startElement) { m_StartElement = startElement; }
protected virtual void ArrangeInternal(Rectangle bounds, MarkupDrawContext d) { SerialContentLayoutManager layout = GetLayoutManager(d.AllowMultiLine); layout.RightToLeft = d.RightToLeft; MarkupLayoutManager markupLayout = GetMarkupLayout(); markupLayout.MarkupDrawContext = d; try { MarkupElement[] blocks = new MarkupElement[this.Elements.Count]; this.Elements.CopyTo(blocks); Rectangle r = layout.Layout(new Rectangle(Point.Empty, bounds.Size), blocks, markupLayout); this.Bounds = new Rectangle(bounds.Location, r.Size); } finally { markupLayout.MarkupDrawContext = null; } }