Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

V1.2.1 BUG: Opacity = 0 is still visible

$
0
0

In the latest release, if you set Opacity = 0 on a Label (I haven't tested anything else), the label is still visible on the View.

Repro

  1. Create a new PCL project
  2. Update Xamarin.Forms to v 1.2.1
  3. Paste the below code into your App.cs
  4. Run (only tested on Android)

    public class App
    {
        public static Page GetMainPage()
        {
            return new NavigationPage(new RootPage());
        }
    }
    
    public class RootPage : ContentPage
    {
        public RootPage()
        {
            var lbl1 = new Label
            {
                Text = "You should be able to see me!",
                VerticalOptions = LayoutOptions.CenterAndExpand,
                HorizontalOptions = LayoutOptions.CenterAndExpand,
            };
    
            var lbl2 = new Label
            {
                Text = "If you can see me, there's a bug!",
                Opacity = 0,
                VerticalOptions = LayoutOptions.CenterAndExpand,
                HorizontalOptions = LayoutOptions.CenterAndExpand,
            };
    
            Content = new StackLayout {Children = {lbl1, lbl2}};
        }
    }
    

Viewing all articles
Browse latest Browse all 58056

Trending Articles