Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Error went attempting to bind to custom form bindingproperty

$
0
0

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


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>