XAM-Consulting / FreshEssentials

FreshEssentials for Xamarin.Forms has ONLY the most common extensions you need for Xamarin.Forms
Apache License 2.0
107 stars 30 forks source link

SegmentedButton Frame background color not rendering properly after becoming visible (iOS only) #38

Open jeremywen3 opened 6 years ago

jeremywen3 commented 6 years ago

If the SegmentedButton is initially invisible and is made visible the frame background and border colors are not showing until they are clicked on. Appears to be an issue for iOS (tested on simulator)

lvPokka commented 6 years ago

Found fix for this issue, you should add to iOS custom renderer

public override void LayoutSubviews() { base.LayoutSubviews(); this.SetNeedsDisplay(); }

jhitze commented 6 years ago

I ran into this weird bug too. I had a SegmentedButtonGroup that I wanted hidden at first sight of the ContentPage.

Workaround Steps:

  1. In my XAML, I took out the IsVisible binding that I had.
  2. I my XAML's code-behind, I overrode the OnAppearing() method.
protected override async void OnAppearing()
{
    ButtonGroupSort.SetBinding(SegmentedButtonGroup.IsVisibleProperty, "Property.To.Bind.To")
}

Hope this helps someone else! :smile:

uksreejith commented 5 years ago

I am also facing this issue. Any update on this bug? :(