New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial

This Class defines the SiteMapLevelSetting.

Definition

Namespace:Telerik.Web.UI

Assembly:Telerik.Web.UI.dll

Syntax:

C#
[TypeConverter(typeof(ExpandableObjectConverter))]
public class SiteMapLevelSetting : StateManager, IMarkableStateManager, IStateManager

Inheritance: objectStateManagerSiteMapLevelSetting

Derived Classes: DefaultSiteMapLevelSetting

Implements: IMarkableStateManagerIStateManager

Inherited Members StateManager.TrackViewState()StateManager.LoadViewState(object)StateManager.SaveViewState()StateManager.IsTrackingViewStateStateManager.ViewStateobject.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()object.GetType()object.MemberwiseClone()...

Constructors

C#
public SiteMapLevelSetting()
C#
[SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
public SiteMapLevelSetting(int level, SiteMapLayout layout)
Parameters:levelintlayoutSiteMapLayout
C#
public SiteMapLevelSetting(int level)
Parameters:levelint
C#
public SiteMapLevelSetting(SiteMapLayout layout)
Parameters:layoutSiteMapLayout

Properties

Gets or sets the URL to an image which is displayed next to all the nodes of a given level

C#
public string ImageUrl { get; set; }
Property Value:

The URL to the image to display for all the nodes of a given level. The default value is empty string which means by default no image is displayed.

Use the ImageUrl property to specify a custom image that will be displayed before the text of the current node.

Gets or sets the layout mode that is applied to a given LevelSetting. By default is set to List

C#
public SiteMapLayout Layout { get; set; }
Example:
cs-api-definition
levelSetting.LayoutMode = SiteMapLayout.List;
levelSetting.LayoutMode = SiteMapLayout.Flow;

Gets or sets the level to which a given LevelSetting refer/

C#
public virtual int Level { get; set; }
Property Value:

The Level property serves for explicitly setting the level to which a given LevelSetting refer.

Gets the Specific settings for the List layout mode.

C#
[PersistenceMode(PersistenceMode.InnerProperty)]
public SiteMapListLayoutSetting ListLayout { get; }
Property Value:

The list layout.

Gets or sets the maximum nodes that are allowed for a given level.

C#
public int MaximumNodes { get; set; }
Property Value:

Use the MaximumNodes property to explicitly state how many nodes should be rendered for a given level. Redundant nodes are sliced. If MaximumNodes is set to a value larger than the nodes count, all of the nodes will be rendered.

Gets or sets the template for displaying the nodes on the specified level.

C#
[TemplateContainer(typeof(RadSiteMapNode))]
[PersistenceMode(PersistenceMode.InnerProperty)]
[Browsable(false)]
[Bindable(false)]
public ITemplate NodeTemplate { get; set; }
Property Value:

An object implementing the ITemplate interface. The default value is a null reference (Nothing in Visual Basic), which indicates that this property is not set.

To specify template for a single node use the NodeTemplate property of the RadSiteMapNode control.

Example:
C#
<p>The following template demonstrates how to add an Image control in certain
     node.</p>
     <p>ASPX:</p>
        <p>
&lt;telerik: RadSiteMap runat="server" ID="RadSiteMap1"&gt;
     &lt;DefaultLevelSettings&gt;
         &lt;NodeTemplate&gt;
             &lt;asp:Image ID="Image1" runat="server" ImageUrl="MyImage.gif"&gt;&lt;/asp:Image&gt;
         &lt;/NodeTemplate&gt;
     &lt;/DefaultLevelSettings&gt;
&lt;/telerik:RadSiteMap&gt;
        </p>

Gets or sets the separator template for nodes on the specified level.

C#
[TemplateContainer(typeof(RadSiteMapNode))]
[PersistenceMode(PersistenceMode.InnerProperty)]
[Browsable(false)]
[Bindable(false)]
public ITemplate SeparatorTemplate { get; set; }
Property Value:

An object implementing the ITemplate interface. The default value is a null reference (Nothing in Visual Basic), which indicates that this property is not set.

To specify separator template for a single node use the SeparatorTemplate property of the RadSiteMapNode control.

The separator is rendered only in Flow mode.

Example:
C#
<p>The following template demonstrates how to add custom separator to a certain node.</p>
     <p>ASPX:</p>
        <p>
&lt;telerik: RadSiteMap runat="server" ID="RadSiteMap1"&gt;
     &lt;DefaultLevelSettings&gt;
          &lt;SeparatorTemplate&gt;
              &lt;asp:Image ID="Image1" runat="server" ImageUrl="MySeparator.gif"&gt;&lt;/asp:Image&gt;
          &lt;/SeparatorTemplate&gt;
     &lt;/DefaultLevelSettings&gt;
&lt;/telerik:RadSiteMap&gt;
        </p>

Gets or sets the separator text that is going to be used to separate nodes in Flow layout mode.

C#
public string SeparatorText { get; set; }
Property Value:

A string value that is used to separate nodes when the LevelSetting layout mode is set to Flow.

Gets or sets the width of the specified level.

C#
public Unit Width { get; set; }
Property Value:

A Unit specifying width of the specified level. The default value is Unit.Empty.