This is Xamarin's bug tracking system. For product support, please use the support links listed in your Xamarin Account.
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)

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


Attachments

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 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 2016-12-27 19:03:34 UTC
Should be fixed in the next release.
Comment 4 Paul DiPietro 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.

Note You need to log in before you can comment on or make changes to this bug.