Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 89 additions & 0 deletions controls/radchat/attachments.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
---
title: Message Attachments
page_title: Message File Attachments
description: See how to add a message attachments in RadChat.
slug: chat-attachments
tags: attach,message,seen
published: True
position: 4
---

# Message Attachments

The attachments feature allows you to add files in the chat messages.

To enable the attachments, set the `IsMoreButtonVisible` property of `RadChat` to `true`.

```XAML
<telerik:RadChat x:Name="chat" IsMoreButtonVisible="True" />
```

![A picture showing the chat attachemnts](images/chat-attachments-0.png)

## Handling Attachment Actions

The action that happens when you download or share attachments can be handled via the `AttachmentActionRequested` event of `RadChat`. The event is invoked when the user click onto the __Download__ or __Share__ button in the attachment.

![The share and download buttons of a RadChat message](images/chat-attachments-1.png)

```C#
private void RadChat_AttachmentActionRequested(object sender, AttachmentActionEventArgs e)
{
IReadOnlyList<PromptInputAttachedFile> attachments = e.AttachedFiles;
if (e.Action == AttachmentAction.Download)
{
foreach (var attachment in attachments)
{
var fileName = attachment.FileName;
Stream fileStream = attachment.GetFileStream.Invoke();

// implement file download
}
}
else if (e.Action == AttachmentAction.Share)
{
foreach (var attachment in attachments)
{
var fileName = attachment.FileName;
Stream fileStream = attachment.GetFileStream.Invoke();

// implement file share
}
}
}
```

## Maximum Visible Attachments

The number of attachments that will be displayed by default without showing an expand button can be adjusted via the `MaxVisibleAttachments` property of `RadChat`.

```XAML
<telerik:RadChat x:Name="chat" IsMoreButtonVisible="True" MaxVisibleAttachments="2" />
```

![A picture showing the maximum visible attachments behavior](images/chat-attachments-2.png)

## Managing Message Attachments Programmatically

The attachments of a message can be accessed via its `AttachedFiles` collection property.

__Setting message attachments programmatically__

```C#
var textMessage = new TextMessage(this.chat.CurrentAuthor, "Sure, attaching the photos.");
var attachedFiles = new List<PromptInputAttachedFile>();
attachedFiles.Add(new PromptInputAttachedFile(new FileInfo("file-path-here")));
textMessage.AttachedFiles = attachedFiles.AsReadOnly();
```

__Getting message attachments__

```C#
IReadOnlyList<PromptInputAttachedFile> attachments = textMessage.AttachedFiles;
```

The content of a attached file can be accessed via the `GetFileStream` function of the corresponding `PromptInputAttachedFile` object.

```C#
Stream fileStream = textMessage.AttachedFiles.ElementAt(0).GetFileStream.Invoke();
```
30 changes: 30 additions & 0 deletions controls/radchat/breaking-changes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
title: Breaking Changes
page_title: Breaking Changes
description: This article lists the breaking changes introduced in the RadChat for WPF component through the releases.
slug: chat-breaking-changes
tags: breaking, changes, backward,compatibility
published: True
position: 7
---

# Breaking Changes

This article lists and describes the breaking changes introduced in the RadChat component. For a full list of changes, see the [Release History](https://www.telerik.com/support/whats-new/wpf/release-history) pages of the Telerik UI for WPF product.

## 2026 Q2 (2026.2.519)

With this release a visual revamp of the chat component and part of its features was introduced.

* The input box where the messages appear is now using a more complex visual element which contains extra features, like speech-to-text-button and a drop-down button with multiple options (attachments and custom options). This means that any code that was customizing the previously used textbox element should be adapted to the new input box visual (`RadPromptInput`)

* The `ToolBarCommands` and `ToolBarCommandTemplateSelector` property of `RadChat` are no longer available. Instead, use the `MoreButtonActions` collection of the `RadPromptInput`.

```C#
private void RadChat_Loaded(object sender, RoutedEventArgs e)
{
var chat = (RadChat)sender;
var promptInput = chat.FindChildByType<RadPromptInput>();
promptInput.MoreButtonActions.Add(new PromptInputButtonAction() { Text = "Custom option", Icon = myIcon, Command = myCommand });
}
```
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file modified controls/radchat/features/images/RadChat_TimeBreak_01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 5 additions & 13 deletions controls/radchat/features/localization.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,17 @@ This topic will go over the available resource keys for localizing the __RadChat
Below is the list of supported languages.

* **English**

* **German**

* **Spanish**

* **French**

* **Italian**

* **Dutch**

* **Turkish**

## Resource Keys

__RadChat__ provides strings for localizing various of its elements. In order to be able to distinguish these resources, an unique identifier, called resource key, is assigned to each string that can be localized.

![RadChat Localization](images/RadChat_Localization_01.png)

Key | Value
--- | ---
Chat_Arrival | Arrival
Expand All @@ -50,9 +42,9 @@ Chat_Submit | Submit
Chat_Total | Total
Chat_WatermarkContent | Type a message...
Chat_WindSpeed | Wind speed:
Chat_AICard_Copy | Copy
Chat_AICard_Retry | Retry
Chat_Attachment_Download | Download
Chat_Attachment_DownloadAll | Download All
Chat_Attachment_Share | Share



## See Also

* [Localization]({%slug common-localization%})
103 changes: 0 additions & 103 deletions controls/radchat/features/toolbar-commands.md

This file was deleted.

12 changes: 6 additions & 6 deletions controls/radchat/features/typing-indicator.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ The __TypingIndicator__ functionality of the Conversational UI can be used to in

__Example 1: Setting the TypingIndicator__
```C#
var textMessage = new TextMessage(this.currentAuthor, "Hello", "sent");
textMessage.InlineViewModel.StatusVisibility = Visibility.Visible;
var textMessage = new TextMessage(this.currentAuthor, "Hello", "sent");
textMessage.InlineViewModel.StatusVisibility = Visibility.Visible;

this.chat.AddMessage(textMessage);
this.chat.AddMessage(textMessage);

this.chat.TypingIndicatorText = this.otherAuthor.Name + " is typing...";
this.chat.TypingIndicatorVisibility = Visibility.Visible;
this.chat.TypingIndicatorIcon = new BitmapImage(new Uri("/Images/PeterJohnson.jpeg", UriKind.RelativeOrAbsolute));
this.chat.TypingIndicatorText = this.otherAuthor.Name + " is typing...";
this.chat.TypingIndicatorVisibility = Visibility.Visible;
this.chat.TypingIndicatorIcon = new BitmapImage(new Uri("/Images/PeterJohnson.jpeg", UriKind.RelativeOrAbsolute));
```

Setting the __TypingIndicator__ in such manner will have the following result.
Expand Down
Loading
Loading