public static string MetricAnchor(this string resolvedUrl, int? metricVariantId) { if (metricVariantId == null) return resolvedUrl; return resolvedUrl.Anchor("m" + metricVariantId); }
/// <summary> /// The <c><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><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>‌	‌	‌	 /// • An unvisited link is underlined and blue <remarks></remarks>‌	‌	‌	 /// • A visited link is underlined and purple <remarks></remarks>‌	‌	‌	 /// • 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 | <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); }
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); }