We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Can't Change TextColor In DataFormMultiLineTextEditor

Thread ID:

Created:

Updated:

Platform:

Replies:

150934 Jan 24,2020 07:18 PM UTC Feb 6,2020 01:59 AM UTC Xamarin.Forms 9
loading
Tags: SfDataForm
Jeff Jacobs
Asked On January 24, 2020 08:59 PM UTC

Syncfusion Support,

I have the following code:

public class CustomMultilineTextEditor : DataFormMultiLineTextEditor
    {
        public CustomMultilineTextEditor(SfDataForm form) : base(form)
        {
           
        }

        protected override void OnInitializeView(DataFormItem dataFormItem, Editor view)
        {
            view.TextColor = Color.White;
            view.PlaceholderColor = Color.LightGray;
            dataFormItem.UnfocusedColor = Color.FromHex("#FF7E92A4");
            dataFormItem.FocusedColor = Color.FromHex("#FF408698");
            base.OnInitializeView(dataFormItem, view);
        }
    }

Every aspect of this is working except for the TextColor.  The TextColor remains black for some reason.  Is there any way to fix this, possibly a different property specific to DataFormMultiLineTextEditor?

Using v17.4.0.44 of SyncFusion.Xamarin.SfDataForm, 4.4.0.991537 of Xamarin.Forms.

Thanks,

Kyle

Karthikraja Arumugam [Syncfusion]
Replied On January 27, 2020 08:35 AM UTC

Hi Kyle, 
 
Thank you for contacting Syncfusion support. 
 
Based on the shared information we have checked your requirement of “Changing TextColor of multiline text editor using custom editor”. TextColor for multiline text editor is set in base OnInitializeView method so the color reset in base method. You can achieve your requirement by changing TextColor for editor view after base method call in OnInitializeView method. 
 
Please refer the following code example for the same, 
 
public class CustomMultilineTextEditor : DataFormMultiLineTextEditor 
{ 
        public CustomMultilineTextEditor(SfDataForm form) : base(form) 
        { 
 
        } 
 
        protected override void OnInitializeView(DataFormItem dataFormItem, Editor view) 
        { 
            view.PlaceholderColor = Color.Blue; 
            dataFormItem.UnfocusedColor = Color.FromHex("#FF7E92A4"); 
            dataFormItem.FocusedColor = Color.FromHex("#FF408698"); 
            base.OnInitializeView(dataFormItem, view); 
            view.TextColor = Color.Red; 
        } 
} 
 
 
We have prepared a sample based on your requirement, 
 
We hope this helps. Please let us know if you require any further assistance. 
 
Regards, 
Karthik Raja A 


Jeff Jacobs
Replied On January 27, 2020 02:28 PM UTC

Karthik,

Thank you very much for the response.  I apologize, as there was apparently a vital detail I left out.

In your sample application, if you change:

x:Name="dataForm" LayoutOptions="Default" 
                             DataObject="{Binding Contacts}"/>
To:
x:Name="dataForm" ContainerType="Outlined" LayoutOptions="TextInputLayout"
                             DataObject="{Binding Contacts}"/>

(I apologize I can't include the full line, buggy behavior in the form text editor.

It breaks the functionality in question.  I'm not sure whether it's the ContainerType or the LayoutOptions, because it seems you can't have one without the other for the Outlined ContainerType to work properly.

Also notice how all of the other properties (FocusedColor, UnfocusedColor, PlaceholderColor) don't seem to be working at all in your sample, no matter if they're before the base.OnInitializeView or after.



Whereas all of the properties work EXCEPT for text when you use Outlined mode.


Karthikraja Arumugam [Syncfusion]
Replied On January 28, 2020 01:21 PM UTC

Hi Kyle, 
 
Thank you for the update. 
 
We have analyzed and able to replicate the mentioned issue “MultilineText editor TextColor cannot be changed in Floating label layout”. We are checking the same with source and sample level. We will validate and update you the further details in two business days (January 30, 2020). We appreciate your patience until then. 
 
Regards,
Karthik Raja A 


Jeff Jacobs
Replied On January 28, 2020 01:23 PM UTC

Karthik,

Thank you for the response  That's wonderful, thanks for looking into this and I'll look forward to your findings.

Kyle

Karthikraja Arumugam [Syncfusion]
Replied On January 29, 2020 12:51 PM UTC

Hi Kyle, 
 
Thank you for the update. 
 
As we have mentioned in our previous update, we are checking the mentioned issue in source level we will update your further details on January 30, 2020. We appreciate your patience until then. 
 
Regards, 
Karthik Raja A 


Karthikraja Arumugam [Syncfusion]
Replied On January 30, 2020 12:47 PM UTC

Hi Kyle, 
 
Thank you for your patience. 
 
We have already found and fixed the mentioned issue “MultilineText editor’s TextColor cannot be changed in floating label layout” in our source, we will include the issue fix in our upcoming Weekly nuget release which is expected to roll out on February 5, 2020. We appreciate your patience until then. 
 
Regards, 
Karthik Raja A 


Jeff Jacobs
Replied On January 31, 2020 06:02 PM UTC

Karthik,

Fantastic, that's awesome.  Thank you for your work and validating my decision to go with SyncFusion!

Karthikraja Arumugam [Syncfusion]
Replied On February 3, 2020 07:27 AM UTC

Hi Kyle, 
 
Thank you for the update. 
 
As mentioned in our previous update we will include the issue fix in our upcoming Weekly nuget release which is scheduled on February 5, 2020. We appreciate your patience until then. 
 
Regards, 
Karthik Raja A 


Karthikraja Arumugam [Syncfusion]
Replied On February 6, 2020 01:59 AM UTC

Hi Kyle,                    
      
We have fixed the reported issue “MultilineText editor’s TextColor cannot be changed in floating label layout” and included the issue fix in our latest Weekly NuGet release update version 17.4.0.47 which is available for download (nuget.org).

 
We thank you for your support and appreciate your patience in waiting for this update. Please get in touch with us if you would require any further assistance. 
 
Regards, 
Karthik Raja A   


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon