maui icon indicating copy to clipboard operation
maui copied to clipboard

Stepper doesn't change increment value when being bound to a double in MVVM context (Windows)

Open vanillaFriday opened this issue 6 months ago • 2 comments

Description

I want to change the Increment value of a stepper dynamically. Since I use MVVM pattern I bind the value to a double in my ViewModel which can be manipulated by the user:

<Stepper x:Name="Stepper1"
         Increment="{Binding Increment}" />
public double Increment
{
    set => SetProperty(ref _increment, value);
    get => _increment;
}

What I get is the first change (set in the constructor of the ViewModel). Any later manipulations have no effect on the increment value it sticks with the first set value. The value in the ViewModel does change (see lable under the buttons).

If I run the same project with Android Simulator (Pixel 5, API 33) it does work like expected.

Steps to Reproduce

  1. Clone the project link.
  2. Run the project on windows (10.0.19041.0 or above)

Link to public reproduction project repository

https://github.com/vanillaFriday/StepperBindingIncrement/tree/master

Version with bug

7.0.101 & 8.0.6 (SR1)

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

= Windows 10.0.19041.0

Did you find any workaround?

no

Relevant log output

no response

vanillaFriday avatar Feb 19 '24 15:02 vanillaFriday

The same bug is present in MAUI .NET8.06 SR1 -> working on Android not working on Windows

vanillaFriday avatar Feb 19 '24 16:02 vanillaFriday

We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.

ghost avatar Feb 20 '24 19:02 ghost

Verified this on VS 17.10.0 Preview 2.0(8.0.14). Repro on Windows 11 iOS 17.2 and MacCatalyst, not repro on Android 14.0-API34 with below Project: StepperBindingIncrement.zip Stepper

XamlTest avatar Mar 26 '24 06:03 XamlTest