This is a migrated thread and some comments may be shown as answers.

Throw exception on UWP when open popup

3 Answers 20 Views
Popup
This is a migrated thread and some comments may be shown as answers.
Itai
Top achievements
Rank 1
Itai asked on 20 Jan 2020, 01:28 PM

Hello,

When I try to open a popup in uwp (Tried on local machine - windows 10) it throws the following exception : 

System.ArgumentException: 'Value does not fall within the expected range.'

 

The command I used: 

continuePopup.IsOpen = true;

3 Answers, 1 is accepted

Sort by
0
Didi
Telerik team
answered on 21 Jan 2020, 09:50 AM

Hi,

I have tested our Popup SDK examples and I cannot reproduce the following exception. 

We have recieved similar crash with the RadButrton and RadBorder controls on UWP but not for the RadPopup control. If you have placed inside the popup - RadBorder or RadButton  I suggest you set BorderTickness to 0 and check whetehr the issue will be solved.

If this suggestion does not solve the issue, as a next step, please open a support ticket and attach a repro project there. Also add the following information:

- versions of Xamarin and Telerik used in the project.

- versions of the Windows and Visual Studio.

Regards,
Didi
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
0
Itai
Top achievements
Rank 1
answered on 27 Jan 2020, 10:59 AM

Hello,

That solved the issue, but what if I want a border? Would it be fixed in the next version?

 

Thank you.

0
Didi
Telerik team
answered on 27 Jan 2020, 03:19 PM

Hi,

We have an issue logged in our feedback portal regarding this exception for the RadButton control: https://feedback.telerik.com/xamarin/1402384-button-uwp-argumentexception-is-raised-when-targeting-windows-10-version-1809

and the reply in the feedback item:

"
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.

"

By default the value for the borderthickness is -1 and exception is raised. When you change it to 0 you avoid the exception. Indeed you can also change its value to 5, 10 or the value needed for your requirements. 

Regards,
Didi
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
Tags
Popup
Asked by
Itai
Top achievements
Rank 1
Answers by
Didi
Telerik team
Itai
Top achievements
Rank 1
Share this question
or