summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1549.xaml.cs
blob: 850201dea9b8470c618fb144240537a3e5470f0c (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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
using System;
using System.Collections.Generic;
using Xamarin.Forms;
using System.Collections.ObjectModel;

using Xamarin.Forms.CustomAttributes;

namespace Xamarin.Forms.Controls
{	
#if APP
	public class BaseView : ContentPage
	{
		public BaseView()
		{
		}
	}

	[Preserve (AllMembers=true)]
	[Issue (IssueTracker.Github, 1549, "XAML converters not invoked", PlatformAffected.Android | PlatformAffected.iOS | PlatformAffected.WinPhone)]
	public partial class Issue1549 : BaseView
	{	
		public Issue1549 ()
		{
			InitializeComponent ();

			Items = new ObservableCollection<Issue1549Item> ();
			Items.Add (new Issue1549Item () { IsLocked = true });
			Items.Add (new Issue1549Item () { IsLocked = true });
			Items.Add (new Issue1549Item () { IsLocked = true });
			Items.Add (new Issue1549Item () { IsLocked = true });
			lst.BindingContext = this;
		}

		public new ObservableCollection<Issue1549Item> Items {
			get;
			set;
		}
	}

	public class InvertBoolenConverter : IValueConverter
	{

		#region IValueConverter implementation

		public object Convert (object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
		{
			if (value is bool)  {

				return !(bool)value;
			}
			return value;
		}

		public object ConvertBack (object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
		{
			throw new NotImplementedException ();
		}

		#endregion
	}


	public class Issue1549Item
	{

		public bool IsLocked {
			get;
			set;
		}

	}
#endif
}