Skip to content

Commit 873d807

Browse files
Merge pull request #1303 from telerik/didi/chat-styling-templates
add styling templates
2 parents 177041f + d72e61e commit 873d807

File tree

10 files changed

+149
-4
lines changed

10 files changed

+149
-4
lines changed

controls/autocomplete/keyboard-support.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ The following table lists the actions and keyboard combinations that are availab
2020
| `Up Arrow` / `Down Arrow` | When the suggestion view is opened, pressing `Up/Down Arrows` changes the highlighted item in the suggestion view list. |
2121
| `PageUp` / `PageDown` | When the suggestion view is opened, pressing `PageUp/PageDown` changes the highlighted item. `PageUp` navigates to the first item in the visible area, `PageDown` navigates to the last item in the visible area. |
2222
| `Backspace` (WinUI) | When there are tokens in the input area, pressing the `Backspace` key deletes the token. |
23+
| `Command + Delete` (MacCatalyst) | When there are tokens in the input area, pressing the `Command + Delete` keys delete the token. |
2324

2425
The first item in the suggestion view is highlighted by default (set as `CuttentItem`) when the view gets opened.
2526

controls/chat/commands.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The Telerik UI for .NET MAUI Chat allows you to attach commands that will be exe
1717
* `PickPhotoCommand` (`ICommand`)—Defines the command that opens the Microsoft.Maui.Media.MediaPicker for attaching photos for upload.
1818
* `TakePhotoCommand` (`ICommand`)—Defines the command that opens the camera for attaching a photo.
1919

20-
>tip You need to grand permissions to access the device camera and device external storage. For more details, review the [Microsoft Media Picker](https://learn.microsoft.com/en-us/dotnet/maui/platform-integration/device-media/picker?view=net-maui-10.0&tabs=android) article.
20+
>tip When working with attachments, you need to grant permissions to access the device camera and device external storage. For more details, review the [Microsoft Media Picker](https://learn.microsoft.com/en-us/dotnet/maui/platform-integration/device-media/picker?view=net-maui-10.0&tabs=android) article.
2121
2222
## Commands Related to Attachments
2323

4.32 KB
Loading
28.7 KB
Loading
56.5 KB
Loading
53.8 KB
Loading

controls/chat/items/attachments.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ slug: chat-items-attachments
1010

1111
The Telerik UI for .NET MAUI Chat control allows you to send and receive attachments as part of the conversation. Attachments can include images, documents, or other file types that enhance the messaging experience.
1212

13+
>tip When working with attachments, you need to grant permissions to access the device camera and device external storage. For more details, review the [Microsoft Media Picker](https://learn.microsoft.com/en-us/dotnet/maui/platform-integration/device-media/picker?view=net-maui-10.0&tabs=android) article.
14+
1315
To add attachments you have to apply the following settings:
1416

1517
1. Set the `IsMoreButtonVisible` to `true` to show the More button in the input area of the Chat control.
@@ -60,4 +62,11 @@ To add attachments you have to apply the following settings:
6062

6163
<snippet id='chat-data-server' />
6264

63-
![.NET MAUI Chat Attachments Example](../images/chat-attach-photos.png)
65+
![.NET MAUI Chat Attachments Example](../images/chat-attach-photos.png)
66+
67+
## See Also
68+
69+
- [Commands]({% slug chat-commands%})
70+
- [Chat Items]({%slug chat-items-overview%})
71+
- [Attachment Styling]({%slug chat-attachments-styling%})
72+
- [Attachment Templates]({%slug chat-attachments-templates%})
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
---
2+
title: Attachments
3+
meta_title: .NET MAUI Chat Documentation - Attachments Styling
4+
description: Learn how to style the outgoing and incoming attachments in the Telerik UI for .NET MAUI Chat control.
5+
position: 6
6+
tags: .net maui, telerik .net maui, ui for .net maui, chat, style
7+
slug: chat-attachments-styling
8+
---
9+
10+
# .NET MAUI Chat Attachments Styling
11+
12+
Any change in the appearance of the `RadChat` components depends on the referenced styles.
13+
14+
>tip When working with attachments, you need to grant permissions to access the device camera and device external storage. For more details, review the [Microsoft Media Picker](https://learn.microsoft.com/en-us/dotnet/maui/platform-integration/device-media/picker?view=net-maui-10.0&tabs=android) article.
15+
16+
## Style the Attachments in the Input Area
17+
18+
The Telerik UI for .NET MAUI Chat control allows you to customize the appearance of the attachments in the input area, by using the `ChatInputAreaAttachedFileItemView` as implicit style. The `ChatInputAreaAttachedFileItemView` exposes the following properties for customization:
19+
20+
* `ImageStyle` (`Style` with target type `Image`)&mdash;Defines the style of the icon of the attached file.
21+
* `SubtitleStyle` (`Style` with target type `Label`)&mdash;Defines the style of the label representing the size of the attached file.
22+
* `TitleStyle` (`Style` with target type `Label`)&mdash;Defines the style of the label representing the name of the attached file.
23+
* `RemoveButtonStyle` (`Style` with target type `RadTemplatedButton`)&mdash;Defines the style of the remove button used to remove the attached file from the input area.
24+
25+
Here is an example for styling the attachments in the messages:
26+
27+
<snippet id='chat-styling-attached-file' />
28+
29+
And the needed converter for the images inside the attachments icon in the input area:
30+
31+
<snippet id='chat-styling-attachments-imagestyle' />
32+
33+
This is the result:
34+
35+
![.NET MAUI Chat Attachments Styling](../images/chat-attachedfiles-input-area-styling.png)
36+
37+
> For a runnable example with Styling the Chat Attachments in the Input Area, see the [SDKBrowser Demo Application]({%slug sdkbrowser-app%}) and go to **Chat > Features** category.
38+
39+
## Style the Attachments in the Messages
40+
41+
To customize the appearance of the attachments in the messages, you can use the `ChatAttachmentsMessageView` as an implicit style. The `ChatAttachmentsMessageView` exposes the following properties for customization:
42+
43+
* `BorderStyle` (`Style` with target type `RadBorder`)&mdash;Defines the style of the border of the message with the attachments.
44+
* `LabelStyle` (`Style` with target type `Label`)&mdash;Defines the style of the label in the attached messages.
45+
* `AttachmentsListViewStyle` (`Style` with target type `ChatMessageAttachmentsListView`)&mdash;Defines the style of the list view containing the attached files in the message. The properties for customizing the list view are:
46+
* `DownloadAllButtonStyle` (`Style` with target type `RadTemplatedButton`)&mdash;Defines the style for the Download All button used to download all attached files in the message.
47+
* `AttachmentStyle` (`Style` with target type `ChatMessageAttachmentView`)&mdash;Defines the style of the entire attachment view in the attachments message.
48+
* `ImageStyle` (`Style` with target type `Image`)&mdash;Defines the style of the icon of the attached file in the message area.
49+
* `SubtitleStyle` (`Style` with target type `Label`)&mdash;Defines the style of the label representing the size of the attached file in the message area.
50+
* `TitleStyle` (`Style` with target type `Label`)&mdash;Defines the style of the label representing the name of the attached file in the message area.
51+
* `ActionsViewStyle` (`Style` with target type `ChatMessageAttachmentActionsView`)&mdash;Defines the style of the actions view containing the download and remove buttons for the attached file in the message area. The properties for customizing the actions view are:
52+
* `MenuButtonStyle` (`Style` with target type `Image`)&mdash;the custom image style that represents the attachment icon.
53+
54+
In addition, you can style the incoming and outgoing attachments messages separately targeting the following implicit styles:
55+
56+
* `ChatIncomingAttachmentsMessageView`&mdash;Represents all incoming attachments messages.
57+
* `ChatIncomingFirstAttachmentsMessageView`&mdash;Represents a view that visualizes the first incoming attachments message, out of a few consecutive messages from the same author.
58+
* `ChatIncomingMiddleAttachmentsMessageView`&mdash;Represents a view that visualizes the middle incoming attachments message, out of a few consecutive messages from the same author.
59+
* `ChatIncomingLastAttachmentsMessageView`&mdash;Represents a view that visualizes the last incoming attachments message, out of a few consecutive messages from the same author.
60+
* `ChatIncomingSingleAttachmentsMessageView`&mdash;Represents a view that visualizes a single incoming attachments message, out of a few consecutive messages from the same author.
61+
62+
* `ChatOutgoingAttachmentsMessageView`&mdash;Represents all outgoing attachments messages.
63+
* `ChatOutgoingFirstAttachmentsMessageView`&mdash;Represents a view that visualizes the first outgoing attachments message, out of a few consecutive messages from the same author.
64+
* `ChatOutgoingMiddleAttachmentsMessageView`&mdash;Represents a view that visualizes the middle outgoing attachments message, out of a few consecutive messages from the same author.
65+
* `ChatOutgoingLastAttachmentsMessageView`&mdash;Represents a view that visualizes the last outgoing attachments message, out of a few consecutive messages from the same author.
66+
* `ChatOutgoingSingleAttachmentsMessageView`&mdash;Represents a view that visualizes a single outgoing attachments message, out of a few consecutive messages from the same author.
67+
68+
Use the properties listed for the `ChatAttachmentsMessageView` for the customization of the incoming and outgoing attachments messages.
69+
70+
Here is an example for styling the `ChatAttachmentsMessageView` and `ChatOutgoingAttachmentsMessageView`:
71+
72+
<snippet id='chat-styling-attachments-messages' />
73+
74+
And the needed converter for the attachments icon inside the messages area:
75+
76+
<snippet id='chat-styling-image-outgoing-messages' />
77+
78+
This is the result:
79+
80+
![.NET MAUI Chat Attachments Styling](../images/chat-attachedfiles-messages.png)
81+
82+
> For a runnable example with Styling the Chat Attachments in the Messages, see the [SDKBrowser Demo Application]({%slug sdkbrowser-app%}) and go to **Chat > Features** category.
83+
84+
## See Also
85+
86+
- [Commands]({%slug chat-commands%})
87+
- [Chat Items]({%slug chat-items-overview%})
88+
- [MVVM Support]({%slug chat-mvvm-support%})
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
title: Attachments
3+
meta_title: .NET MAUI Chat Documentation - Attachments Templates
4+
description: Learn how to customize the default template of the outgoing and incoming attachments in the Telerik UI for .NET MAUI Chat control.
5+
position: 6
6+
tags: .net maui, telerik .net maui, ui for .net maui, chat, attachments templates
7+
slug: chat-attachments-templates
8+
---
9+
10+
# .NET MAUI Chat Attachments Templates
11+
12+
The Telerik UI for .NET MAUI Chat control allows you to customize the appearance of the attachments in both the input area and the messages by changing the default template of the `ChatInputAreaAttachedFileItemView`.
13+
14+
>tip When working with attachments, you need to grant permissions to access the device camera and device external storage. For more details, review the [Microsoft Media Picker](https://learn.microsoft.com/en-us/dotnet/maui/platform-integration/device-media/picker?view=net-maui-10.0&tabs=android) article.
15+
16+
## Customize the Attachments Template in the Input Area
17+
18+
To customize the appearance of the attachments in the input area, you can define a custom `ControlTemplate` for the `ChatInputAreaAttachedFileItemView`.
19+
20+
## Customize the Attachments Template in the Messages
21+
22+
To customize the appearance of the attachments in the messages, you can define a custom `ControlTemplate` in the `ChatMessageAttachmentView`. Below is an example of how to create a custom template for the attachments in the messages:
23+
24+
<snippet id='chat-attachments-view-templates' />
25+
26+
And the final result:
27+
28+
![.NET MAUI Chat Attachments](../images/chat-attachments-custom-template.png)
29+
30+
### Customize the Attachment Actions Template
31+
32+
You can also customize the actions template of the attachments in the messages by defining a custom `ControlTemplate` for the `ChatMessageAttachmentActionsView`.
33+
34+
Here is an example of how to create a custom actions template for the attachments in the messages:
35+
36+
<snippet id='chat-attachments-actionsview-templates' />
37+
38+
And the final result:
39+
40+
![.NET MAUI Chat Attachments](../images/chat-attachments-actions-custom-template.png)
41+
42+
> For a runnable example with the Chat Attachments Template, see the [SDKBrowser Demo Application]({%slug sdkbrowser-app%}) and go to **Chat > Features** category.
43+
44+
## See Also
45+
46+
- [Commands]({%slug chat-commands%})
47+
- [Chat Items]({%slug chat-items-overview%})

controls/speechtotextbutton/overview.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Overview
3-
page_title: .NET MAUI SpeechToTextButton Documentation - Overview
3+
meta_title: .NET MAUI SpeechToTextButton Documentation - Overview
44
description: Learn how the Telerik UI for .NET MAUI SpeechToTextButton enables seamless speech-to-text conversion in your applications.
55
tags: speech to text for .net maui, .net maui, ui for .net maui, microsoft .net maui
66
position: 0
@@ -9,7 +9,7 @@ slug: speechtotextbutton-overview
99

1010
# .NET MAUI SpeechToTextButton Overview
1111

12-
The Telerik UI for .NET MAUI SpeechToTextButton is a UI component that enables users to convert spoken words into text within .NET MAUI applications.
12+
The Telerik UI for .NET MAUI SpeechToTextButton is a UI component that enables users to convert spoken words into text using online recognition within .NET MAUI applications.
1313

1414
When the user taps the button, the control uses a speech recognition service, listens for voice input, and then transcribes the recognized speech into text. The recognized text can be displayed in a text field or used for further processing in your application.
1515

0 commit comments

Comments
 (0)