Using xamarin forms to develop a cross platform app, initially the app was built using Xamarin.Forms.2.4.0.38779, target framework was 6.0 and Android support library version 23.3.0. The UI code is:
// styles
<Style x:Key="DefaultButtonStyle" TargetType="Button">
<Setter Property="TextColor" Value="DodgerBlue"></Setter>
<Setter Property="BackgroundColor" Value="Transparent"></Setter>
</Style>
<Style x:Key="RoundBorderButtonStyle" TargetType="Button" BasedOn="{StaticResource DefaultButtonStyle}">
<Setter Property="BorderWidth" Value="1"></Setter>
<Setter Property="BorderRadius" Value="30"></Setter>
<Setter Property="BorderColor" Value="DodgerBlue"></Setter>
</Style>
<StackLayout Margin="15,0" Spacing="20" Orientation="Horizontal">
<Button Style="{StaticResource RoundBorderButtonStyle}" HorizontalOptions="FillAndExpand" Text="Copy"></Button>
<Button Style="{StaticResource RoundBorderButtonStyle}" HorizontalOptions="FillAndExpand" Text="Addresses"></Button>
</StackLayout>
Then the vs2017 got updated, so does xamarin forms, so I also updated the project to use latest libraries, with Xamarin.Forms.2.4.0.38779 and android target framework version 8.0, support libraries 26.1.0.1. Then suddenly the button is not rendered correctly. Before update:
after update:
Is there anything else I need to do to update xamarin forms?
Update
I created a minimum test case to show the problem, in vs create a cross-platform project, the only file changed is TestButton/TestButton/MainPage.xaml. The app screenshot:
RoundBorderButtonStyle
? – Elvis Xia - MSFT