Bug 43802 - Bind an Entry to a int? field
Summary: Bind an Entry to a int? field
Status: RESOLVED ANSWERED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.0.1
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-08-26 21:20 UTC by Alessandro
Modified: 2017-06-27 09:38 UTC (History)
4 users (show)

Tags: 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:
RESOLVED ANSWERED

Description Alessandro 2016-08-26 21:20:10 UTC
I have an Entry binded to a int? field. If I modify the Entry text, the field is not updated. If I use a "int" field instead of int?, the binding works correctly. As a workaround I have use a IValueConverter.
I would like to know if it's a bug... thanks
Comment 1 adrianknight89 2016-09-07 18:33:06 UTC
I know this is WPF, but not sure if you can or have to set TargetNullValue.

http://stackoverflow.com/questions/21793193/wpf-textbox-accept-int-but-not-nullable-int
Comment 4 Stephane Delcroix 2017-06-27 09:38:13 UTC
We do not, at the moment, support TargetNullValue, so we can't support this scenario. I'd recommend handling this in your ViewModel.