I am using the Frame control in a Shamar Shared Shared project. I just have a few styles:
<Color x:Key="Info">#0060ac</Color> ... <Style x:Key="LabelContainer" TargetType="Frame"> <Setter Property="Padding" Value="5" /> <Setter Property="HorizontalOptions" Value="Fill" /> </Style> <Style x:Key="LabelContainer-Info" TargetType="Frame" BasedOn="{StaticResource LabelContainer}"> <Setter Property="BackgroundColor" Value="{DynamicResource Info}" /> </Style>
and a simple Frame control on the XAML page:
<Frame x:Name="CreditCardPaymentResultFrame" Style="{StaticResource LabelContainer-Info}" Padding="0"> <Label x:Name="PaymentErrorLabel" Text="Lorem ipsum" IsVisible="True" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" VerticalTextAlignment="Center" HorizontalTextAlignment="Center" FontSize="18" TextColor="White"> </Label> </Frame>
and I get something like this:

Now, if I try to change the background color at runtime:
CreditCardPaymentResultFrame.BackgroundColor = Color.FromHex("#ed3700");
frame control loses the roundness of the border:

I do not understand this behavior, I need to change the back color, but I would like to keep the rounded edges.
Thanks to everyone who gave me a hand
source share