xamarin/Xamarin.Forms
View on GitHub[Xaml] Missing platform/idiom value in OnPlatform/OnIdiom causes ArgumentNullException when type is x:BindingBase
Open
#5,629 opened on Mar 20, 2019
a/Xaml </>a/binding ⛓e/2 :clock2:good first issuehelp wantedinactivet/bug :bug:up-for-grabs
Description
Description
Missing platform/idiom value in OnPlatform/OnIdiom causes ArgumentNullException when type is x:BindingBase.
Steps to Reproduce
-
for example:
<StackLayout><StackLayout.IsEnabled><OnPlatform x:TypeArguments="BindingBase" iOS="{Binding Source=False}"/></StackLayout.IsEnabled></StackLayout> -
run it on any non-iOS platform.
Expected Behavior
don't try to set any binding or value for IsEnabled on any other platform than iOS.
Actual Behavior
[ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentNullException: Value cannot be null. Parameter name: binding at (wrapper dynamic-method) System.Object.7(intptr,intptr,intptr) at (wrapper native-to-managed) System.Object.7(intptr,intptr,intptr)
Basic Information
- Version with issue: 3.6.0
- IDE: VS 15.9.8
- Platform Target Frameworks: Xamarin.Forms