Loading...
Loading...
Implement the Syncfusion ASP.NET Core Ribbon control using Razor Tag Helpers. Use this skill when the user mentions Syncfusion ASP.NET Core Ribbon, `<ejs-ribbon>`, `<e-ribbon-tab>`, `<e-ribbon-group>`, Razor Tag Helpers, ribbon implementation, tabs, groups, items, file menu, backstage, layouts, events, or ASP.NET Core ribbon setup. Covers installation, tag helper registration, component structure, items, events, theming, accessibility, and advanced patterns.
npx skill4agent add syncfusion/aspnetcore-ui-components-skills syncfusion-aspnetcore-ribbonlocaleenablePersistence<e-ribbon-tab><e-ribbon-group>RibbonXxxSettingsisCollapsible<e-ribbon-filemenusettings>MenuItem<e-ribbon-backstagemenusettings>type=GalleryenableKeyTipskeyTipenableRtlRibbonTooltipSettingsidactiveLayoutClassicSimplifiedisMinimizedenableKeyTipsenableRtlhideLayoutSwitcherlayoutSwitcherKeyTiphelpPaneTemplateenablePersistencelocale"en-us""fr-FR"createdtabSelectedargs.selectedIndexargs.previousIndexargs.isContextualtabSelectingargs.cancelargs.isInteractedribbonCollapsingargs.cancelribbonExpandingargs.cancelribbonLayoutSwitchedargs.activeLayoutlauncherIconClickargs.groupIdoverflowPopupOpenargs.elementargs.canceloverflowPopupCloseargs.elementargs.cancel@using Syncfusion.EJ2
@using Syncfusion.EJ2.Ribbon
@using Syncfusion.EJ2.Navigations
<ejs-ribbon id="ribbon">
<e-ribbon-tabs>
<e-ribbon-tab header="Home">
<e-ribbon-groups>
<e-ribbon-group header="Clipboard">
<e-ribbon-collections>
<e-ribbon-collection>
<e-ribbon-items>
<e-ribbon-item type=Button>
<e-ribbon-buttonsettings iconCss="e-icons e-paste" content="Paste"></e-ribbon-buttonsettings>
</e-ribbon-item>
</e-ribbon-items>
</e-ribbon-collection>
</e-ribbon-collections>
</e-ribbon-group>
</e-ribbon-groups>
</e-ribbon-tab>
<e-ribbon-tab header="Insert">
<e-ribbon-groups>
<e-ribbon-group header="Tables">
<e-ribbon-collections>
<e-ribbon-collection>
<e-ribbon-items>
<e-ribbon-item type=Button>
<e-ribbon-buttonsettings iconCss="e-icons e-table" content="Table"></e-ribbon-buttonsettings>
</e-ribbon-item>
</e-ribbon-items>
</e-ribbon-collection>
</e-ribbon-collections>
</e-ribbon-group>
</e-ribbon-groups>
</e-ribbon-tab>
</e-ribbon-tabs>
</ejs-ribbon>@{
List<MenuItem> fileOptions = new List<MenuItem>() {
new MenuItem { Text = "New", IconCss = "e-icons e-file-new" },
new MenuItem { Text = "Open", IconCss = "e-icons e-folder-open" },
new MenuItem { Text = "Save", IconCss = "e-icons e-save" }
};
}
<ejs-ribbon id="ribbon">
<e-ribbon-filemenusettings visible="true" menuItems=fileOptions></e-ribbon-filemenusettings>
<e-ribbon-tabs>
<!-- tabs -->
</e-ribbon-tabs>
</ejs-ribbon><ejs-ribbon id="ribbon">
<e-ribbon-tabs>
<e-ribbon-tab header="Home">
<e-ribbon-groups>
<e-ribbon-group header="Clipboard" orientation=Row>
<!-- Items -->
</e-ribbon-group>
<e-ribbon-group header="Font" orientation=Row enableGroupOverflow=true>
<!-- Items -->
</e-ribbon-group>
</e-ribbon-groups>
</e-ribbon-tab>
<e-ribbon-tab header="View">
<e-ribbon-groups>
<e-ribbon-group header="Views" orientation=Row>
<!-- Items -->
</e-ribbon-group>
</e-ribbon-groups>
</e-ribbon-tab>
</e-ribbon-tabs>
</ejs-ribbon>@{
List<string> fontOptions = new List<string>() { "Arial", "Calibri", "Cambria", "Georgia" };
}
<e-ribbon-group header="Formatting">
<e-ribbon-collections>
<e-ribbon-collection>
<e-ribbon-items>
<!-- ComboBox -->
<e-ribbon-item type=ComboBox>
<e-ribbon-comboboxsettings dataSource=fontOptions index=0 width="120px"></e-ribbon-comboboxsettings>
</e-ribbon-item>
<!-- ColorPicker -->
<e-ribbon-item type=ColorPicker allowedSizes=Small>
<e-ribbon-colorpickersettings value="#123456"></e-ribbon-colorpickersettings>
</e-ribbon-item>
<!-- Toggle Button -->
<e-ribbon-item type=Button allowedSizes=Small>
<e-ribbon-buttonsettings iconCss="e-icons e-bold" isToggle=true></e-ribbon-buttonsettings>
</e-ribbon-item>
</e-ribbon-items>
</e-ribbon-collection>
</e-ribbon-collections>
</e-ribbon-group><ejs-ribbon id="ribbon"
tabSelected="onTabSelected"
tabSelecting="onTabSelecting"
ribbonLayoutSwitched="onLayoutSwitched"
launcherIconClick="onLauncherClick">
<!-- ribbon content -->
</ejs-ribbon>
<script>
function onTabSelected(args) {
console.log('Tab selected:', args.selectedIndex);
console.log('Previous tab:', args.previousIndex);
console.log('Is contextual:', args.isContextual);
}
function onTabSelecting(args) {
console.log('Tab selecting:', args.selectedIndex);
// args.cancel = true; // Prevent selection if needed
}
function onLayoutSwitched(args) {
console.log('Layout changed to:', args.activeLayout); // 'Classic' or 'Simplified'
}
function onLauncherClick(args) {
console.log('Launcher clicked for group:', args.groupId);
}
</script>