Bug 61066 - After converting to .NET Standart get error "No Bindable propery or type mistmatch"
Summary: After converting to .NET Standart get error "No Bindable propery or type mist...
Status: RESOLVED ANSWERED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.5.0
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-12-11 06:25 UTC by Kain
Modified: 2017-12-11 07:08 UTC (History)
1 user (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED ANSWERED

Description Kain 2017-12-11 06:25:32 UTC
Hello!
I have this xaml code:
<ViewCell.View>
      <StackLayout>
            <Label Text="{Binding Source={x:Reference Root},Path=Text}" FontSize="{x:Static modules:FontProvider.InfoUserFontSize}" TextColor="SeaGreen" Margin="5,0"/>
            <Label Text="{Binding Source={x:Reference Root},Path=Detail}" FontSize="{x:Static modules:FontProvider.InfoDetailFontSize}" Margin="5,0"/>
      </StackLayout>
  </ViewCell.View>
In PCL library all fine. But in .NET Standart FontSize display error "No property, bindable property, or event found for 'FontSize', or mismatching type between value and property".

Here is FontProvider.cs:
public static class FontProvider
{
	public static double? InfoUserFontSize { get; set; }
	public static double InfoFontSize => InfoUserFontSize ?? 16;
	public static double InfoDetailFontSize => InfoFontSize - 2;
}

Same with IsVisible property with another element:
<modules:TimePickerNullable IsEnabled="{Binding Source={x:Reference StartSwitch}, Path=IsToggled}" NullableDate="{Binding StartTimeLabel,Mode=TwoWay}" IsVisible="{x:Static modules:UserSettings.NotUseTimeEntry}"></modules:TimePickerNullable>

IsVisible property is from base class TimePicker.

UserSettings.cs:

public static class UserSettings
{
	public static bool UseTimeEntry { get; set; }
	public static bool NotUseTimeEntry => !UseTimeEntry;
}
Comment 1 Samantha Houts [MSFT] 2017-12-11 07:08:52 UTC
Thank you for your submission. At this time, all new reports should be made on the Xamarin.Forms GitHub Issues repository. Please resubmit this report at https://github.com/xamarin/Xamarin.Forms/issues. This Bugzilla report will now be closed and will not be monitored.