Skip to content

Commit c383eff

Browse files
committed
Merge branch 'didi/bottomsheet' of https://github.com/telerik/maui-docs into didi/bottomsheet
2 parents 7cec3d6 + cba03a9 commit c383eff

File tree

75 files changed

+592
-129
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+592
-129
lines changed

_config.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ navigation:
3030
styling-and-themes:
3131
title: "Styling and Themes"
3232
position: 5
33+
ai:
34+
title: "AI Coding Assistant"
35+
position: 6
3336
security:
3437
title: "Security"
3538
position: 7
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#getting-started
2+
* A [Telerik user account](https://www.telerik.com/account/).
3+
* An active [DevCraft or Telerik UI for MAUI license](https://www.telerik.com/purchase/maui-ui) or a [Telerik UI for MAUI trial](https://www.telerik.com/maui-ui).
4+
* A [.NET MAUI application that includes Telerik UI for .NET MAUI]({%slug maui-getting-started%}).
5+
#end
6+
7+
#number-of-requests
8+
A Telerik [Subscription license](https://www.telerik.com/purchase/faq/licensing-purchasing) is recommended in order to use the Telerik MAUI AI Coding Assistant without restrictions. Perpetual license holders and trial users can make a [limited number of requests per year]({%slug ai-overview%}#number-of-requests).
9+
#end

_contentTemplates/get-started.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,21 @@ To use the controls in the Telerik UI for .NET MAUI library, add the Telerik nam
1717
1. In the `MainPage.xaml` file, locate the root element at the top.
1818
1. Paste the Telerik namespace below the last already available namespace:
1919

20-
```
20+
```XAML
2121
xmlns:telerik="http://schemas.telerik.com/2022/xaml/maui"
2222
```
2323

2424
To visualize the Telerik controls, register them in the `MauiProgram.cs` file of your project:
2525

2626
1. In the `MauiProgram.cs` file, add the following using statement:
2727

28-
```
28+
```C#
2929
using Telerik.Maui.Controls.Compatibility;
3030
```
3131

3232
1. In the `CreateMauiApp` method, call the `UseTelerik` extension method:
3333

34-
```
34+
```C#
3535
<!-- Code omitted for brevity -->
3636
.UseMauiApp<App>()
3737
.UseTelerik()
@@ -51,9 +51,9 @@ To add the TemplatedButton control to the application:
5151

5252
1. In the `MainPage.xaml` file, add the Telerik UI for .NET MAUI TemplatedButton and set its content to a string:
5353

54-
```
54+
```XAML
5555
<telerik:RadTemplatedButton x:Name="templatedButton"
56-
Content="My TemplatedButton Content" />
56+
Content="My TemplatedButton Content" />
5757
```
5858

5959
After adding the basic TemplatedButton and setting the initial content, you can hit `F5` to confirm that the app is running. In the next steps, you will configure the control by adding some interactivity.
@@ -68,7 +68,7 @@ In this step, you will edit the code-behind file by adding logic that makes the
6868
* In the `Grid`, add a [BusyIndicator](https://docs.telerik.com/devtools/maui/controls/busyindicator/overview) control and adjust its [styling options](https://docs.telerik.com/devtools/maui/controls/busyindicator/animations).
6969
* In the `Grid`, add a label control for the loading indicator.
7070

71-
```
71+
```XAML
7272
<telerik:RadTemplatedButton x:Name="templatedButton">
7373
<telerik:RadTemplatedButton.Content>
7474
<Grid ColumnDefinitions="Auto, *" HorizontalOptions="Center">
@@ -90,7 +90,7 @@ In this step, you will edit the code-behind file by adding logic that makes the
9090

9191
1. In the `MainPage.xaml.cs` file, add a new member method within the `MainPage` class. This new method adds the logic that controls the content of the button:
9292

93-
```
93+
```C#
9494
private async void OnTemplatedButtonClicked(object sender, EventArgs e)
9595
{
9696
this.busy.IsBusy = true;
@@ -103,7 +103,7 @@ In this step, you will edit the code-behind file by adding logic that makes the
103103

104104
1. Finally, set the `Clicked` event and add some styles to the TemplatedButton. Use the various [appearance options](https://docs.telerik.com/devtools/maui/controls/templatedbutton/styling) provided by the component, for example, `TextColor`, `Background`, `BorderBrush`, and so on:
105105

106-
```
106+
```XAML
107107
<telerik:RadTemplatedButton x:Name="templatedButton"
108108
TextColor="Black"
109109
Background="#FAFAFA"

ai/copilot-extension.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
---
2+
title: Copilot Extension
3+
page_title: Telerik MAUI GitHub Copilot Extension
4+
description: Learn how to add and use the Telerik MAUI GitHub Copilot extension as a .NET MAUI AI coding assistant and code generator for better developer productivity. The Telerik MAUI GitHub Copilot extension provides proprietary context about Telerik UI for .NET MAUI to AI-powered software.
5+
slug: ai-copilot-extension
6+
tags: telerik, maui, ai, dotnetmaui, coding assistant, ai server
7+
position: 10
8+
---
9+
10+
# Telerik MAUI GitHub Copilot Extension
11+
12+
The Telerik MAUI [GitHub Copilot](https://github.com/features/copilot) extension is an AI-powered coding assistant that provides specialized knowledge about [Telerik UI for .NET MAUI components](https://www.telerik.com/maui-ui).
13+
14+
This extension enhances GitHub Copilot with proprietary context about Telerik MAUI controls, helping you:
15+
16+
* Generate code snippets using Telerik MAUI components.
17+
* Get contextual suggestions for component properties and methods.
18+
* Access best practices and implementation patterns.
19+
* Speed up development with AI-powered code completion.
20+
21+
## Prerequisites
22+
23+
Before using the Telerik MAUI GitHub Copilot extension, ensure you have:
24+
25+
* An active [GitHub Copilot](https://github.com/features/copilot) subscription. You can enable or configure GitHub Copilot on the [Copilot Settings page in your GitHub account](https://github.com/settings/copilot).
26+
@[template](/_contentTemplates/common/ai-coding-assistant.md#getting-started)
27+
* The latest version of your [Copilot-enabled app](https://docs.github.com/en/copilot/building-copilot-extensions/about-building-copilot-extensions#supported-clients-and-ides) (for example, Visual Studio or Visual Studio Code).
28+
29+
## Installation
30+
31+
Follow these steps to install and configure the Telerik MAUI Copilot extension:
32+
33+
1. Go to the [Telerik MAUI GitHub App](https://github.com/apps/telerikmaui) page and click the **Install** button.
34+
1. You will see a list that includes your GitHub account and all GitHub organizations that you are part of. Select your GitHub account.
35+
1. Click the **Install & Allow** button. This will allow the GitHub Copilot extension to integrate with your GitHub account.
36+
1. Enter your GitHub password when prompted.
37+
1. You will be redirected to telerik.com. Enter your Telerik account credentials if prompted. This step links the GitHub Copilot extension with your Telerik account.
38+
1. Upon successful Telerik authentication, you will be redirected to a confirmation page that indicates successful Copilot extension installation.
39+
1. Restart your [Copilot-enabled app](https://docs.github.com/en/copilot/building-copilot-extensions/about-building-copilot-extensions#supported-clients-and-ides) (for example, Visual Studio and Visual Studio Code).
40+
1. Start a new chat session in Copilot.
41+
42+
## Usage
43+
44+
To use the Telerik MAUI Copilot extension:
45+
46+
1. Open the GitHub Copilot chat window in your [Copilot-enabled app](https://docs.github.com/en/copilot/building-copilot-extensions/about-building-copilot-extensions#supported-clients-and-ides) (for example, Visual Studio or VS Code).
47+
1. Ensure you are in **Chat** mode and not in **Edit** or **Agent** mode. The Edit and Agent modes do not use the Telerik Copilot extension. However, the Agent mode can use the [Telerik MAUI MCP server]({%slug ai-mcp-server%}).
48+
1. Start your prompt with `@telerikmaui` and type your request. Verify that `@telerikmaui` is recognized and highlighted; otherwise, the extension may not be properly installed.
49+
1. Look for a status label such as **Telerik MAUI working...** or **Telerik MAUI generating response...** in the output to confirm the extension is active.
50+
1. Grant permission to the Telerik MAUI extension to read your workspace files when prompted.
51+
1. For unrelated queries, start a new chat session in a new window to avoid context pollution from previous conversations.
52+
53+
### Sample Prompts
54+
55+
The following examples demonstrate useful prompts for the Telerik MAUI extension:
56+
57+
* "`@telerikmaui` Generate a DataGrid with sorting and paging enabled."
58+
* "`@telerikmaui` Create a Telerik ComboBox for MAUI with multiple selection enabled."
59+
* "`@telerikmaui` Show me how to implement a Chart with line series."
60+
* "`@telerikmaui` Generate a CollectionView with grouping and filtering capabilities."
61+
62+
## Number of Requests
63+
64+
@[template](/_contentTemplates/common/ai-coding-assistant.md#number-of-requests)
65+
66+
## Troubleshooting
67+
68+
If you encounter issues:
69+
70+
* Ensure the `@telerikmaui` mention is properly highlighted in your prompt.
71+
* Verify that you have an active GitHub Copilot subscription.
72+
* Restart your IDE after installation.
73+
* Check that you're in Chat mode, not Edit or Agent mode.
74+
75+
## See Also
76+
77+
* [GitHub Copilot Documentation](https://docs.github.com/en/copilot)
78+
* [GitHub Copilot Tutorials](https://github.com/features/copilot/tutorials)
79+
* [Telerik MAUI MCP Server]({%slug ai-mcp-server%})
80+
* [Telerik UI for .NET MAUI Documentation](https://docs.telerik.com/devtools/maui/)

ai/mcp-server.md

Lines changed: 211 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,211 @@
1+
---
2+
title: MCP Server
3+
page_title: Telerik MAUI MCP Server
4+
description: Learn how to add and use the Telerik MAUI MCP Server as a .NET MAUI AI coding assistant and code generator for better developer productivity. The Telerik MAUI MCP server provides proprietary context about Telerik UI for .NET MAUI to AI-powered software.
5+
slug: ai-mcp-server
6+
tags: telerik,maui,ai,ai server,dotnetmaui,coding assistant
7+
position: 20
8+
---
9+
10+
# Telerik .NET MAUI MCP Server
11+
12+
The Telerik MAUI [MCP (Model Context Protocol) Server](https://modelcontextprotocol.io/introduction) enhances your AI-powered development experience by providing specialized context about Telerik UI for .NET MAUI components.
13+
14+
This MCP server enables AI-powered IDEs and tools to generate more accurate, tailored code that leverages [Telerik UI for .NET MAUI components](https://www.telerik.com/maui-ui) and APIs. You can ask complex questions about Telerik components, request specific implementations, and generate comprehensive code solutions.
15+
16+
## Prerequisites
17+
18+
To use the Telerik MAUI MCP server, you need:
19+
20+
* [Node.js](https://nodejs.org/en) 18 or newer.
21+
* An [MCP-compatible client](https://modelcontextprotocol.io/clients) that supports **MCP tools** (latest version recommended).
22+
23+
@[template](/_contentTemplates/common/ai-coding-assistant.md#getting-started)
24+
25+
## Installation
26+
27+
Install the Telerik MAUI MCP server using npm:
28+
29+
```bash
30+
npm i @progress/telerik-maui-mcp
31+
```
32+
33+
### Configuration
34+
35+
Use these settings when configuring the server in your MCP client:
36+
37+
| Setting | Value |
38+
|---------|-------|
39+
| Package Name | `@progress/telerik-maui-mcp` |
40+
| Type | `stdio` (standard input/output transport) |
41+
| Command | `npx` |
42+
| Arguments | `-y` |
43+
| Server Name | `telerikMauiAssistant` (customizable) |
44+
45+
### License Configuration
46+
47+
Add your [Telerik license key]({%slug set-up-your-license%}) as an environment parameter in your `mcp.json` file using one of these options:
48+
49+
Option 1: License File Path (Recommended)
50+
51+
```json
52+
"env": {
53+
"TELERIK_LICENSE_PATH": "THE_PATH_TO_YOUR_LICENSE_FIL"
54+
}
55+
```
56+
57+
Option 2: Direct License Key
58+
59+
```json
60+
"env": {
61+
"TELERIK_LICENSE": "YOUR_LICENSE_KEY_HERE"
62+
}
63+
```
64+
65+
> Option 1 is recommended unless you're sharing settings across different systems. Remember to [update your license key]({%slug set-up-your-license%}#updating-your-license-key) when necessary.
66+
67+
## Visual Studio
68+
69+
For complete setup instructions, see [Use MCP servers in Visual Studio](https://learn.microsoft.com/en-us/visualstudio/ide/mcp-servers).
70+
71+
> Early Visual Studio 17.14 versions require the Copilot Chat window to be open when opening a solution for the MCP server to work properly.
72+
73+
### Workspace-Specific Setup:
74+
75+
1. Add `.mcp.json` to your solution folder:
76+
77+
```json
78+
{
79+
"servers": {
80+
"telerikMauiAssistant": {
81+
"type": "stdio",
82+
"command": "npx",
83+
"args": ["-y", "@progress/telerik-maui-mcp@latest"],
84+
"env": {
85+
"TELERIK_LICENSE_PATH": "THE_PATH_TO_YOUR_LICENSE_FILE",
86+
// or
87+
"TELERIK_LICENSE": "YOUR_LICENSE_KEY"
88+
}
89+
}
90+
}
91+
}
92+
```
93+
94+
2. Restart Visual Studio.
95+
3. Enable the `telerikMauiAssistant` tool in the [Copilot Chat window's tool selection dropdown](https://learn.microsoft.com/en-us/visualstudio/ide/mcp-servers?view=vs-2022#configuration-example-with-github-mcp-server).
96+
97+
### Global Setup:
98+
99+
Add the `.mcp.json` file to your user directory (`%USERPROFILE%`, e.g., `C:\Users\YourName\.mcp.json`).
100+
101+
## Visual Studio Code
102+
103+
For complete setup instructions, see [Use MCP servers in Visual Studio Code](https://code.visualstudio.com/docs/copilot/chat/mcp-servers).
104+
105+
> Visual Studio Code 1.102.1 or newer is required to use the Telerik MCP Server
106+
107+
The basic setup in Visual Studio Code follows these steps:
108+
109+
1. Enable [`chat.mcp.enabled`](vscode://settings/chat.mcp.enabled) in Visual Studio Code settings.
110+
2. Create `.vscode/mcp.json` in your workspace root (or user folder for global setup):
111+
112+
```json
113+
{
114+
"servers": {
115+
"telerik-maui-assistant": {
116+
"type": "stdio",
117+
"command": "npx",
118+
"args": ["-y", "@progress/telerik-maui-mcp@latest"],
119+
"env": {
120+
"TELERIK_LICENSE_PATH": "THE_PATH_TO_YOUR_LICENSE_FILE",
121+
// or
122+
"TELERIK_LICENSE": "YOUR_LICENSE_KEY"
123+
}
124+
}
125+
}
126+
}
127+
```
128+
129+
3. For global discovery, enable [`chat.mcp.discovery.enabled`](vscode://settings/chat.mcp.discovery.enabled) in `settings.json`:
130+
131+
```json
132+
{
133+
"chat.mcp.discovery.enabled": true
134+
}
135+
```
136+
137+
4. Restart Visual Studio Code.
138+
139+
## Cursor
140+
141+
For complete setup instructions, see [Model Context Protocol](https://docs.cursor.com/context/mcp).
142+
143+
Create `.cursor/mcp.json` in your workspace root (or user folder for global setup):
144+
145+
```json
146+
{
147+
"mcpServers": {
148+
"telerikMauiAssistant": {
149+
"type": "stdio",
150+
"command": "npx",
151+
"args": ["-y", "@progress/telerik-maui-mcp@latest"],
152+
"env": {
153+
"TELERIK_LICENSE_PATH": "THE_PATH_TO_YOUR_LICENSE_FILE",
154+
// or
155+
"TELERIK_LICENSE": "YOUR_LICENSE_KEY"
156+
}
157+
}
158+
}
159+
}
160+
```
161+
162+
## Usage
163+
164+
To use the Telerik MCP Server:
165+
166+
1. Start your prompt with one of these triggers:
167+
- `/telerik` / `@telerik` / `#telerik`
168+
- `/telerikmaui` / `@telerikmaui` / `#telerikmaui`
169+
- `#telerik-maui-assistant`
170+
171+
2. Verify server activation by looking for these messages:
172+
- Visual Studio: `Running telerikMauiAssistant`
173+
- Visual Studio Code: `Running telerik-maui-assistant`
174+
- Cursor: `Calling MCP tool telerikMauiAssistant`
175+
176+
3. Grant permissions when prompted (per session, workspace, or always).
177+
178+
4. Start fresh sessions for unrelated prompts to avoid context pollution.
179+
180+
### Improving Server Usage
181+
182+
To increase the likelihood of the Telerik MCP server being used, add custom instructions to your AI tool:
183+
- [GitHub Copilot custom instructions](https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot#about-repository-custom-instructions-for-github-copilot-chat)
184+
- [Cursor rules](https://docs.cursor.com/context/rules)
185+
186+
### Sample Prompts
187+
188+
The following examples demonstrate useful prompts for the Telerik .NET MAUI MCP Server:
189+
190+
* "`/telerik` Generate a DataGrid with sorting and paging. Bind it to a Person model with sample ViewModel."
191+
* "`/telerikmaui` Create a ComboBox showing a product list. Include Product class and sample data."
192+
* "`/telerik` Build a CollectionView with sorting and filtering capabilities."
193+
194+
## Number of Requests
195+
196+
@[template](/_contentTemplates/common/ai-coding-assistant.md#number-of-requests)
197+
198+
## Local AI Model Integration
199+
200+
You can use the Telerik MAUI MCP server with local large language models (LLMs):
201+
202+
1. Run a local model, for example, through [Ollama](https://ollama.com).
203+
2. Use a bridge package like [MCP-LLM Bridge](https://github.com/patruff/ollama-mcp-bridge).
204+
3. Connect your local model to the Telerik MCP server.
205+
206+
This setup allows you to use the Telerik AI Coding Assistant without cloud-based AI models.
207+
208+
## See Also
209+
210+
* [Telerik MAUI GitHub Copilot Extension]({%slug ai-copilot-extension%})
211+
* [AI Coding Assistant Overview]({%slug ai-overview%})

0 commit comments

Comments
 (0)