Button: [UWP] ArgumentException is raised when targeting Windows 10 version 1809
When the Target version of the UWP project is Windows 1809, RadButton raises the following exception:
System.ArgumentException: Value does not fall within the expected range.
3 comments
SBSDEV
Posted on:25 Jul 2019 21:32
Outstanding. I'll add it to the style and see if it just works.
ADMIN
Lance | Senior Manager Technical Support
Posted on:25 Jul 2019 21:28
Hi Craig,
You can fix this by setting BorderThickness to zero:
<RadButton BorderThickness="0"/>
The reason the problem arises in 1903 (SDK 18362) is because Microsoft changed the behavior of UWP controls and default values for null when it's a non nullable property type. Traditionally, you'd use "-1", but that is no longer accepted and causes an OutOfRangeException Therefore, by overriding the default -1 value with 0, you avoid the exception.
Note: this also rears it's head in other places, like RadBorder. If you see this exception again, try setting BorderThickness to 0 on those controls as well.
Regards,
Lance | Technical Support Engineer, Principal
Progress Telerik
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Feedback Portal
and vote to affect the priority of the items
SBSDEV
Posted on:25 Jul 2019 21:01
Same here - Windows 1903 also experiencing the same issue.