Unplanned
Last Updated: 20 Apr 2020 09:12 by ADMIN
Jan
Created on: 17 Apr 2020 15:03
Category: UI for Xamarin
Type: Bug Report
0
Button: [Android] Loses BorderThickness After BorderColor change

Use the following code to reproduce the behavior described in the issue title:

<telerikInput:RadButton BorderThickness="10,0,0,0" BorderColor="Blue" Clicked="RadButton_Clicked"/>

private void RadButton_Clicked(object sender, EventArgs e)
{
  RadButton btn = (RadButton)sender;
  if (btn.BorderColor == Color.Blue)
  {
    btn.BackgroundColor = Color.Yellow;
    btn.BorderColor = Color.Red;
  }
  else
  {
    btn.BorderColor = Color.Blue;
    btn.BackgroundColor = Color.Cyan;
  }
}

Expected Result:

Both the BackgroundColor and BorderColor change without any changes to BorderThickness.

Observed Result:

The RadButton's border disappears. Note that even if I programmatically set BorderThickness in the same click event, it is still not visible again.

 

This is reproducible using 2020.1.318 and minimum required dependencies on Android.

1 comment
ADMIN
Didi
Posted on: 20 Apr 2020 09:12

Hi Jan,

I have changed the public feedback item's status to "Unplanned" as it is a valid bug report.

Workaround:

Wrap the RadBitton inside a RadBorder with BorderThickness set: 

<primitives:RadBorder x:Name="bdr"
                      BorderColor="Blue"
                      BorderThickness="10,0,0,0">
    <telerikInput:RadButton x:Name="btn"
                            BorderThickness="0"
                            Clicked="RadButton_Clicked" />
</primitives:RadBorder>

private void RadButton_Clicked(object sender, EventArgs e)
{
    if (bdr.BorderColor == Color.Blue)
    {
        btn.BackgroundColor = Color.Yellow;
        bdr.BorderColor = Color.Red;
    }
    else
    {
        btn.BackgroundColor = Color.Cyan;
        bdr.BorderColor = Color.Blue;
    }
}

Regards,
Didi
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.