This is a migrated thread and some comments may be shown as answers.

ChatTextMessage Hyperlink

3 Answers 36 Views
Conversational UI, Chat
This is a migrated thread and some comments may be shown as answers.
Stephen
Top achievements
Rank 1
Stephen asked on 30 Nov 2018, 12:11 AM

Hi,

First of all, kudos for having developed the chat control--I will be purchasing the Winforms UI license solely for this capability!

I noticed that the text of a ChatTextMessage can be HTML-formatted.  When I create a hyperlink, it looks and acts like one, with the exception that the link target is not launched when I click on it.  How can I overcome this?

3 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 03 Dec 2018, 09:05 AM
Hello, Stephen,    

Thank you for the kind words. We are happy to hear that RadChat is suitable for your scenario.

As to the question about the hyperlinks, I have prepared a sample code snippet for your reference:

this.radChat1.Author = new Author(Properties.Resources.bot, "Nancy");
Author author2 = new Author(Properties.Resources.bot,"Andrew");
 
ChatTextMessage message1 = new ChatTextMessage("Hello", author2,DateTime.Now.AddHours(1));
this.radChat1.AddMessage(message1);
 
ChatTextMessage message2 = new ChatTextMessage("Hi", this.radChat1.Author,DateTime.Now.AddHours(1).AddMinutes(10));
this.radChat1.AddMessage(message2);
 
string textWithLink = @"<html><size=12>Please visit <a href=www.telerik.com>Telerik</a>" ;
ChatTextMessage message3 = new ChatTextMessage(textWithLink, author2,DateTime.Now.AddHours(3));
this.radChat1.AddMessage(message3);



Additional information about the supported HTML-like text formatting is available in the following help article: https://docs.telerik.com/devtools/winforms/telerik-presentation-framework/html-like-text-formatting

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Sr.
Progress TelerikRadChat for Winforms
0
Stephen
Top achievements
Rank 1
answered on 03 Dec 2018, 04:28 PM

This is PERFECT!  It's working fine for me.  My problem originally was that I was putting quotation marks around the link reference.

Thanks again.  I purchased the WinForms license for 3 years and am excited about this component.

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 04 Dec 2018, 11:16 AM
Hello, Stephen,    

Thank you for the kind words. I am really thrilled to hear that the provided code snippet was useful for your case and you probably have plans to further use our RadChat control. 

Should you have further questions please let me know.

Regards,
Dess | Tech Support Engineer, Sr.
Progress TelerikRadChat for Winforms
Tags
Conversational UI, Chat
Asked by
Stephen
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Stephen
Top achievements
Rank 1
Share this question
or