Hi
Phil,
Query
1:
If you set it to "Black", then when you turn Dark Mode on on the
device, it changes TextColour to White.
We are able to reproduce the issue “Text color
turns white when enable Dark mode along with setting TextColor property to Black
in the iOS 13 version” at our end. We are checking the same scenario with Xamarin.Forms
Entry.
Query
2: My App is NOT doing
dark mode, as many apps still do not.
We
would like to clarify regarding this. Could you please confirm whether you have
enabled dark mode in your device settings. If so, we hope it is possible to
overcome this issue using the solution provided in the previous update. Could
you please check whether it will satisfy your requirement.
Regards,
Lakshmi
R.
We have checked the feasibility and we will improve this in our
source level. As of now, you can resolve the reported issue by setting the TextColor
property as shown in the below code snippet in the AppDelegate.cs file.
Code Snippet:
AppDelegate.cs: (C#)
private void Forms_ViewInitialized(object sender,
Xamarin.Forms.ViewInitializedEventArgs e) { if (e.View !=
null && e.View is
Syncfusion.SfNumericTextBox.XForms.SfNumericTextBox) { var
formsNumericTextBox = e.View as
Syncfusion.SfNumericTextBox.XForms.SfNumericTextBox; var
textColor = formsNumericTextBox.TextColor; if
(e.NativeView != null && e.NativeView is NativeTextBox) {
(e.NativeView as NativeTextBox).TextColor =
UIColor.FromRGBA(float.Parse(textColor.R.ToString()),
float.Parse(textColor.G.ToString()), float.Parse(textColor.B.ToString()),
float.Parse(textColor.A.ToString())); } } } |
Please let us know if you need further clarification on this.
Regards,
Lakshmi R.