Error with lastest version Xamarin.Forms Button.CornerRadius

Multi tool use
Error with lastest version Xamarin.Forms Button.CornerRadius
[Update: Code worked on Android 8.0 simulator]
I keep receive error No CornerRadius property found for the type Button
My code behind
public TabbedPage1 ()
{
InitializeComponent();
this.FindByName<Button>("runButton").CornerRadius = screenX / 5;
}
My xaml
<?xml version="1.0" encoding="utf-8" ?>
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="FuckThis.TabbedPage1">
<ContentPage x:Name="Page1">
<RelativeLayout>
<Button xmlns:android="http://schemas.android.com/apk/res/android"
x:Name="runButton"
Text="Run"
RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent,Property=Width,Factor=0.4}"
RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent,Property=Width,Factor=0.4}"
RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent,Property=Height,Factor=0.3}"
RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent,Property=Width,Factor=0.3}"
BorderRadius="200"
CornerRadius="200"
/>
</RelativeLayout>
</ContentPage>
</TabbedPage>
I've tried BorderRadius but it didnt work due to new Xamarin.Forms version 3.1
In another try, CornerRadius worked on Android and showed error on iOS, but then i tried to create new project and all f...ed up, now it's bug on Android also
1 Answer
1
Try this:
public TabbedPage1 ()
{
InitializeComponent();
runButton.CornerRadius = screenX / 5;
}
but nvm, i found a way to fix it :v
– Thạch Đức Long
2 days ago
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
can you explain a little bit?
– Thạch Đức Long
2 days ago