I created a custom xamarin view call DetailsCell, the point of it is to reduce repetitive code across the project. In my custom view I created a bindable property as seen below.
public static readonly BindableProperty CellDetailsTextProperty = BindableProperty.Create(
nameof(DetailsText),
typeof(string),
typeof(DetailsCell),
string.Empty,
BindingMode.TwoWay,
propertyChanged: OnDataChanged);
public string DetailsText
{
get
{
return (string)GetValue(CellDetailsTextProperty);
}
set
{
SetValue(CellDetailsTextProperty, value);
}
}
Setting this in xaml with just a string works fine (i.e. <Cells:DetailsCell DetailsText="test"/>
), however I get the error: > No property, bindable property, or event found for 'DetailsText' when I try to do the following <Cells:DetailsCell DetailsText="{Binding FromDetailstext}"/>
this FromDetailstext comes from the viewmodel of my project. When I do put a normal label and bind the text of the label with "{Binding FromDetailstext}" it works fine. So I have really no idea why this doesn't work any help would be really appreciated