Latest Xamarin Update (V16.8.0) Breaks XFGloss Nuget Package

Easy Going Pat 1 Reputation point

The latest update of Xamarin.Forms seems to have broken the ability of XFGloss to set a background gradient on an iOS ContentPage.

The following is the abbreviated way I create the base class for my views, which has worked fine for months:

public abstract class ViewBase : ContentPage
 private XFGloss.Gradient Gradient_Background = new XFGloss.Gradient()
 Rotation = 0,
 Steps = new XFGloss.GradientStepCollection()
 new XFGloss.GradientStep( Color.FromHex( "#888888"), 0.0 ),
 new XFGloss.GradientStep( Color.FromHex( "#777777"), 0.15),
 new XFGloss.GradientStep( Color.FromHex( "#666666"), 0.6 ),
 new XFGloss.GradientStep( Color.FromHex( "#555555"), 0.9 ),

 public ViewBase()
 BackgroundColor = Colours.MainBackground;
 XFGloss.ContentPageGloss.SetBackgroundGradient( this, Gradient_Background );
 Title = "My Content Page";

The code still compiles and runs without error but now the iOS navigation bar remains the default white colour.

I've searched for alternative ways to set the colour of the navigation bar and all seem horrendously compiles for such a simple task. Surely it is long overdue that Xamarin provides a simple way to set a gradient or perhaps image for a screen background.

  • Patrick
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,301 questions
0 comments No comments
{count} votes