You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: components/contextmenu/overview.md
+45-34Lines changed: 45 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Overview
3
3
page_title: Context Menu Overview
4
-
description: Overview of the Context Menu for Blazor.
4
+
description: Try now the Telerik UI for Blazor Context Menu and learn more about its options for creating the component, binding it to data, changing its navigation views, customizing the component per target, and more.
5
5
slug: contextmenu-overview
6
6
tags: telerik,blazor,context menu,overview
7
7
published: True
@@ -10,23 +10,25 @@ position: 0
10
10
11
11
# Blazor Context Menu Overview
12
12
13
-
The <ahref="https://www.telerik.com/blazor-ui/context-menu"target="_blank">Blazor Context Menu component </a> displays a contextual popup with data (flat or hierarchical) in a traditional menu-like structure. It lets you invoke commands while preserving screen real estate.
13
+
The <ahref="https://www.telerik.com/blazor-ui/context-menu"target="_blank">Blazor Context Menu</a> displays a contextual popup with flat or hierarchical data in a traditional menu-like structure. The component enables you to invoke commands while preserving the screen real estate.
14
14
15
-
In addition to built-in [navigation capabilities]({%slug contextmenu-navigation%}), you can browse through the items and their children, define [templates]({%slug contextmenu-templates-overview%}) for the individual nodes, render text and icons/images, and respond to [events]({%slug contextmenu-events%}).
15
+
In addition to the built-in [navigation capabilities]({%slug contextmenu-navigation%}), you can browse through the items and their children, define [templates]({%slug contextmenu-templates-overview%}) for the individual nodes, render text and icons or images, and respond to [events]({%slug contextmenu-events%}).
16
16
17
-
## Creating Context Menu
17
+
## Creating the Blazor Context Menu
18
18
19
-
1. Add the `TelerikContextMenu` tag and set its `Selector` parameter to a CSS selector that will match the element(s) you want to attach the context menu to.
20
-
1. Provide a collection of models to its `Data` property. The Context Menu will automatically recognize property names like `Id`, `ParentId`, `Text` and a few others. Otherwise, [use bindings to configure custom property names]({%slug contextmenu-data-binding-overview%}#data-bindings).
19
+
To create the Context Menu:
20
+
21
+
1. Add the `TelerikContextMenu` tag and set its `Selector` parameter to a CSS selector that will match the elements to which you want to attach the Context Menu.
22
+
1. Provide a collection of models to the `Data` property of the component. The Context Menu will automatically recognize property names like `Id`, `ParentId`, `Text`, and more. Otherwise, [configure custom property names by using bindings]({%slug contextmenu-data-binding-overview%}#data-bindings).
21
23
1. Handle the [`OnClick` event]({%slug contextmenu-events%}#onclick) to respond to user actions.
22
24
23
-
>caption Basic context menu with hierarchical data binding and OnClick event handler
25
+
>caption A basic Context Menu with hierarchical data binding and an `OnClick` event handler
@@ -98,53 +100,54 @@ In addition to built-in [navigation capabilities]({%slug contextmenu-navigation%
98
100
99
101
To show any items, the Blazor Context Menu requires a data source that you can provide through the `Data` property. The Context Menu allows you to display the items both as flat data and hierarchically. [Read more about the Blazor Context Menu data binding...]({%slug contextmenu-data-binding-overview%})
100
102
101
-
## Customize per Target
103
+
## Per-Target Customization
102
104
103
-
The same context menu can easily be attached to many targets, or you can use its `ShowAsync(x, y)` method to show it explicitly based on your business logic needs, data and events. Read more in the [Integration]({%slug contextmenu-integration%}) article.
105
+
You can easily attach one and the same Context Menu to many targets or you can use its `ShowAsync(x, y)` method to show the component explicitly based on your business logic needs, data, and events. [Read more about the integration approaches of the Blazor Context Menu...]({%slug contextmenu-integration%}).
104
106
105
-
## Navigate Views
107
+
## Navigation Views
106
108
107
-
A menu is often used to list pages, views or sections in an application so the user can navigate through them. To do that with a menu, you have two options:
109
+
A Context Menu is often used to list pages, views, or sections in an application so that users can navigate through them. To achieve the desired scenario, use either of the following options:
108
110
109
-
*Use the built-in `UrlField` in the [bound data]({%slug contextmenu-data-binding-overview%}) to populate the URLs in the anchors the menu will generate for you if an URL is provided for the given item. An example is available in the beginning of this article.
110
-
*Use a [Template]({%slug contextmenu-templates-overview%}) to generate the desired links (e.g., `NavLink` components) with your own code to enable fine-tuning.
111
+
*If a URL is provided for the given item, populate the URLs in the anchors which the Context Menu will generate by using the built-in `UrlField` in the [bound data]({%slug contextmenu-data-binding-overview%}), as demonstrated in the first example of this article.
112
+
*Enable fine-tuning and generate the desired links, such as `NavLink` components, by using a [template]({%slug contextmenu-templates-overview%}).
111
113
112
114
[Read more about the Blazor Context Menu navigation...]({%slug contextmenu-navigation%})
113
115
114
116
## Icons
115
117
116
-
To illustrate the purpose of each menu item, the Blazor Context Menu allows you to add images, icon classes, or font icons. [Read more about the Blazor Menu icons...]({%slug contextmenu-icons%})
118
+
To illustrate the purpose of each Context Menu item, the Blazor Context Menu allows you to add images, icon classes, or font icons. [Read more about the Blazor Menu icons...]({%slug contextmenu-icons%})
117
119
118
120
## Templates
119
121
120
-
You can use the functionality of the built-in templates and customize what is rendered in the items. [Read more about the Blazor Context Menu templates...]({%slug contextmenu-templates-overview%})
122
+
You can use the functionality of the built-in templates and customize what is rendered in the items. [Read more about the available Blazor Context Menu templates...]({%slug contextmenu-templates-overview%})
121
123
122
124
## Events
123
125
124
-
The Context Menu generates events that you can handle and further customize its behavior. [Read more about the Blazor Context Menu events...]({%slug contextmenu-events%})
126
+
The Context Menu generates events that you can handle and further customize its behavior. [Read more about the supported Blazor Context Menu events...]({%slug contextmenu-events%})
125
127
126
128
## Context Menu Parameters
127
129
128
-
The following table lists Context Menu parameters, which are not related to other features on this page. Check the [Context Menu API Reference](https://docs.telerik.com/blazor-ui/api/Telerik.Blazor.Components.TelerikContextMenu-1) for a full list of properties, methods and events.
130
+
The following table lists Context Menu parameters, which are not related to other features on this page. For the full list of properties, methods, and events, see the [Context Menu API reference documentation](https://docs.telerik.com/blazor-ui/api/Telerik.Blazor.Components.TelerikContextMenu-1).
129
131
130
132
| Attribute | Type and Default Value | Description |
131
133
| --- | --- | --- |
132
-
|`Class`|`string`| Renders additional CSS class to the main wrapping element of the component. Use it to apply custom styles or [override the theme]({%slug themes-override%}). |
133
-
|`Selector`|`string`| CSS selector of the target elements where the Context Menu will be shown.|
134
+
|`Class`|`string`| Renders an additional CSS class to the main wrapping element of the component. Use it to apply custom styles or [override the theme]({%slug themes-override%}). |
135
+
|`Selector`|`string`|A CSS selector of the target elements where the Context Menu will be shown.|
134
136
135
137
## Context Menu Reference and Methods
136
138
137
-
Add a reference to the component instance to use the [Context Menu methods](/blazor-ui/api/Telerik.Blazor.Components.TelerikContextMenu-1).
139
+
To use the [Blazor Context Menu methods](/blazor-ui/api/Telerik.Blazor.Components.TelerikContextMenu-1), add a reference to the component instance.
0 commit comments