Use a StaticResource font for Incoming/Outcoming messages

Hello,

Im using SfChat for my chat app, and i have a font set  up in my App.xaml, and i want to use it as my Incoming/Outcoming  messages font.

Here is my code:
<ContentPage.Resources>
        <syncTheme:SyncfusionThemeDictionary>
            <syncTheme:SyncfusionThemeDictionary.MergedDictionaries>
                <ResourceDictionary>
                    <x:String x:Key="SfChatTheme">CustomTheme</x:String>
                    <x:String x:Key="SfChatIncomingMessageAuthorFontFamily">MontserratRegular</x:String>
                </ResourceDictionary>
            </syncTheme:SyncfusionThemeDictionary.MergedDictionaries>
        </syncTheme:SyncfusionThemeDictionary>
    </ContentPage.Resources>
How do i use {StaticResource MonserratRegular} instead of just passing a font-name ?

3 Replies 1 reply marked as answer

KK Karthikraja Kalaimani Syncfusion Team October 16, 2020 02:23 PM UTC

Hello Fodil,

Currently, we are validating your requirement. we will validate and update the details on or before 20th Oct 2020. We appreciate your patience until then.

Regards,
Karthik Raja 



KK Karthikraja Kalaimani Syncfusion Team October 16, 2020 02:45 PM UTC

  
Hi  jose,

Thanks for the update.

Currently, we are validating your requirement. we will validate and update the details on or before 20th Oct 2020. We appreciate your patience until then.

Regards,
Karthik Raja 



SS Sivaraman Sivagurunathan Syncfusion Team October 20, 2020 10:57 AM UTC

Hi Fodil, 

Thanks for your patience. 

We have checked your query. you can set the custom font using SyncfusionThemeDictionary. Please refer the following  code snippet for your reference. And we have attached blow link to use the Custom font icon. We have pared the sample based on your requirement and attached for your reference. You can download the same from the below link. 


<ContentPage.Resources> 
    <syncTheme:SyncfusionThemeDictionary> 
        <syncTheme:SyncfusionThemeDictionary.MergedDictionaries> 
            <ResourceDictionary> 
                <x:String x:Key="SfChatTheme">CustomTheme</x:String> 
                <x:String x:Key="SfChatIncomingMessageFontFamily">Amontillados.ttf#</x:String> 
                <x:String x:Key="SfChatIncomingMessageAuthorFontFamily">Amontillados.ttf#</x:String> 
            </ResourceDictionary> 
        </syncTheme:SyncfusionThemeDictionary.MergedDictionaries> 
    </syncTheme:SyncfusionThemeDictionary> 
</ContentPage.Resources> 



Regards, 
Sivaraman S 


Marked as answer
Loader.
Up arrow icon