RibbonBar - Populating from Xml

  • File
  • Home
  • Insert
  • View
Item ImagePaste Item ImageCutItem ImageCopyItem ImageFormat
Clipboard
Item ImageItem ImageItem ImageItem ImageItem ImageItem Image
Font
Item ImageItem ImageItem ImageItem Image
Item ImageItem Image
Item ImageItem Image
Paragraph
Styles
Item ImageFind 
  • Item ImageFind...
  • Item ImageGo to...
Item ImageReplaceItem ImageSelect 
Editing
Item ImagePictureItem ImageClip ArtItem ImageShapes 
Item ImageChart
Illustrations
Item ImageHyperlinkItem ImageBookmarkItem ImageCross-reference
Links
Item ImageMacros 
  • Item ImageView Macros
  • Item ImageRecord Macro...
Macros
Isolate this demo as a stand-alone application
  • About this demo
  • C#
  • VB

You can seamlessly populate RadRibbonBar from XML.

  • Loading from XML file
    RadRibbonBar1.LoadContentFile("~/RibbonBar.xml");
    
  • Loading from XML string
    RadRibbonBar1.LoadXml("<RibbonBar><Tab Text="Home" ><Group Text="Clipboard" EnableLauncher="true"> ... </RibbonBar>");
    

You can also retrieve the current RadRibbonBar structure in XML format:

  • C#
    string xml = RadRibbonBar1.GetXml();
    
  • VB
    Dim xml as String = RadRibbonBar1.GetXml()
    
  • DefaultCS.aspx
  • DefaultCS.aspx.cs
  • styles.css
  • RibbonBar.xml
<%@ Page AutoEventWireup="true" CodeFile="DefaultCS.aspx.cs" Inherits="RibbonBar.Examples.PopulatingFromXml.DefaultCS"Language="c#"  %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>

<!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>Telerik ASP.NET Example</title>
    <link rel="stylesheet" type="text/css" href="styles.css" />
</head>

<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <div class="demo-container">
        <telerik:RadRibbonBar RenderMode="Lightweight" ID="RadRibbonBar1" runat="server">
        </telerik:RadRibbonBar>
    </div>
    </form>
</body>
</html>

Support & Learning Resources

Find Assistance

Help Us Improve

Was this example helpful?