Esempio n. 1
0
 /// <summary>
 /// Handle hover over a link.
 /// </summary>
 /// <param name="sender">The control</param>
 /// <param name="args">The link hover arguments</param>
 private void OnLinkHover(object sender, HtmlLinkHoverEventArgs args)
 {
     CanvasHoverArgs newArgs = new CanvasHoverArgs
     {
         Component = this,
         Link = args.Link,
         Location = new Point((int) args.Location.X + Bounds.X, (int) args.Location.Y + Bounds.Y)
     };
     _layout.Container.RaiseHover(newArgs);
 }
Esempio n. 2
0
 /// <summary>
 /// Propagate the LinkHover event from root container.
 /// </summary>
 protected virtual void OnLinkHover(HtmlLinkHoverEventArgs e)
 {
     var handler = LinkHover;
     if (handler != null)
         handler(this, e);
 }
Esempio n. 3
0
 private void OnLinkHover(object sender, HtmlLinkHoverEventArgs e)
 {
     OnLinkHover(e);
 }
Esempio n. 4
0
 /// <summary>
 /// Handle link hover going over <see cref="LinkHover"/> event.
 /// </summary>
 /// <param name="parent">the control hosting the html to invalidate</param>
 /// <param name="location">the location of the mouse</param>
 /// <param name="link">the link that was hovered</param>
 internal void HandleLinkHover(RControl parent, RPoint location, CssBox link)
 {
     EventHandler<HtmlLinkHoverEventArgs> hoverHandler = LinkHover;
     if (hoverHandler != null)
     {
         var args = new HtmlLinkHoverEventArgs(link.HrefLink, location, link.HtmlTag.Attributes);
         try
         {
             hoverHandler(this, args);
         }
         catch (Exception ex)
         {
             throw new HtmlLinkClickedException("Error in link hover intercept", ex);
         }
     }
 }