/// <summary> /// ctor /// </summary> /// <param name="element"></param> /// <param name="behavior"></param> internal protected void AssociatePeer(Interop.IHTMLElement element, DesignTimeBehavior behavior) { this.peer = element; this.peer2 = (Interop.IHTMLElement2)element; this.peer3 = (Interop.IHTMLElement3)element; this.behavior = behavior; }
/// <summary> /// Add peer. This is internally used und shall never be called from user code. /// </summary> /// <param name="element"></param> protected internal void AssociatePeer(Interop.IHTMLElement element) { this.peer = element; this.peer2 = (Interop.IHTMLElement2)element; this.peer3 = (Interop.IHTMLElement3)element; this.behavior = null; }
private void OnMoveStart() { Interop.IHTMLElement2 element1 = (Interop.IHTMLElement2) this._element; Interop.IHTMLCurrentStyle style1 = element1.GetCurrentStyle(); string text1 = style1.position; if ((text1 != null) && (string.Compare(text1, "absolute", true) == 0)) { this._elementMoving = true; } if (this._elementMoving) { object[] objArray1 = new object[1]; this._element.GetAttribute(EventSink.DesignTimeLockAttribute, 0, objArray1); if (objArray1[0] == null) { objArray1[0] = style1.getAttribute(EventSink.DesignTimeLockAttribute, 0); } if ((objArray1[0] != null) && (objArray1[0] is string)) { this._elementLocked = true; this._elementLockedTop = style1.top; this._elementLockedLeft = style1.left; } } }
void _host_ReadyStateComplete(object sender, EventArgs e) { if (_host.DesignModeEnabled) { body2 = ((Interop.IHTMLElement2)_host.GetBodyElement().GetBaseElement()); } }
/// <summary> /// ctor /// </summary> /// <param name="editor"></param> /// <param name="peer"></param> /// <param name="behavior"></param> internal AscxElement(IHtmlEditor editor, Interop.IHTMLElement peer, DesignTimeBehavior behavior) { this.editor = editor; this.peer = peer; this.peer2 = (Interop.IHTMLElement2)peer; this.peer3 = (Interop.IHTMLElement3)peer; this.behavior = behavior; }
/// <summary> /// Convenience method for checking if the specified element is absolutely positioned /// </summary> /// <param name="elem"></param> /// <returns></returns> private bool IsElement2DPositioned(Interop.IHTMLElement elem) { Interop.IHTMLElement2 elem2 = (Interop.IHTMLElement2)elem; Interop.IHTMLCurrentStyle style = elem2.GetCurrentStyle(); string position = style.GetPosition(); if ((position == null) || (String.Compare(position, "absolute", true) != 0)) { return(false); } return(true); }