Bug 28764 - Slider control doesn't follow model property value.
Summary: Slider control doesn't follow model property value.
Status: RESOLVED NOT_ON_ROADMAP
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.4.1
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-04-04 06:56 UTC by Ed
Modified: 2015-05-19 17:05 UTC (History)
5 users (show)

Tags: all functional binder
Is this bug a regression?: ---
Last known good build:


Attachments
Demo project (269.77 KB, application/zip)
2015-04-04 06:56 UTC, Ed
Details


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 NOT_ON_ROADMAP

Description Ed 2015-04-04 06:56:17 UTC
Created attachment 10634 [details]
Demo project

Slider control doesn't follow model property value. Model implements INotifyPropertyChanged interface and exposes a property that notifies when its value changes. This property is bound (two-way) to slider's value. According to MVVM pattern view must follow model state. Which means slider has to check on property value after modifying it. Because sometimes value remains unchanged when slider attempts to change it.

Here is the video demonstrating this issue: http://www.screencast.com/t/MmjDP7zY

Also attached demo project
Comment 1 Rajneesh Kumar 2015-04-28 14:38:59 UTC
I have checked this issue and able to reproduce the reported the behaviour as shown in the screencast. I observed that after sliding the slider more than half of its width Slider control doesn't follow model property value. Please confirm me that Is that same behaviour you are experiencing at your end ? If no then could you please let me know that what steps should I follow to reproduce this issue.

Screencast: http://www.screencast.com/t/835pPZvmyPJ

Thanks

Environment Info:

Xamarin.Forms version: 1.4.3.6358-pre2
=== Xamarin Studio ===

Version 5.9 (build 436)
Installation UUID: 011d70a5-dede-428b-ab04-ef451c2e539d
Runtime:
	Mono 4.0.1 ((detached/735f5b3)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 400000008

=== Apple Developer Tools ===

Xcode 6.2 (6776)
Build 6C131e

=== Xamarin.iOS ===

Version: 8.10.0.269 (Business Edition)
Hash: 62f9f08
Branch: master
Build date: 2015-04-27 22:39:33-0400

=== Xamarin.Android ===

Version: 5.1.0.115 (Business Edition)
Android SDK: /Users/MM/Desktop/android-sdk-macosx
	Supported Android versions:
		2.3    (API level 10)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
Java SDK: /usr
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

=== Xamarin Android Player ===

Version: Unknown version
Location: /Applications/Xamarin Android Player.app

=== Xamarin.Mac ===

Version: 2.0.0.269 (Business Edition)

=== Build Information ===

Release ID: 509000436
Git revision: 7e8ba4cbccf7b188ce5e80a90fdc4acdedb5a83f
Build date: 2015-04-23 13:19:57-04
Xamarin addins: 21fd95f743742c5237e22023996c2800ce3f8db3

=== Operating System ===

Mac OS X 10.9.5
Darwin MacMini.local 13.4.0 Darwin Kernel Version 13.4.0
    Sun Aug 17 19:50:11 PDT 2014
    root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64
Comment 2 Ed 2015-04-28 14:44:42 UTC
I confirm. Indeed model's property doesn't go beyond 0.5 value, while Slider moves all to its max that is 1.0. This breaks View <-> Model sync.
Comment 3 Rajneesh Kumar 2015-04-28 14:47:13 UTC
Thanks a lot Ed, for confirmation of issue. 

So as per comment 2 changing its status from needinfo to confirmed.
Comment 4 Eric Maupin 2015-05-19 17:05:03 UTC
We currently do not intend to resolve this. There are performance concerns to always calling the getter again just to ensure that the value is the same. I would encourage you to resolve this by changing the maximum value of the slider to provide this exact functionality. Alternatively, fire PropertyChanged in your property setter when it does not reach your condition to force the second check you're requesting.