[Xaml] OnIdiomMarkupExt uses converters on BPs (#4500)
authorStephane Delcroix <stephane@delcroix.org>
Thu, 22 Nov 2018 09:05:21 +0000 (10:05 +0100)
committerGitHub <noreply@github.com>
Thu, 22 Nov 2018 09:05:21 +0000 (10:05 +0100)
commitd0456e2d6e46a75eca28b3b5efe06da367b0d6c5
treed77b4f42ee515761f2166bf752484704f6565449
parentfbf59e12c73a7a15191455e47498e432cae457e8
[Xaml] OnIdiomMarkupExt uses converters on BPs (#4500)

Up to now, OnPlatform and OnIdiom markup extensions were checking for
type converters on
- target type
- the property being set

in case of a bindable property, the converter on the BP getter or
GetBP() static method (for attached BPs) wasn't checked.

This PR adds the check for that, plus a unit test.

- fixes #4319
Xamarin.Forms.Xaml.UnitTests/Issues/Gh4319.xaml [new file with mode: 0644]
Xamarin.Forms.Xaml.UnitTests/Issues/Gh4319.xaml.cs [new file with mode: 0644]
Xamarin.Forms.Xaml/MarkupExtensions/OnIdiomExtension.cs
Xamarin.Forms.Xaml/MarkupExtensions/OnPlatformExtension.cs