Icon Class

Renders and displays an identicon on a web page.
public class Icon : Image

Examples

In this example a static identicon is displayed on the page.
XML
<jdenticon:Icon runat="server" StringValue="Example" Size="60" />

Constructors

Public methodIcon
Initializes a new instance of the Icon class

Properties

Public propertyFormat
Gets or sets the format in which the icon will be generated. If no format is specified a PNG file is generated.
Public propertyHash
Gets or sets the hash that the icon will be based on.
Protected propertyHashCore
Gets or sets the compacted hash.
Public propertyHeight
Gets or sets the height of the Web server control.
Public propertySize
Gets or sets the size of the generated icon in pixels. If no size is specified a 64 pixel icon is generated.
Public propertyCode exampleStringValue
Gets or sets the value whose hash will be used as base for the icon.
Public propertyCode exampleValue
Gets or sets the value whose hash will be used as base for the icon.
Public propertyWidth
Gets or sets the width of the Web server control.

Examples

This example shows how to bind to the Value property in a Repeater.
ASPX file
<asp:Repeater ID="repeater" runat="server">
    <ItemTemplate>
        Value: <asp:Literal runat="server" Text='<%# Container.DataItem %>' />: <br/>
        <jdenticon:Icon runat="server" Value='<%# Container.DataItem %>' Size="60" /> <br/><br/>
    </ItemTemplate>
</asp:Repeater>
Code-behind file
protected void Page_Load(object sender, EventArgs e)
{
    repeater.DataSource = new object[]
    {
        123,
        124,
        "Item3",
        "Item4"
    };
    repeater.DataBind();
}

See Also

Reference