impossible to change send button color

Very weird issue. I'm trying to change send button color in sfchat. I followed tutorial but i don't get what I want. 


Code:

<ContentPage.Resources>

        <syncTheme:SyncfusionThemeDictionary>

            <syncTheme:SyncfusionThemeDictionary.MergedDictionaries>

                <ResourceDictionary>

                    <x:String x:Key="SfChatTheme">CommonTheme</x:String>

                    <Color x:Key="SfChatSendButtonDisabledColor">Red</Color>

                    <Color x:Key="SfChatSendButtonColor">Orange</Color>

                </ResourceDictionary>

            </syncTheme:SyncfusionThemeDictionary.MergedDictionaries>

        </syncTheme:SyncfusionThemeDictionary>

    </ContentPage.Resources>


    <ContentPage.Content>


        <sfChat:SfChat


            x:Name="_sfChat"

            BackgroundColor="{AppThemeBinding Light=white, Dark=black}"

            Messages="{Binding Messages}"

            CurrentUser="{Binding CurrentUser}"

            ShowOutgoingMessageAvatar="False"

            ShowIncomingMessageAvatar="False"

            ShowIncomingMessageAuthorName="False"

            ShowOutgoingMessageAuthorName="False"

            AllowMultilineInput="True"

            CanAutoScrollToBottom="True"

            MessageShape="RoundedRectangle"

            ShowTimeBreak="True"

            SendMessage="_sfChat_SendMessage"

            MessageSpacing="5"

            IncomingMessageTimestampFormat="HH:mm"

            OutgoingMessageTimestampFormat="HH:mm"

            ShowTypingIndicator="False"

            Focused="_sfChat_Focused"

            AllowSwiping="False" >


        </sfChat:SfChat>


    </ContentPage.Content>



How can i solve this issue? and how can I manage light/dark


3 Replies

DV Diwakar Venkatesan Syncfusion Team May 23, 2023 12:45 PM UTC

Hi Pasquale,


For Send button color query:


We are analyzed the reported issue with provided code snippet. However, we can’t able to reproduce the issue at our end.

Could you please share the following details mentioned below,


  1. Syncfusion.Xamarin.SfChat version
  2. Xamarin.Forms version
  3. Device details


Alternatively, you can also modify the attached sample and revert back to us. This will help us to validate your issue at our end.


For Theme query:


Please refer the attached UG documentation for theme support


UG link - Applying themes for Syncfusion controls


Regards,

Diwakar. V


Attachment: ChatXamarin_ea33972c.zip


PM Pasquale Mirco May 23, 2023 04:28 PM UTC

I tried your sample and it works perfectly on simulator and device but not in my project.


I'm using:


Syncfusion.Xamarin.SfChat 20.4.0.38

Xamarin.Forms 5.0.0.2578

Device: I tried on simulator and physical (iPhone 13, iOS 14)


I use Shell; in first moment I thought it was shell issue, but I insert shell in your project and everything works perfectly. I don't understand, my code is the same of your code



EDIT: solved. in another part of my code I setup another theme



DV Diwakar Venkatesan Syncfusion Team May 24, 2023 02:45 PM UTC

Hi Pasquale, 

We are glad to know that your query has been resolved at your end. Please let us know if you need further assistance. As always, we are happy to help you out. 

Regards,
Diwakar. V


Loader.
Up arrow icon