0

I created a custom control as extension of EntryCell with a bindable property. I implemented the renderer on ios by extending EntryCellRenderer. I would like to Change a property of my renderer when the bindable property changes. EntryCellRenderer has a static Methode OnCellPropertyChanged, which I can't override in my renderer. Any Idea how could I achieve that?

Best thanks for your Help

platon4
  • 1
  • 1

1 Answers1

2

Sounds like the exact reason for the OnElementPropertyChanged method that you can override in the custom renderer.

protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e) {
    base.OnElementPropertyChanged(sender, e);

    if(e.PropertyName == CustomEntryCell.MyCustomThingProperty.PropertyName) { //Make sure to check against your BinableProperty.PropertyName like I am doing here
        //Make your change here
    }
}
hvaughan3
  • 10,955
  • 5
  • 56
  • 76