Example #1
0
        internal static ViewLink GetViewLinkFromElement(Interop.IHTMLElement element)
        {
            object[] attr = new object[1];
            element.GetAttribute(VIEWLINK_ATTRIB, 0, attr);
            ViewLink vlAttr = attr[0] as ViewLink;

            return(vlAttr);
        }
Example #2
0
 public void Disconnect()
 {
     if (this._eventSinkCookie != null)
     {
         this._eventSinkCookie.Disconnect();
         this._eventSinkCookie = null;
     }
     this._element  = null;
     this._behavior = null;
 }
Example #3
0
        /// <summary>
        /// Updates the designtime html by writing back the content to the native element.
        /// </summary>
        /// <remarks>
        /// This method works recursively and respects nested elements.
        /// </remarks>
        public override void UpdateDesignTimeHtml()
        {
            Interop.IHTMLElement elem = component.GetBaseElement();
            ViewLink             vl   = GetViewLinkFromElement(elem);
            string s = String.Empty;

            Interop.IHTMLDOMNode node = ((Interop.IHTMLDOMNode)vl.DesignTimeElementView);
            elem.SetInnerHTML(s);
            Interop.IHTMLDOMNode targetNode = (Interop.IHTMLDOMNode)elem;
            LoopNodes(node, targetNode, ((Interop.IHTMLElement)targetNode).GetDocument() as Interop.IHTMLDocument2);
        }
Example #4
0
 public EventSink(ViewLink behavior)
 {
     this._behavior = behavior;
 }