Hide the "Type a message" component so the user cannot send a message.

1 Answer 48 Views
Chat (Conversational UI)
Rodrigo
Top achievements
Rank 1
Iron
Iron
Iron
Rodrigo asked on 01 Mar 2024, 01:21 PM

Hi!

Is it possible to hide the message sending component?
I want to ensure that the user interacts only by suggestion, so hide the message sending

Regards,

Rodrigo.

1 Answer, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 01 Mar 2024, 03:34 PM

Hello Rodrigo,

You'd need to customize the Chat ControlTemplate and remove the elements you don't need. I've attached a quick example with the default ControlTemplate ( the part with the entry and the Send button is commented), so you can modify it according to the requirements you have.

I hope I was of help.  Let me know if you have any additional questions on this.

Regards,
Yana
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Rodrigo
Top achievements
Rank 1
Iron
Iron
Iron
commented on 01 Mar 2024, 06:26 PM

Hi Yana!

I changed the sample, changing to Mvvm, but the data does not appear.
Can you help me?

Resgard,

Rodrigo.

Yana
Telerik team
commented on 05 Mar 2024, 07:16 AM

Hi Rodrigo,

Thank you for sharing the updated app.  You just need to set the ItemsSource of the Chat control to make it work:

<telerik:RadChat x:Name="chat"
                ControlTemplate="{StaticResource MyRadChatControlTemplate}"
                ItemsSource="{Binding Items}"/>

For more details on the MVVM approach, please take a look at our article on the topic: Chat: MVVM Support.

I hope I was of help.

Rodrigo
Top achievements
Rank 1
Iron
Iron
Iron
commented on 05 Mar 2024, 01:58 PM

Hi Yana!

In this sample, ItemsSource is added, but it is not working! 

I using the MVVM model and it's not working. I don't know what could be wrong.
Can you make the sample work?

 

Regards,

Rodrigo.

Yana
Telerik team
commented on 05 Mar 2024, 02:42 PM

Hi Rodrigo,

I just double-checked the updated sample app and the Chat definition is missing the ItemsSource - after setting the ItemsSource the messages are properly displayed on my side. In addition, you can bind the Author property of the Chat, so that the outgoing messages are aligned on the right.

I've attached the updated app, please download it and give it a try. Let me know if it's ok now.

Rodrigo
Top achievements
Rank 1
Iron
Iron
Iron
commented on 06 Mar 2024, 05:22 PM

Thank you Yana!
Sorry, the example I added didn't go with the change. Everything is fine now.

Regards,

Rodrigo.

Tags
Chat (Conversational UI)
Asked by
Rodrigo
Top achievements
Rank 1
Iron
Iron
Iron
Answers by
Yana
Telerik team
Share this question
or