summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla45284.xaml.cs
blob: f78279987e8d49fb8416f951b6188bba8d1a1f32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
using System;
using System.Collections.Generic;
using System.ComponentModel;
using Xamarin.Forms;
using Xamarin.Forms.CustomAttributes;
using Xamarin.Forms.Internals;

namespace Xamarin.Forms.Controls.Issues
{
	[Preserve(AllMembers = true)]
	[Issue(IssueTracker.Bugzilla, 45284, "[iOS10] Extra tab icons display in iOS when binding Title on TabbedPage", PlatformAffected.iOS)]
	public partial class Bugzilla45284 : TabbedPage
	{
		public Bugzilla45284()
		{
			var model = new Bugzilla45284Model();
			InitializeComponent();
			BindingContext = model;
			model.Change();
		}
	}

	public class Bugzilla45284Model : INotifyPropertyChanged
	{
		public List<Bugzilla45284TabModel> Tabs => new List<Bugzilla45284TabModel> { 
			new Bugzilla45284TabModel(),
			new Bugzilla45284TabModel(),
			new Bugzilla45284TabModel(),
			new Bugzilla45284TabModel(),
			new Bugzilla45284TabModel(),
			new Bugzilla45284TabModel(),
			new Bugzilla45284TabModel(),
		};

		public event PropertyChangedEventHandler PropertyChanged;
		public void Change()
		{
			PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(Tabs)));
		}
	}

	public class Bugzilla45284TabModel
	{
		public string Title { get; set; } = "Title";
		public string Icon { get; set; } = "bank.png";
	}
}