AngleSharp by AngleSharp

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

.NET API 1,213,440 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, IMarkupFormattable, 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 -1; } } public HorizontalAlignment Align { get { return GetOwnAttribute(AttributeNames.Align).ToEnum(HorizontalAlignment.Left); } set { SetOwnAttribute(AttributeNames.Align, value.ToString()); } } public VerticalAlignment VAlign { get { return GetOwnAttribute(AttributeNames.Valign).ToEnum(VerticalAlignment.Middle); } set { SetOwnAttribute(AttributeNames.Valign, value.ToString()); } } public string BgColor { get { return GetOwnAttribute(AttributeNames.BgColor); } set { SetOwnAttribute(AttributeNames.BgColor, value); } } public string Width { get { return GetOwnAttribute(AttributeNames.Width); } set { SetOwnAttribute(AttributeNames.Width, value); } } public string Height { get { return GetOwnAttribute(AttributeNames.Height); } set { SetOwnAttribute(AttributeNames.Height, value); } } public int ColumnSpan { get { return GetOwnAttribute(AttributeNames.ColSpan).ToInteger(0); } set { SetOwnAttribute(AttributeNames.ColSpan, value.ToString()); } } public int RowSpan { get { return GetOwnAttribute(AttributeNames.RowSpan).ToInteger(0); } set { SetOwnAttribute(AttributeNames.RowSpan, value.ToString()); } } public bool NoWrap { get { return GetOwnAttribute(AttributeNames.NoWrap).ToBoolean(false); } set { SetOwnAttribute(AttributeNames.NoWrap, value.ToString()); } } public string Abbr { get { return GetOwnAttribute(AttributeNames.Abbr); } set { SetOwnAttribute(AttributeNames.Abbr, value); } } public string Scope { get { return GetOwnAttribute(AttributeNames.Scope); } set { SetOwnAttribute(AttributeNames.Scope, value); } } public ISettableTokenList Headers { get { if (_headers == null) { _headers = new SettableTokenList(GetOwnAttribute(AttributeNames.Headers)); CreateBindings(_headers, AttributeNames.Headers); } return _headers; } } public string Axis { get { return GetOwnAttribute(AttributeNames.Axis); } set { SetOwnAttribute(AttributeNames.Axis, value); } } public HtmlTableCellElement(Document owner, string name, string prefix) : base(owner, name, prefix, NodeFlags.Special | NodeFlags.ImplicitelyClosed | NodeFlags.Scoped) { } } }