When I create a custom renderer for Xamarin Forms Frame in Android, CornerRadius property goes for a toss. No matter what I set it to, it doesn't work. It always draw a rectangle.
Xamarin Forms (Control) -
public class MyFrame : Frame
{
}
Xamarin Forms (XAML) -
<shd:MyFrame WidthRequest="200" HeightRequest="200" CornerRadius="100">
<shd:MyFrame.Content>
<Label Text="Hello" TextColor="Black"/>
</shd:MyFrame.Content>
</shd:MyFrame>
Xamarin Android -
public class MyFrameRenderer : ViewRenderer<Controls.MyFrame, FrameRenderer>
{
public MyFrameRenderer(Context context) : base(context)
{
}
protected override void OnElementChanged(ElementChangedEventArgs<Controls.MyFrame> e)
{
base.OnElementChanged(e);
if (e.NewElement != null)
{
}
}
}
How do I set CornerRadius property to give it rounded corners.
Thanks!
Update
Neumorphism is design trend, where control have two shades of shadow, dark and light. If you visit this website you can visualize what I am trying to achieve.
I used Android's 9 patch image to achieve similar effect for a rectangular frame, however, when I tried to provide CornerRadius to it, it didn't worked.


Frameyour want , I will check that . - Junior Jiang