Hi - icons used in the Navigation bar of the MasterDetailPage are being displayed with a blue tint on iOS. The nav.png in the code below is a green image but is being turned blue when displayed. Code is taken from here (as an aside code in docs doesn't work on IOS, I had to put the detail page in a NavigationPage to get the menu to appear).
Is there a workaround for this? The blue is the same as the "Built with Evaluation Software" splash screen, guess this is cause of the bug? (we do intent to pay soon but need demoable software to get buy in).
thanks
public class ImageMDView : MasterDetailPage
{
public ImageMDView()
{
// Assemble an array of NamedColor objects.
NamedColor[] namedColors =
{
new NamedColor("Aqua", Color.Aqua),
new NamedColor("Black", Color.Black),
new NamedColor("Blue", Color.Blue),
new NamedColor("Fuschia", Color.Fuschia),
new NamedColor("Gray", Color.Gray),
new NamedColor("Green", Color.Green),
new NamedColor("Lime", Color.Lime),
new NamedColor("Maroon", Color.Maroon),
new NamedColor("Navy", Color.Navy),
new NamedColor("Olive", Color.Olive),
new NamedColor("Purple", Color.Purple),
new NamedColor("Red", Color.Red),
new NamedColor("Silver", Color.Silver),
new NamedColor("Teal", Color.Teal),
new NamedColor("White", Color.White),
new NamedColor("Yellow", Color.Yellow)
};
// Create ListView for the master page.
ListView listView = new ListView();
var cell = new DataTemplate(typeof(ImageCell));
cell.SetBinding(TextCell.TextProperty, "Name");
listView.ItemTemplate = cell;
listView.ItemsSource = namedColors;
// Create the master page with the ListView.
ContentPage masterP = new ContentPage
{
Title = "menu",
Icon = "nav.png",
Content = new StackLayout
{
Orientation = StackOrientation.Vertical,
Spacing = 0,
Children =
{
listView
}
}
};
this.Master = masterP;
// Create the detail page using NamedColorPage
this.Detail = new NavigationPage(new ContentPage{Content = new Label{
Text = "ASDA",
HorizontalOptions = LayoutOptions.Center,
VerticalOptions = LayoutOptions.Center
}});
// Define a selected handler for the ListView.
listView.ItemSelected += (sender, args) =>
{
this.IsPresented = false;
};
}
}
public class NamedColor
{
public NamedColor (string name, Color color)
{
Name = name;
Colour = color;
}
public string Name {
get;
set;
}
public Color Colour {
get;
set;
}
}