Is it possible to make a certain part of the message bold?

Hi,

I am currently using SfChat version 18.3.0.42. For tagging functionality, we have use our message looks like this:

<at userId='210'>Ben Hotra</at> Hi!!
Where name between at tag is our tagging user. I would like it to display like this where name is in bold font:

Ben Hotra. Hi!!

Please advice. Thank you!!
Ben


3 Replies

KK Karthikraja Kalaimani Syncfusion Team December 9, 2020 08:24 AM UTC

 
 
Hi Ben Hotra,

Your requirement can be achieved by using MessageTemplate. Please refer to the below document.

https://help.syncfusion.com/xamarin/chat/messages#template-for-message

Regards,
Karthik Raja
 



BH Ben Hotra December 9, 2020 03:45 PM UTC

Hi Karthik Raja,

Thank you so much for your reply. Based on this code on this link

https://github.com/SyncfusionExamples/Chat-Message-Template-Xamarin.Forms/blob/master/SfChat/GettingStarted/RatingTemplate.xaml.cs

I am planning to use Formatted text label for this on my template. How can we intercept the text messages and process it in the template?

Please advice. Thank you!!
Ben


KK Karthikraja Kalaimani Syncfusion Team December 11, 2020 03:18 AM UTC

 
Hi Ben,

We can get the typed text on OnSelectTemplate method. So, based on the text we can return the template which is for formatted text and template for normal text.  Please refer the ug document in that we have returned the template based on the text.

https://help.syncfusion.com/xamarin/chat/messages?_ga=2.225383130.1796147898.1607315993-1681597299.1569304579#template-for-message


Regards,
Karthik Raja 


Loader.
Up arrow icon