public static string MetricAnchor(this string resolvedUrl, int? metricVariantId)
        {
            if (metricVariantId == null)
                return resolvedUrl;

            return resolvedUrl.Anchor("m" + metricVariantId);
        }
Exemple #2
0
 /// <summary>
 /// The <c>&lt;a></c> tag defines a hyperlink, which is used to link from one page to another. <remarks></remarks>
 /// The most important attribute of the <c>&lt;a></c> element is the href attribute, which indicates the link's destination. <remarks></remarks>
 /// By default, links will appear as follows in all browsers: <remarks></remarks>&#8204;&#009;&#8204;&#009;&#8204;&#009;
 /// &#8226; An unvisited link is underlined and blue <remarks></remarks>&#8204;&#009;&#8204;&#009;&#8204;&#009;
 /// &#8226; A visited link is underlined and purple <remarks></remarks>&#8204;&#009;&#8204;&#009;&#8204;&#009;
 /// &#8226; An active link is underlined and red <remarks> </remarks>
 /// 
 /// For more information see: <see cref="http://www.w3schools.com/tags/tag_a.asp"/>
 /// </summary>
 /// <param name="builder">Builder for the Html Component</param>
 /// <param name="address">The URI where the HyperLink should refer to<c> [href]</c></param>
 /// <param name="target">The window target<c> [target="_blank | _parent | _self | _top | &lt;frameName>"]</c> (optional)</param>
 /// <param name="attributes">Standard HTML Attributes (optional)</param>
 /// <returns></returns>
 public static IHtmlElement HyperLink(this IBuilder builder, 
     Uri address, 
     HyperLinkTarget target = null, 
     HtmlAttributes attributes = null)
 {
     var newAttributes = attributes ?? new HtmlAttributes();
     newAttributes.Add("href", address.ToString());
     if(target != null) newAttributes.Add("target", target.ToString());
     return builder.Anchor(newAttributes);
 }
Exemple #3
0
 public static System.Drawing.RectangleF Anchor(this System.Drawing.RectangleF that, System.Drawing.PointF position, AnchorPoints anchor)
 {
     return that.Anchor(position.X, position.Y, anchor);
 }