SiteMapPath.ParentLevelsDisplayed 属性

定义

获取或设置控件显示的相对于当前显示节点的父节点级别数。Gets or sets the number of levels of parent nodes the control displays, relative to the currently displayed node.

public:
 virtual property int ParentLevelsDisplayed { int get(); void set(int value); };
[System.Web.UI.Themeable(false)]
public virtual int ParentLevelsDisplayed { get; set; }
[<System.Web.UI.Themeable(false)>]
member this.ParentLevelsDisplayed : int with get, set
Public Overridable Property ParentLevelsDisplayed As Integer

属性值

Int32

一个整数,指定相对于当前上下文节点显示的父节点级别数。An integer that specifies the number of levels of parent nodes displayed, relative to the current context node. 默认值为 -1,指示对控件显示的父级别数没有限制。The default value is -1, which indicates no restriction on the number of parent levels that the control displays.

属性

例外

ParentLevelsDisplayed 值小于 -1。The value for ParentLevelsDisplayed is less than -1.

注解

ParentLevelsDisplayed属性控制 SiteMapPath 当前上下文节点上方的控件所显示的父节点级别数。The ParentLevelsDisplayed property governs how many levels of parent nodes are displayed by the SiteMapPath control above the current context node. 默认情况下,将显示当前上下文节点上方的所有父节点和祖先节点。By default, all parent and ancestor nodes above the current context node are displayed.

此属性的值存储在视图状态中。The value of this property is stored in view state.

无法通过主题或样式表主题设置此属性。This property cannot be set by themes or style sheet themes. 有关详细信息,请参阅 ThemeableAttributeASP.NET 主题和外观For more information, see ThemeableAttribute and ASP.NET Themes and Skins.

适用于