Custom Template for Messages

Hi,

I am currently using SfChat version 18.3.0.42. I am following this example https://help.syncfusion.com/xamarin/chat/messages?cs-save-lang=1&cs-lang=xaml#template-for-message as a reference to create my own incoming and outgoing messages. The example seems outdated. Would you be able to provide a completed and newer one? Also, does/will sfchat have tagging functionality? Like when we type '@' sign in the input box and list of suggested users comes up.

Looking forward to hearing from you. Thank you!
Ben

3 Replies

GS Gokul Saravanan Syncfusion Team December 9, 2020 06:06 PM UTC

Hi Ben, 
 
Thank you for contacting Syncfusion support. 
 
We checked your reported query “Demo sample not working and tagging functionality”. Currently we doesn’t have any direct support for tagging functionality. We will check whether it can be achieved through sample level and we will also validate and let you know whether it can be consider as feature request for SfChat.   
 
#Regarding demo sample not working 
We will update the sample and it will be committed in github on or before December 10, 2020. 
 
Regards 
Gokul S 



BH Ben Hotra December 9, 2020 06:23 PM UTC

Thank you so much, Gokul, for your reply. 

I have followed the sample on GitHub in the following link below and made it to work with my code.

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

I am planning to use Formatted text label on my templates for outgoing and incoming messages. How can we intercept the text messages and process it in the template class (Eg. RatingTemplate.xaml.cs)?

For your reference, I am trying to parse name inside the at tag ("Ben Hotra" for this case) and make it a bold font.

<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


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