Xamarin.Forms icon indicating copy to clipboard operation
Xamarin.Forms copied to clipboard

VisualStateManager not applying TextColor on Entry with Visual/Material applied

Open ravero opened this issue 5 years ago • 3 comments

Description

VisualStateManager is not working properly for VisualStates declared in an Entry with Visual="Material" applied. This issue only affects iOS.

Steps to Reproduce

  1. Create a Page with an Entry
  2. Setup the Entry to use Material Visual
  3. Create custom Visual States with setters that changes the TextColor property
  4. Implement some login to change between the defined Visual States

Expected Behavior

When changing to a new Visual State, the correct color should be applied to the TextColor Property.

Actual Behavior

The application of the TextColor Setter property behaves inconsistently between states. I could check on debugging that the property has changed, but not applied on screen.

Basic Information

  • Version with issue: 3.6.0264807
  • Last known good version: No previous history
  • IDE: Visual Studio for Mac 2019
  • Platform Target Frameworks:
    • iOS: 12.1
  • Nuget Packages: Xamarin.Forms, Xamarin.Forms.Visual.Material
  • Affected Devices: all

ravero avatar Mar 27 '19 14:03 ravero

Looks like it's an issue with TextColor property when changed values after the Entry has been loaded. Changed the VisualState on the constructor works fine. I've also tested with a DataTrigger and it couldn't change the value accordingly.

ravero avatar Mar 27 '19 14:03 ravero

This almost works on Android, the text color changes on Android, along with the underline color but the background color does not change.

killer-frog avatar May 30 '19 07:05 killer-frog

Looks like it's an issue with TextColor property when changed values after the Entry has been loaded. Changed the VisualState on the constructor works fine. I've also tested with a DataTrigger and it couldn't change the value accordingly.

#6571

jcmanke avatar Jun 18 '19 21:06 jcmanke