Bug 41054 - Cannot update Entry.Text from attached Behavior on UWP
Summary: Cannot update Entry.Text from attached Behavior on UWP
Status: VERIFIED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms (show other bugs)
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
: 43676 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-05-12 13:42 UTC by Chris Stephens
Modified: 2017-02-02 16:26 UTC (History)
5 users (show)

Tags: UWP Windows ac
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
VERIFIED FIXED

Description Chris Stephens 2016-05-12 13:42:07 UTC
I'm trying to implement a numeric-only Entry view using an attached Behaviour to reject invalid keypresses as they are entered. Unable to get it to work as expected, I downloaded your sample app and found that it shows exactly the same problem where changes made to the Entry view by the Behaviour are not reflected in the UI. The sample works fine under iOS, it's just UWP that seems to be the problem.

iOS screenshot : https://gyazo.com/511cba7c8b654eb8cac7463460b492ba
UWP screenshot : https://gyazo.com/12c2a598fc2c4edde89ad5461dd758a9

# Steps to reproduce
Downloaded the Xamarin Behaivours  sample project ...
https://github.com/xamarin/xamarin-forms-samples/tree/master/Behaviors/NumericValidationBehaviorStyle

# Expected behavior
The Behavior should be able to affect the Entry view, in the case of the sample it should change the color to red if the entered text is not numeric.  

# Actual behaviour
The Behaviour handler is not having any visible affect on the entered text.

# Test environment (full version information)
Windows 10, VS2015, Xamarin.Forms 2.2.0.31
Comment 1 E.Z. Hart [MSFT] 2016-06-03 22:08:31 UTC
Confirmed up through 2.3.0.46-pre3

The behavior fires when invalid text is entered and sets the TextColor to red, but the actual on-screen text doesn't change color until the Entry loses focus. I suspect this might just be an issue with invalidating the underlying TextBox control so that it redraws.
Comment 2 John Hardman 2016-10-24 15:39:44 UTC
@E.Z.Hart - Is there any timescale for fixing this one? I've tried all the obvious workarounds, but all either don't work or result in a horrible user experience.
Comment 3 E.Z. Hart [MSFT] 2016-12-27 19:03:34 UTC
Should be fixed in the next release.
Comment 4 Paul DiPietro [MSFT] 2017-01-11 20:05:49 UTC
*** Bug 43676 has been marked as a duplicate of this bug. ***
Comment 5 Parmendra Kumar 2017-02-02 16:26:25 UTC
I have checked this issue with Xamarin.Forms 2.3.4.184-pre1 and observed that this issue has been fixed.


Thanks.