Windows7 skin

Menu - Overview

Use RadContextMenu, in order to check the visualization of the app in various device viewports
All devices
  • All Devices
  • Phone
    • Portait
    • Landscape
  • Tablet
    • Portait
    • Landscape
  • Laptop
  • Desktop
  • Exit
Isolate this demo as a stand-alone application
  • About this demo
  • C#
  • VB
The demo shows how the RadContextMenu could be used, in order to check the visualization of certain application in various device viewports. In addition, the custom attributes collection of the RadMenuItem is used for passing additional information to the OnClientItemClicked client-side function.
  • DefaultVB.aspx
  • styles.css
<%@ Page Language="vb"  %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "">
<html xmlns=''>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
    <link rel="stylesheet" type="text/css" href="styles.css" />

    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <qsf:MessageBox runat="server" ID="MessageBox1" Icon="Info" Type="Info">
        Use RadContextMenu, in order to check the visualization of the app in various device viewports
    <div class="demo-container" id="demoContainer">
        <div class="header">
            <div class="deviceIconWrapper">
                <span class="deviceIcon"></span>
                <span class="callout"></span>
            <asp:Label ID="Label1" Text="All devices" runat="server" CssClass="title" />
        <table class="content">
                    <img id="desktop" src="images/content-allDevices.png" alt="content" />
    <telerik:RadContextMenu runat="server" ID="ContextMenu1"
        EnableRoundedCorners="true" EnableShadows="true"
            <telerik:ContextMenuElementTarget ElementID="demoContainer" />
            <telerik:RadMenuItem Text="All Devices" Value="allDevices" />
            <telerik:RadMenuItem Text="Phone" Value="phoneP">
                    <telerik:RadMenuItem Text="Portait" Value="phoneP" Device="Phone"></telerik:RadMenuItem>
                    <telerik:RadMenuItem Text="Landscape" Value="phoneL" Device="Phone"></telerik:RadMenuItem>
            <telerik:RadMenuItem Text="Tablet" Value="tabletP">
                    <telerik:RadMenuItem Text="Portait" Value="tabletP" Device="Tablet"></telerik:RadMenuItem>
                    <telerik:RadMenuItem Text="Landscape" Value="tabletL" Device="Tablet"></telerik:RadMenuItem>
            <telerik:RadMenuItem Text="Laptop" Value="laptop" />
            <telerik:RadMenuItem Text="Desktop" Value="desktop" />
            <telerik:RadMenuItem Text="Exit" />

    <script type="text/javascript">
        var $ = $telerik.$;

        function OnClientItemClicked(sender, args) {
            var item = args.get_item(),
                itemValue = item.get_value(),
                itemText = item.get_text(),
                itemAttribute = item.get_attributes().getAttribute("Device");

            if (itemValue != null) {
                $get("desktop").src = "./images/content-" + itemValue + ".png";

                $(".deviceIcon").attr("class", "deviceIcon " + itemValue)

                if (itemAttribute != null)
                    $telerik.$(".title").html(itemAttribute + " " + itemText);




Find Assistance

Help Us Improve

Was this example helpful?