internal void AttachTitle() { _elmTitle = (ListItem)Browser.Document.GetById(Id + "-title"); _elmTitleA = (Anchor)_elmTitle.ChildNodes[0]; _elmTitleSpan = (Span)_elmTitleA.ChildNodes[0]; _elmATText = (Span)_elmTitleA.ChildNodes[1]; }
public override void Dispose() { _elmTitleA.Click -= OnTitleClick; _elmTitleA.KeyPress -= OnTitleKeyPress; _elmTitleA.DblClick -= OnTitleDblClick; base.Dispose(); _elmATText = null; _elmTitle = null; _elmTitleA = null; _elmTitleSpan = null; }
internal void EnsureTitleDOMElement() { if (CUIUtility.IsNullOrUndefined(_elmTitle)) _elmTitle = new ListItem(); }
protected override void AppendChildrenToElement(HtmlElement elm) { ListItem listItem; foreach (Component child in Children) { // Put all menu items into a list item for semantics listItem = new ListItem(); listItem.ClassName = "ms-cui-menusection-items"; // This is very important for performance // We should always try to append an empty child DOM Element // first and then call EnsureRefreshed() where the child fills it child.EnsureDOMElement(); listItem.AppendChild(child.ElementInternal); elm.AppendChild(listItem); child.EnsureRefreshed(); } }
public void Dispose() { _elmMain = null; _elmTitle = null; _elmTabTitleContainer = null; _tabCount = 0; }
/// <summary> /// Named "Attempt" because it is a valid case if the DOM element is not present in the DOM. /// This is unlike all the components whose DOM elements are expected to be there and /// it is a bug if they are not when Attach() is called. /// </summary> internal void AttemptAttachDOMElements() { ListItem elm = (ListItem)Browser.Document.GetById(Id); if (!CUIUtility.IsNullOrUndefined(elm)) { _elmMain = elm; _elmTitle = (Div)_elmMain.ChildNodes[0].ChildNodes[0]; _elmTabTitleContainer = (UnorderedList)_elmMain.ChildNodes[1]; } }