用途:在 ASP.NET Core 应用中使用 Syncfusion AppBar 组件,创建顶部或底部导航栏,统一展示品牌、标题与操作按钮。
主要能力: 定位:默认顶部,position="Bottom" 可置于底部;isSticky="true" 实现滚动时吸顶固定。 尺寸:mode 支持 Regular(默认)、Prominent(更大)、Dense(紧凑)。 配色:colorMode 支持 Light(默认)、Dark、Primary、Inherit(继承父元素)。 布局:通过 e-appbar-spacer 分隔元素,e-appbar-separator 分组内容;嵌套 Button、DropDownButton、Menu、TextBox 可用 e-inherit 继承样式。 其它:enableRtl 支持从右到左语言;enablePersistence 保存状态;locale 自定义区域;cssClass 与 htmlAttributes 自定义样式和属性。
使用方式:项目需安装 Syncfusion NuGet 包并在 _ViewImports.cshtml 注册 Tag Helper,引入样式表与脚本并注册 Script Manager。基础用法为 ejs-appbar 标签内使用 e-content-template 放置内容,例如: <ejs-appbar id="defaultAppBar" colorMode="Primary"> <e-content-template> <ejs-button cssClass="e-inherit" iconCss="e-icons e-menu"></ejs-button> <span style="margin:0 5px">My Application</span> <div class="e-appbar-spacer"></div> <ejs-button cssClass="e-inherit" content="Get Started"></ejs-button> </e-content-template> </ejs-appbar>
适用场景:电商顶栏、仪表盘导航、移动端底部导航、管理后台用户菜单与通知、内容平台特色头图等。
限制:具体系统要求、事件声明细节、完整 API 枚举值等需参阅资料中的对应参考文档;本资料未提供收费、价格或效果数据。