Skip to content

Commit b8a8366

Browse files
Merge pull request #6794 from syncfusion-content/984382-Menubar
Updated the UG document for Menu Bar Component.
2 parents 9d17ce0 + d7efb43 commit b8a8366

14 files changed

+119
-92
lines changed

blazor/menu-bar/accessibility.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ The accessibility compliance for the Blazor Menu bar component is outlined below
3838

3939
## WAI-ARIA attributes
4040

41-
The Blazor Menu bar component followed the [WAI-ARIA](https://www.w3.org/WAI/ARIA/apg/patterns/menubar/) patterns to meet the accessibility. The following ARIA attributes are used in the Blazor Menu bar component:
41+
The Blazor Menu Bar component incorporates [WAI-ARIA](https://www.w3.org/WAI/ARIA/apg/patterns/menubar/) patterns to ensure comprehensive accessibility. The following ARIA attributes are utilized within the component:
4242

4343
| Attributes | Purpose |
4444
| --- | --- |
@@ -49,9 +49,9 @@ The Blazor Menu bar component followed the [WAI-ARIA](https://www.w3.org/WAI/ARI
4949
| `aria-label` | Indicates the menu item text. |
5050
| `aria-disabled` | Indicates the state of menu item whether it is disabled. |
5151

52-
## Keyboard interaction
52+
## Keyboard Interaction
5353

54-
The Blazor Menu bar component followed the [keyboard interaction](https://www.w3.org/WAI/ARIA/apg/patterns/menubar/#keyboardinteraction) guideline, making it easy for people who use assistive technologies (AT) and those who completely rely on keyboard navigation. The following keyboard shortcuts are supported by the Blazor Menu Bar component.
54+
The Blazor Menu Bar component adheres to the [keyboard interaction guidelines](https://www.w3.org/WAI/ARIA/apg/patterns/menubar/#keyboardinteraction), facilitating effortless navigation for users who rely on assistive technologies and keyboard-only interaction. The following keyboard shortcuts are supported to provide a seamless user experience:
5555

5656
| Windows | Mac | Actions |
5757
| --- | --- | --- |
@@ -64,14 +64,14 @@ The Blazor Menu bar component followed the [keyboard interaction](https://www.w3
6464
| <kbd>Home</kbd> | <kbd>Home</kbd> | Focuses the first item. |
6565
| <kbd>End</kbd> | <kbd>End</kbd> | Focuses the last item.
6666

67-
## Ensuring accessibility
67+
## Ensuring Accessibility
6868

69-
The Blazor Menu Bar component's accessibility levels are ensured through an [axe-core](https://www.nuget.org/packages/Deque.AxeCore.Playwright) with playwright tests.
69+
The accessibility levels of the Blazor Menu Bar component are rigorously validated through [axe-core](https://www.nuget.org/packages/Deque.AxeCore.Playwright) integrated with Playwright tests. This automated testing approach helps maintain high accessibility standards.
7070

7171
The accessibility compliance of the Blazor Menu Bar component is shown in the following sample. Open the [sample](https://blazor.syncfusion.com/accessibility/menu) in a new window to evaluate the accessibility of the Blazor Menu Bar component with accessibility tools.
7272

7373
{% previewsample "https://ej2.syncfusion.com/accessibility/menu.html" %}
7474

75-
## See also
75+
## See Also
7676

7777
* [Accessibility in Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor components](https://blazor.syncfusion.com/documentation/common/accessibility)

blazor/menu-bar/animation.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ layout: post
33
title: Animation in Blazor Menu Bar Component | Syncfusion
44
description: Checkout and learn here all about Change animation settings in Syncfusion Blazor ContextMenu component and more.
55
platform: Blazor
6-
control: Context Menu
6+
control: Menu Bar
77
documentation: ug
88
---
99

1010
# Animation in Blazor Menu Bar Component
1111

12-
To change the animation of the Menu bar component, [MenuAnimationSettings](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Navigations.MenuAnimationSettings.html) component is used to initialize the animation properties.
12+
The Blazor Menu Bar component allows the customization of animation for its sub-menus. The [`MenuAnimationSettings`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Navigations.MenuAnimationSettings.html) component is used to define these animation properties. This provides a visually engaging experience when sub-menus open and close.
1313
The supported effects for Context Menu are,
1414

1515
| Effect | Functionality |
@@ -60,4 +60,5 @@ The following sample illustrates how to open Context Menu with `FadeIn` effect w
6060
6161
```
6262

63+
{% previewsample "https://blazorplayground.syncfusion.com/embed/LXrysjtAhBgtpWoH?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
6364
![Blazor Menubar with Style and Appearance](./images/blazor-menubar-animation.gif)

blazor/menu-bar/data-source-binding-and-custom-menu-items.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
---
22
layout: post
3-
title: DataSource Binding and Custom Items in Blazor Menu Bar | Syncfusion
3+
title: Data Source Binding and Custom Items in Blazor Menu Bar | Syncfusion
44
description: Learn here all about data source binding and custom items in Syncfusion Blazor Menu Bar component and more.
55
platform: Blazor
66
control: Menu Bar
77
documentation: ug
88
---
99

10-
# DataSource Binding and Custom Items in Blazor Menu Bar Component
11-
12-
The [Blazor Menu Bar](https://www.syncfusion.com/blazor-components/blazor-menu-bar) supports data source bindings such as data source that can be structured as `Self-referential` data.
10+
# Data Source Binding and Custom Items in Blazor Menu Bar Component
1311

12+
The [Blazor Menu Bar](https://www.syncfusion.com/blazor-components/blazor-menu-bar) component supports data source binding, including structures such as self-referential data. This allows for dynamic generation of menu hierarchies from various data sources.
1413
## Self-referential data
1514

16-
Menu Bar can be populated from self-referential data structure that contains data with `ParentId` mapping.
15+
The Menu Bar can be populated from a self-referential data structure that defines parent-child relationships through a `ParentId` mapping.
1716

1817
In the following example, the **id**, **pId**, and **text** columns from self-referential data have been mapped to the [ItemId](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Navigations.MenuFieldSettings.html#Syncfusion_Blazor_Navigations_MenuFieldSettings_ItemId), [ParentId](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Navigations.MenuFieldSettings.html#Syncfusion_Blazor_Navigations_MenuFieldSettings_ParentId), and [Text](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Navigations.MenuFieldSettings.html#Syncfusion_Blazor_Navigations_MenuFieldSettings_Text) fields, respectively.
1918

@@ -70,13 +69,14 @@ In the following example, the **id**, **pId**, and **text** columns from self-re
7069
7170
```
7271

72+
{% previewsample "https://blazorplayground.syncfusion.com/embed/BZrysjNKVhgmHQHC?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
7373
![Data Binding in Blazor MenuBar](./images/blazor-menubar-data-binding.png)
7474

7575
N> In the above example, `TValue` is specified as `MenuItemModel` because the menu is rendered using the `Items` property.
7676

7777
## Handling Self-Referential Data with CustomMenuItem TValue in MenuTemplate
7878

79-
When using TValue with CustomMenuItem in the [MenuTemplates](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Navigations.MenuTemplates-1.html), self-referential data structures with ParentId mapping are not supported. To address this limitation, you need to manually map the parent and child menu items within the menu template. In the following example, we demonstrate how to configure the SfMenu component using self-referential data with CustomMenuItem as the TValue in the MenuTemplate.
79+
When using a custom generic type (`TValue="CustomMenuItem"`) with [`MenuTemplates`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Navigations.MenuTemplates-1.html), the Menu Bar's built-in self-referential data processing based on `ParentId` mapping is not directly supported. To address this limitation, you need to manually map the parent and child menu items within the menu template. In the following example, we demonstrate how to configure the SfMenu component using self-referential data with CustomMenuItem as the TValue in the MenuTemplate.
8080

8181
```cshtml
8282
@using Syncfusion.Blazor.Navigations
@@ -197,11 +197,14 @@ When using TValue with CustomMenuItem in the [MenuTemplates](https://help.syncfu
197197
}
198198
```
199199

200+
{% previewsample "https://blazorplayground.syncfusion.com/embed/VXhIijtKhVJJaFLz?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
200201
![Blazor MenuBar with Self-Referential Data with CustomMenuItem TValue in MenuTemplate](./images/blazor-menubar-self-referential-data.png)
201202

202203
## Custom Menu Bar Items
203204

204-
To customize Menu Bar items in your application, set your customized template using [MenuTemplates](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Navigations.MenuTemplates-1.html). In the following example, the Menu Bar has been rendered with customized Menu Bar items.
205+
To customize the rendering of Menu Bar items, define a custom template using the [`MenuTemplates`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Navigations.MenuTemplates-1.html) component. This allows the embedding of rich content, custom styles, or interactive elements directly within each menu item.
206+
207+
The following example demonstrates rendering a Menu Bar with extensively customized items, including images, badges, and a detailed "About Us" card.
205208

206209
```cshtml
207210
@@ -377,4 +380,5 @@ To customize Menu Bar items in your application, set your customized template us
377380
378381
```
379382

383+
{% previewsample "https://blazorplayground.syncfusion.com/embed/BtreijXUVhyRIyrJ?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
380384
![Blazor MenuBar with Custom Item](./images/blazor-menubar-custom-item.png)

0 commit comments

Comments
 (0)