AngleSharp by Florian Rappl

<PackageReference Include="AngleSharp" Version="0.8.0" />

.NET API 1,171,968 bytes

 HtmlTableCellElement

Represents the object for HTML table cell elements.
using AngleSharp.Dom.Collections; using AngleSharp.Dom.Css; using AngleSharp.Extensions; using AngleSharp.Html; namespace AngleSharp.Dom.Html { internal abstract class HtmlTableCellElement : HtmlElement, IHtmlTableCellElement, IHtmlElement, IElement, INode, IEventTarget, IParentNode, IChildNode, INonDocumentTypeChildNode, IElementCssInlineStyle { private SettableTokenList _headers; public int Index { get { IElement parentElement = base.ParentElement; while (parentElement != null && !(parentElement is IHtmlTableRowElement)) { parentElement = parentElement.ParentElement; } HtmlTableRowElement htmlTableRowElement = parentElement as HtmlTableRowElement; if (htmlTableRowElement != null) return htmlTableRowElement.IndexOf(this); return 0; } } public HorizontalAlignment Align { get { return GetAttribute(AttributeNames.Align).ToEnum(HorizontalAlignment.Left); } set { SetAttribute(AttributeNames.Align, value.ToString()); } } public VerticalAlignment VAlign { get { return GetAttribute(AttributeNames.Valign).ToEnum(VerticalAlignment.Middle); } set { SetAttribute(AttributeNames.Valign, value.ToString()); } } public string BgColor { get { return GetAttribute(AttributeNames.BgColor); } set { SetAttribute(AttributeNames.BgColor, value); } } public string Width { get { return GetAttribute(AttributeNames.Width); } set { SetAttribute(AttributeNames.Width, value); } } public string Height { get { return GetAttribute(AttributeNames.Height); } set { SetAttribute(AttributeNames.Height, value); } } public int ColumnSpan { get { return GetAttribute(AttributeNames.ColSpan).ToInteger(0); } set { SetAttribute(AttributeNames.ColSpan, value.ToString()); } } public int RowSpan { get { return GetAttribute(AttributeNames.RowSpan).ToInteger(0); } set { SetAttribute(AttributeNames.RowSpan, value.ToString()); } } public bool NoWrap { get { return GetAttribute(AttributeNames.NoWrap).ToBoolean(false); } set { SetAttribute(AttributeNames.NoWrap, value.ToString()); } } public string Abbr { get { return GetAttribute(AttributeNames.Abbr); } set { SetAttribute(AttributeNames.Abbr, value); } } public string Scope { get { return GetAttribute(AttributeNames.Scope); } set { SetAttribute(AttributeNames.Scope, value); } } public ISettableTokenList Headers { get { if (_headers == null) { _headers = new SettableTokenList(GetAttribute(AttributeNames.Headers)); _headers.Changed += delegate { UpdateAttribute(AttributeNames.Headers, _headers.Value); }; } return _headers; } } public string Axis { get { return GetAttribute(AttributeNames.Axis); } set { SetAttribute(AttributeNames.Axis, value); } } public HtmlTableCellElement(Document owner, string name) : base(owner, name, NodeFlags.Special | NodeFlags.ImplicitelyClosed | NodeFlags.Scoped) { } } }