Telerik is a leading vendor of ASP.NET AJAX, ASP.NET MVC, Silverlight, WinForms and WPF controls and components, as well as .NET Reporting, .NET ORM , .NET CMS, Code Analysis, Mocking, Team Productivity and Automated Testing Tools. Building on its expertise in interface development and Microsoft technologies, Telerik helps customers build applications with unparalleled richness, responsiveness and interactivity. Telerik products help thousands of companies to be more productive and deliver reliable applications under budget and on time.
Version Q2 2011 released 07/12/2011
select

TagCloud / First Look

Configure Example
Distribution
Sorting
MinimalWeightAllowed
MaxNumberOfItems
TakeTopWeightedItems
RenderItemWeight
MinFontSize(px,%,em)*
MaxFontSize(px,%,em)*

  • * The MinFontSize and MaxFontSize properties accept values of type System.Web.UI.WebControls.Unit. The font-size of the TagCloud items will have the same System.Web.UI.WebControls.UnitType as the one of the properties.

Source Code

C# VB.NET
Show code in new window Demo isolation steps
  • <%@ Page Language="c#" AutoEventWireup="true" Inherits="Telerik.Web.Examples.TagCloud.Default.DefaultCS"
        CodeFile="DefaultCS.aspx.cs" %>

    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
    <%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>
    <%@ Register TagPrefix="qsf" TagName="Header" Src="~/Common/Header.ascx" %>
    <%@ Register TagPrefix="qsf" TagName="HeadTag" Src="~/Common/HeadTag.ascx" %>
    <%@ Register TagPrefix="qsf" TagName="Footer" Src="~/Common/Footer.ascx" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
        <qsf:HeadTag ID="Headtag1" runat="server" />
        <style type="text/css">
            .mainDiv
            {
                width: 100%;
                min-height: 310px;
                margin-top: 20px;
                height: auto;
                position: relative;
            }
            .configurationPanel
            {
                width: 360px;
                height: 250px;
                border: 0px;
                display: inline;
                float: right;
            }
            .propertyRow
            {
                margin-bottom: 5px;
            }
            .propertyName
            {
                float: left;
                width: 150px;
            }
        </style>
    </head>
    <body class="BODY">
        <form id="Form2" method="post" runat="server">
        <qsf:Header ID="Header1" runat="server" NavigationLanguage="c#" ShowSkinChooser="true" />
        <telerik:RadScriptManager ID="ScriptManager" runat="server" />
        <telerik:RadFormDecorator ID="FormDecorator1" runat="server" DecoratedControls="All"
            Skin="Simple" />
        <telerik:RadAjaxLoadingPanel ID="LoadingPanel1" runat="server" MinDisplayTime="500">
        </telerik:RadAjaxLoadingPanel>
        <telerik:RadAjaxPanel ID="AjaxPanel" runat="server" LoadingPanelID="LoadingPanel1">
            <div class="mainDiv">
                <div style="width: 410px; float: left;">
                    <telerik:RadTagCloud ID="RadTagCloud1" runat="server" Width="400px">
                        <Items>
                            <telerik:RadTagCloudItem Text="ASP.NET" Weight="12" />
                            <telerik:RadTagCloudItem Text="AJAX" Weight="134" />
                            <telerik:RadTagCloudItem Text="VB" Weight="56" />
                            <telerik:RadTagCloudItem Text="C#" Weight="38" />
                            <telerik:RadTagCloudItem Text="Web" Weight="73" />
                            <telerik:RadTagCloudItem Text="jQuery" Weight="23" />
                            <telerik:RadTagCloudItem Text=".NET" Weight="78" />
                            <telerik:RadTagCloudItem Text="Code" Weight="50" />
                            <telerik:RadTagCloudItem Text="UI" Weight="80" />
                            <telerik:RadTagCloudItem Text="Unit" Weight="20" />
                            <telerik:RadTagCloudItem Text="Class" Weight="50" />
                            <telerik:RadTagCloudItem Text="Tools" Weight="40" />
                            <telerik:RadTagCloudItem Text="Dynamic" Weight="58" />
                            <telerik:RadTagCloudItem Text="Telerik" Weight="60" />
                            <telerik:RadTagCloudItem Text="HTTP" Weight="64" />
                            <telerik:RadTagCloudItem Text="Start" Weight="62" />
                            <telerik:RadTagCloudItem Text="Response" Weight="23.7" />
                            <telerik:RadTagCloudItem Text="Client-side" Weight="55" />
                            <telerik:RadTagCloudItem Text="Default" Weight="8.5" />
                            <telerik:RadTagCloudItem Text="Event" Weight="45" />
                            <telerik:RadTagCloudItem Text="Property" Weight="24" />
                            <telerik:RadTagCloudItem Text="Tests" Weight="81" />
                            <telerik:RadTagCloudItem Text="Method" Weight="87" />
                            <telerik:RadTagCloudItem Text="DataSource" Weight="34" />
                            <telerik:RadTagCloudItem Text="JavaScript" Weight="35.70" />
                            <telerik:RadTagCloudItem Text="Server-side" Weight="59.3" />
                            <telerik:RadTagCloudItem Text="Accessibility" Weight="15.7" />
                            <telerik:RadTagCloudItem Text="HTML5" Weight="90" />
                            <telerik:RadTagCloudItem Text="XHTML" Weight="47.8" />
                            <telerik:RadTagCloudItem Text="Compliance" Weight="29.45" />
                            <telerik:RadTagCloudItem Text="Callback" Weight="53" />
                            <telerik:RadTagCloudItem Text="Request" Weight="39.3" />
                            <telerik:RadTagCloudItem Text="Postback" Weight="9.5" />
                            <telerik:RadTagCloudItem Text="DOM" Weight="65.49" />
                            <telerik:RadTagCloudItem Text="Markup" Weight="35.49" />
                            <telerik:RadTagCloudItem Text="Trigger" Weight="24.975" />
                            <telerik:RadTagCloudItem Text="XML" Weight="43.975" />
                            <telerik:RadTagCloudItem Text="CSS" Weight="14.392" />
                            <telerik:RadTagCloudItem Text="Object" Weight="85.6" />
                        </Items>
                    </telerik:RadTagCloud>
                </div>
                <div style="float: right;">
                    <qsf:ConfiguratorPanel runat="server" ID="ConfigurationPanel1" Title="Configure Example"
                        Expanded="true" Width="400px">
                        <div id="configurationPanel" class="configurationPanel">
                            <div class="propertyRow">
                                <div class="propertyName">
                                    Distribution
                                </div>
                                <div>
    <asp:DropDownList ID="ddlChooseDistribution" Width="150px" runat="server" OnSelectedIndexChanged="rblChooseDistribution_SelectedIndexChanged"
    AutoPostBack="true">

                                        <asp:ListItem Text="Linear" Value="Linear"></asp:ListItem>
                                        <asp:ListItem Text="Logarithmic" Value="Logarithmic"></asp:ListItem>
                                    </asp:DropDownList>
                                </div>
                            </div>
                            <div class="propertyRow">
                                <div class="propertyName">
                                    Sorting
                                </div>
                                <div>
    <asp:DropDownList ID="ddlSortItems" Width="150px" runat="server" OnSelectedIndexChanged="ddlSortItems_SelectedIndexChanged"
    AutoPostBack="true">

                                        <asp:ListItem Text="NotSorted" Value="NotSorted"></asp:ListItem>
                                        <asp:ListItem Text="AlphabeticAsc" Value="AlphabeticAsc"></asp:ListItem>
                                        <asp:ListItem Text="AlphabeticDsc" Value="AlphabeticDsc"></asp:ListItem>
                                        <asp:ListItem Text="WeightedAsc" Value="WeightedAsc"></asp:ListItem>
                                        <asp:ListItem Text="WeightedDsc" Value="WeightedDsc"></asp:ListItem>
                                    </asp:DropDownList>
                                </div>
                            </div>
                            <div class="propertyRow">
                                <div class="propertyName">
                                    MinimalWeightAllowed
                                </div>
                                <div>
    <asp:DropDownList ID="ddlMinWeight" Width="150px" runat="server" AutoPostBack="true"
    OnSelectedIndexChanged="ddlMinWeight_SelectedIndexChanged">

                                        <asp:ListItem Text="No Minimal Weight" Value="0"></asp:ListItem>
                                        <asp:ListItem Text="40" Value="40"></asp:ListItem>
                                        <asp:ListItem Text="60" Value="60"></asp:ListItem>
                                        <asp:ListItem Text="80" Value="80"></asp:ListItem>
                                    </asp:DropDownList>
                                </div>
                            </div>
                            <div class="propertyRow">
                                <div class="propertyName">
                                    MaxNumberOfItems
                                </div>
                                <div>
    <asp:DropDownList ID="ddlMaxFontSize" Width="150px" runat="server" AutoPostBack="true"
    OnSelectedIndexChanged="ddlMaxFontSize_SelectedIndexChanged">

                                        <asp:ListItem Text="All Tags" Value="0"></asp:ListItem>
                                        <asp:ListItem Text="10 Tags" Value="10"></asp:ListItem>
                                        <asp:ListItem Text="20 Tags" Value="20"></asp:ListItem>
                                        <asp:ListItem Text="30 Tags" Value="30"></asp:ListItem>
                                    </asp:DropDownList>
                                </div>
                            </div>
                            <div class="propertyRow">
                                <div class="propertyName">
                                    TakeTopWeightedItems
                                </div>
                                <div>
                                    <asp:CheckBox ID="cbTakeTopWeightedItems" runat="server" AutoPostBack="true" OnCheckedChanged="cbTakeTopWeightedItems_CheckedChanged" />
                                </div>
                            </div>
                            <div class="propertyRow">
                                <div class="propertyName">
                                    RenderItemWeight
                                </div>
                                <div>
    <asp:CheckBox ID="cbShowItemWeight" runat="server" OnCheckedChanged="cbShowItemWeight_CheckedChanged"
    AutoPostBack="true" />

                                </div>
                            </div>
                            <div class="propertyRow">
                                <div class="propertyName">
                                    MinFontSize(px,%,em)<span style="color: Red;">*</span>
                                </div>
                                <div>
                                    <asp:TextBox ID="tbMinFontSize" Width="60px" runat="server"></asp:TextBox>
                                </div>
                            </div>
                            <div class="propertyRow">
                                <div class="propertyName">
                                    MaxFontSize(px,%,em)<span style="color: Red;">*</span>
                                </div>
                                <div>
                                    <asp:TextBox ID="tbMaxFontSize" Width="60px" runat="server"></asp:TextBox>
                                </div>
                            </div>
                            <div class="propertyRow">
                                <div class="propertyName" style="height: 5px;">
                                </div>
                                <div>
                                    <asp:Button ID="btnConfigureTagCloud" runat="server" Text="Set Font-Size" OnClick="btnConfigureTagCloud_Click" />
                                </div>
                            </div>
                        </div>
                    </qsf:ConfiguratorPanel>
                </div>
                <div style="clear: both; height: 1px; margin-top: -1px;">
                </div>
            </div>
        </telerik:RadAjaxPanel>
        <qsf:Footer runat="server" ID="Footer1" ShowCodeViewer="true" />
        </form>
    </body>
    </html>

Get more than expected!

 
 

Take your time to truly experience the power of RadControls for ASP.NET AJAX with a free 60-day trial backed up by Telerik’s unlimited dedicated support.

Download your RadControls for ASP.NET AJAX trial and jumpstart your development with the available Getting Started resources.

If you have any questions, do not hesitate to contact us at sales@telerik.com.

Copyright 2002-2024 © Telerik. All right reserved
Telerik Inc, 201 Jones Rd, Waltham, MA 02451