Reputation: 1
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
Upvotes: 0
Views: 157
Reputation: 11105
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
}
}
Upvotes: 2