You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the value is either greater than GreaterThan or less than LessThan the first if statement returns false as expected. However this results in one or the other of the following else if statements returning true which doesn't indicate that the value was not between the GreaterThan and LessThan values.
Regression
No response
Reproducible in sample app?
This bug can be reproduced in the sample app.
Steps to reproduce
1. Create an application.
2. Create a resource for a `DoubleToObjectConverter`.
3. In the resource specify values for BOTH `GreaterThan` AND `LessThan`.
4. Use the converter in a property in a xaml file.
Expected behavior
If the value passed to the converter is greater than GreaterThan or less than LessThan the converter should return FalseValue.
Hello Donsroom, thank you for opening an issue with us!
I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌
Describe the bug
If you create a resource for the DoubleToObjectConverter as follows (note that
GreaterThan
andLessThan
are both set):If the value is either greater than
GreaterThan
or less thanLessThan
the firstif
statement returns false as expected. However this results in one or the other of the followingelse if
statements returning true which doesn't indicate that the value was not between theGreaterThan
andLessThan
values.Regression
No response
Reproducible in sample app?
Steps to reproduce
Expected behavior
If the value passed to the converter is greater than
GreaterThan
or less thanLessThan
the converter should returnFalseValue
.Screenshots
No response
Windows Build Number
Other Windows Build number
No response
App minimum and target SDK version
Other SDK version
No response
Visual Studio Version
2022
Visual Studio Build Number
4.8.09032
Device form factor
Desktop
Nuget packages
CommunityToolkit.WinUI.UI 7.1.2
Microsoft.WindowsAppSDK 1.2.230217.4
Microsoft.Windows.SDK.BuildTools 10.0.22621.755
Additional context
Changing the following code in DoubleToObjectConverter.cs:
To:
fixes the issue by isolating the logic for both values being set from the logic for only one value being set.
The text was updated successfully, but these errors were encountered: