You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何使用Tag Helper禁用Kendo TabStrip的标签滚动功能?

Kendo TabStrip Tag Helper 禁用滚动的正确方式

你用Html Helper实现禁用TabStrip滚动的代码是:

@(Html.Kendo().TabStrip()
   .Name("tabstrip")
   .Scrollable(false)
)

直接在Tag Helper根标签上写scrollable="false"不会生效,正确做法是通过<scrollable>子标签配置,设置enabled="false"属性,完整代码如下:

<kendo-tabstrip name="tabstrip" tab-position="top">
    <popup-animation>
        <open effects="fade:in" />
    </popup-animation>
    <scrollable enabled="false" /> <!-- 核心配置项 -->
    <items>
        <tabstrip-item text="First Tab">
            <content>
            </content>
        </tabstrip-item>
    </items>
</kendo-tabstrip>

Kendo Tag Helper对这类复杂配置项,会用嵌套子标签对应Html Helper的链式方法,Scrollable(false)对应的就是<scrollable enabled="false" />,而非根标签上的scrollable属性。

内容的提问来源于stack exchange,提问作者Veselin Aleksandrov

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.29 15:42:36