I have my own renderer for Xamarin Forms Frame: CustomFrameRenderer . Xaml example below
<controls:ExtendedFrame Margin="2,0,2,0" BackgroundColor="Red" HorizontalOptions="FillAndExpand" OutlineColor="Red" Padding="0,0,0,0"> <Label Text="This is a test"/> </controls:ExtendedFrame>
The problem is that if I bind the bacground color to a property like this,
<controls:ExtendedFrame Margin="2,0,2,0" BackgroundColor="{Binding FrameBackground}" HorizontalOptions="FillAndExpand" OutlineColor="{Binding FrameBackground}" Padding="0,0,0,0">
The frame updates its color based on the item selected in the ListView. Now, if I use a standard frame, it works fine. But I use my own rounded frame, I get this error in Android.
Java.Lang.NullPointerException: attempt to call the virtual method 'boolean android.graphics.Bitmap.isMutable ()' to reference a null object
Any help is appreciated.
source share