summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared')
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/AddingMultipleItemsListView.cs443
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/AppBarIconColors.cs52
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla21368.cs90
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla21501.cs47
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla21780.cs19
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla22229.xaml11
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla22229.xaml.cs51
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla22401.cs114
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla24574.cs50
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla24769.cs80
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla25662.cs35
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla25979.cs133
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla26032.xaml51
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla26032.xaml.cs75
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla26171.cs98
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla26233.cs56
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla26501.cs150
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla26868.cs105
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla26993.cs105
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla27085.cs36
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla27318.xaml23
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla27318.xaml.cs22
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla27350.cs151
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla27378.cs33
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla27581.cs29
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla27642.cs178
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla27698.cs53
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla27779.cs83
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla28001.cs60
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla28240.cs38
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla28498.cs78
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla28570.cs118
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla28575.cs53
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla28709.cs94
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla28796.cs35
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla28939.cs21
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29017.cs82
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29107.xaml249
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29107.xaml.cs22
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29128.cs36
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29158.cs24
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29229.cs29
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29247.cs67
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29257.cs100
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29363.cs48
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29453.cs72
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla30317.cs260
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla30324.cs97
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla30353.cs113
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla30651.cs101
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla30835.cs207
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla30935.cs44
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31029.cs126
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31114.cs421
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31145.cs67
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31255.cs88
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31330.cs163
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31333.cs256
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31366.cs85
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31395.cs54
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31602.cs130
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31964.cs116
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31967.xaml18
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31967.xaml.cs47
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32034.cs31
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32040.cs59
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32148.cs240
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32230.cs59
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32447.xaml160
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32447.xaml.cs28
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32462.cs57
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32487.cs50
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32615.cs70
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32691.cs60
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32776.cs20
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32801.cs92
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32842.xaml42
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32842.xaml.cs46
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32847.cs119
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32898.cs74
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32902.cs131
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla33268.cs143
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla33450.cs47
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla33578.cs99
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla33612.cs159
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla33714.cs86
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla33870.cs71
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla33890.cs38
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla34007.cs91
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla34061.cs76
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla34072.cs54
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla34561.cs89
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla34632.cs79
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla34720.cs352
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla34727.cs30
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla34912.cs106
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35078.cs34
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35127.cs22
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35157.cs58
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35294.cs45
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35472.cs88
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35477.cs49
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35490.cs39
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35733.cs58
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35738.cs41
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36009.cs56
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36014.cs16
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36171.cs107
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36393.cs43
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36479.cs43
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36559.cs54
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36649.cs29
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36681.cs88
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36788.cs122
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla37462.cs88
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla37601.cs50
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla37625.cs36
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla37841.cs153
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla37863.cs26
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla38105.cs59
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla38112.cs98
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla38416.xaml27
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla38416.xaml.cs48
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla38658.cs74
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla38827.xaml24
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla38827.xaml.cs20
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla38978.cs90
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39331.cs71
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39395.cs30
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39461.cs36
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39463.xaml18
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39463.xaml.cs33
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39483.xaml24
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39483.xaml.cs50
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39499.cs134
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39530.cs85
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39624.cs40
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39668.cs51
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/CarouselAsync.cs114
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/ComplexListView.cs111
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/DataTemplateGridImageTest.cs55
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/DefaultColorToggleTest.cs146
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/DisposedSharedPages.cs70
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/InputTransparentIssue.cs37
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/IsPasswordToggleTest.cs38
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/IsShowingUserIssue.cs35
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1025.cs24
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1026.cs91
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1028.cs31
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1075.cs85
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1097.cs60
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1146.cs48
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1219.cs19
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1228.cs67
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1236.cs26
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1259.cs112
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1267.cs65
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1305.cs50
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1329.cs46
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1384.cs40
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1400.cs153
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1461.cs286
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1497.xaml27
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1497.xaml.cs20
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1538.cs28
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1545.xaml16
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1545.xaml.cs129
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1546.cs21
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1549.xaml34
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1549.xaml.cs74
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1554.xaml20
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1554.xaml.cs25
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1557.cs34
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1566.cs91
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1567.cs37
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1568.xaml53
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1568.xaml.cs22
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1583.cs20
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1590.cs123
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1593.cs169
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1598.cs80
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1613.cs64
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1618.cs37
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1641.xaml17
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1641.xaml.cs17
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1644.cs74
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1653.xaml22
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1653.xaml.cs25
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1653v2.xaml20
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1653v2.xaml.cs23
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1664.cs46
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1680.cs106
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1682.cs30
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1685.cs77
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1691.cs77
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1698.cs29
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1700.cs30
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1703.cs63
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1705.cs38
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1712.xaml6
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1712.xaml.cs20
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1722.cs26
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1723.cs53
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1741.xaml6
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1741.xaml.cs27
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1742.cs55
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1747.xaml9
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1747.xaml.cs65
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1755.cs36
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1758.cs68
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1762.cs273
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1763.cs104
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1766.xaml22
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1766.xaml.cs65
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1769.cs81
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1777.cs66
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue181.cs41
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1851.cs92
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1875.cs105
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1888.cs36
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1891.cs81
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1895.cs80
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1898.xaml20
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1898.xaml.cs47
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1905.cs31
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1914.cs27
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue194.cs72
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue198.cs78
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue206.cs143
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue214.cs36
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2143.cs55
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2191.cs51
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2222.cs49
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue22246_BZ.cs49
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2241.cs58
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2248.cs74
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2259.cs156
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2266.cs162
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2270.cs77
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2272.cs54
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2282.xaml32
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2282.xaml.cs42
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2288.xaml10
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2288.xaml.cs40
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2289.xaml36
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2289.xaml.cs119
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue229.cs29
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2291.cs36
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2292.cs39
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2294.cs60
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2333.cs39
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2339.cs66
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2354.cs116
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2357.xaml21
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2357.xaml.cs418
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2411.cs276
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2414.cs97
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2470.xaml29
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2470.xaml.cs155
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2563.cs41
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2594.cs33
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2597.cs61
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue260.cs41
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2615.cs80
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2628.cs31
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2634.cs333
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue264.cs75
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2659.xaml34
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2659.xaml.cs64
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2775.cs116
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2777.xaml23
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2777.xaml.cs132
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2783.cs36
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2794.cs48
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2809.cs50
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2883.cs125
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2923.cs83
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2927.cs105
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2948.cs232
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2951.xaml48
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2951.xaml.cs140
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2953.cs89
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2954.cs58
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2961.cs290
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2963.cs53
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2964.cs101
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2965.cs152
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2976.cs441
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2981.cs37
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2983.cs30
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2987.cs39
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue3086.xaml28
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue3086.xaml.cs31
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue3276.cs91
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue3292.cs83
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue3319.xaml42
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue3319.xaml.cs264
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue342.cs85
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue416.cs41
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue417.cs110
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue465.cs61
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue488.cs45
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue530.cs66
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue764.cs55
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue773.cs174
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue774.cs77
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue852.cs154
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue886.cs71
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue889.cs140
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue892.cs224
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue935.cs83
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue968.cs52
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue973.cs164
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/ListViewViewCellBinding.cs168
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/ModalActivityIndicatorTest.cs150
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/ModelContentPage.cs24
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/NavPage.cs25
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/NavigationStackTests.cs84
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/ScrollViewOutOfBounds.cs59
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/StackLayoutIssue.cs132
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/SwipeBackNavCrash.cs88
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/TabbedPageTests.cs64
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/TabbedPageWithList.cs71
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/TestPages/TestPages.cs223
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems485
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.shproj12
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/_Template.cs35
327 files changed, 26132 insertions, 0 deletions
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/AddingMultipleItemsListView.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/AddingMultipleItemsListView.cs
new file mode 100644
index 00000000..1dbd3ada
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/AddingMultipleItemsListView.cs
@@ -0,0 +1,443 @@
+using System;
+using System.Collections.ObjectModel;
+using System.ComponentModel;
+using System.Collections.Generic;
+using System.Runtime.CompilerServices;
+using System.Diagnostics;
+using System.Windows.Input;
+
+using Xamarin.Forms;
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using NUnit.Framework;
+using Xamarin.UITest;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+
+ public class PropertyChangedBase : INotifyPropertyChanged
+ {
+ Dictionary<string, object> _properties = new Dictionary<string, object>();
+
+ protected T GetProperty<T>([CallerMemberName] string name = null)
+ {
+ object value = null;
+ if (_properties.TryGetValue(name, out value)) {
+ return value == null ? default(T) : (T)value;
+ }
+ return default(T);
+ }
+
+ protected void SetProperty<T>(T value, [CallerMemberName] string name = null)
+ {
+ if (Equals(value, GetProperty<T>(name))) {
+ return;
+ }
+ _properties[name] = value;
+ OnPropertyChanged(name);
+ }
+
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
+ {
+ PropertyChangedEventHandler handler = PropertyChanged;
+ if (handler != null) {
+ handler(this, new PropertyChangedEventArgs(propertyName));
+ }
+ }
+ }
+
+ public class ViewModelError
+ {
+ public ViewModelError(string text)
+ {
+ Text = text;
+ }
+
+ public string Text { get; set; }
+
+ public override bool Equals(object obj)
+ {
+ var error = obj as ViewModelError;
+ if (error == null) {
+ return false;
+ }
+ return Text.Equals(error.Text);
+ }
+
+ public override int GetHashCode()
+ {
+ return Text.GetHashCode();
+ }
+
+ public override string ToString()
+ {
+ return string.Format("ViewModelError: {0}", Text);
+ }
+ }
+
+ public class ViewModelBase : PropertyChangedBase
+ {
+ public ViewModelBase()
+ {
+ _errors = new List<ViewModelError>();
+ Validate();
+ }
+
+ readonly List<ViewModelError> _errors;
+
+ public virtual bool IsValid
+ {
+ get { return _errors.Count <= 0; }
+ }
+
+ protected IEnumerable<ViewModelError> Errors
+ {
+ get { return _errors; }
+ }
+
+ public event EventHandler IsValidChanged;
+
+ public event EventHandler IsBusyChanged;
+
+ protected virtual void Validate()
+ {
+ OnPropertyChanged("IsValid");
+ OnPropertyChanged("Errors");
+
+ var callback = IsValidChanged;
+ if (callback != null) {
+ callback(this, EventArgs.Empty);
+ }
+
+ // Spit out errors for easier debugging.
+ if (_errors != null && _errors.Count > 0) {
+ Debug.WriteLine("Errors:");
+ foreach (var error in _errors) {
+ Debug.WriteLine(error);
+ }
+ }
+ }
+
+ protected virtual void ValidateProperty(Func<bool> validate, ViewModelError error)
+ {
+ if (validate()) {
+ _errors.Remove(error);
+ } else if (!_errors.Contains(error)) {
+ _errors.Add(error);
+ }
+ }
+
+ public virtual bool IsBusy
+ {
+ get { return _isBusy; }
+ set
+ {
+ if (_isBusy != value) {
+ _isBusy = value;
+ OnPropertyChanged("IsBusy");
+ OnIsBusyChanged();
+ }
+ }
+ }
+
+ bool _isBusy = false;
+
+ protected virtual void OnIsBusyChanged()
+ {
+ // Some models might want to have a validation thet depends on the busy state.
+ Validate();
+ var method = IsBusyChanged;
+ if (method != null)
+ IsBusyChanged(this, EventArgs.Empty);
+ }
+ }
+
+ public class DelegateCommand : ICommand
+ {
+ readonly Predicate<object> _canExecute;
+ readonly Action<object> _execute;
+
+ public event EventHandler CanExecuteChanged;
+
+ public DelegateCommand(Action<object> execute)
+ : this(execute, null)
+ {
+ }
+
+ public DelegateCommand(Action<object> execute, Predicate<object> canExecute)
+ {
+ _execute = execute;
+ _canExecute = canExecute;
+ }
+
+ public bool CanExecute(object parameter)
+ {
+ if (_canExecute == null) {
+ return true;
+ }
+
+ return _canExecute(parameter);
+ }
+
+ public void Execute(object parameter)
+ {
+ _execute(parameter);
+ }
+
+ public void RaiseCanExecuteChanged()
+ {
+ var handler = CanExecuteChanged;
+ if (handler != null) {
+ handler(this, EventArgs.Empty);
+ }
+ }
+ }
+
+ [Preserve (AllMembers = true)]
+ public class ExampleViewModel : ViewModelBase
+ {
+ [Preserve (AllMembers = true)]
+ public class Job : ViewModelBase
+ {
+
+ public string JobId
+ {
+ get { return GetProperty<string>(); }
+ set { SetProperty(value); }
+ }
+
+ public string JobName
+ {
+ get { return GetProperty<string>(); }
+ set { SetProperty(value); }
+ }
+
+ public double? Hours
+ {
+ get { return GetProperty<double?>(); }
+ set { SetProperty(value); }
+ }
+
+ public bool Locked
+ {
+ get { return GetProperty<bool>(); }
+ set { SetProperty(value); }
+ }
+ }
+
+ public ExampleViewModel()
+ {
+
+ Jobs = new ObservableCollection<Job>()
+ {
+ new Job() { JobId = "3672", JobName = "Big Job", Hours = 2},
+ new Job() { JobId = "6289", JobName = "Smaller Job", Hours = 2},
+ new Job() { JobId = "3672-41", JobName = "Add On Job", Hours = 23},
+ };
+ }
+
+ public ObservableCollection<Job> Jobs { get; set; }
+
+
+ public ICommand AddOneCommand
+ {
+ get
+ {
+ if (_addOneCommand == null) {
+ _addOneCommand = new DelegateCommand(obj => {
+ Jobs.Add(new Job(){JobId = "1234", JobName = "add one", Hours = 12});
+ }, obj => !IsBusy);
+ }
+ return _addOneCommand;
+ }
+ }
+
+ ICommand _addOneCommand;
+
+ public ICommand AddTwoCommand
+ {
+ get
+ {
+ if (_addTwoCommand == null) {
+ _addTwoCommand = new DelegateCommand(obj => {
+ Jobs.Add(new Job() { JobId = "9999", JobName = "add two", Hours = 12 });
+ Jobs.Add(new Job() { JobId = "8888", JobName = "add two", Hours = 12 });
+ }, obj => !IsBusy);
+ }
+ return _addTwoCommand;
+ }
+ }
+
+ ICommand _addTwoCommand;
+
+ public void GetHours()
+ {
+
+ var results = new ObservableCollection<Job>()
+ {
+ new Job() { JobId = "3672", JobName = "RADO", Hours = 2},
+ new Job() { JobId = "6289", JobName = "MGA Life Cycle Flexible Test System", Hours = 2},
+
+ };
+
+ foreach (var x in results)
+ Jobs.Add(x);
+
+ }
+ }
+
+ public class DoubleStringConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
+ {
+ if (null == value || "0" == value.ToString())
+ return string.Empty;
+ return value.ToString();
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
+ {
+ double? returnValue = null;
+ double convertResult;
+ var strvalue = value as string;
+ if (double.TryParse(strvalue, out convertResult))
+ {
+ returnValue = convertResult;
+ }
+ return returnValue;
+ }
+ }
+
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.None, 0, "Adding Multiple Items to a ListView", PlatformAffected.All)]
+ public class AddingMultipleItemsListView : TestContentPage
+ {
+ protected override void Init ()
+ {
+ Title = "Hours";
+ var exampleViewModel = new ExampleViewModel();
+ BindingContext = exampleViewModel;
+
+ var listView = new ListView
+ {
+ ItemTemplate = new DataTemplate(typeof(CustomViewCell)),
+ HeightRequest = 400,
+ VerticalOptions = LayoutOptions.Start
+ };
+
+ listView.SetBinding(ListView.ItemsSourceProperty, new Binding("Jobs", BindingMode.TwoWay));
+
+ var addOneJobButton = new Button
+ {
+ Text = "Add One"
+ };
+ addOneJobButton.SetBinding(Button.CommandProperty, new Binding("AddOneCommand"));
+
+ var addTwoJobsButton = new Button
+ {
+ Text = "Add Two"
+ };
+ addTwoJobsButton.SetBinding(Button.CommandProperty, new Binding("AddTwoCommand"));
+
+ var layout = new StackLayout
+ {
+ Orientation = StackOrientation.Vertical,
+ VerticalOptions = LayoutOptions.StartAndExpand,
+ Spacing = 15,
+ Children = {
+ listView,
+ addOneJobButton,
+ addTwoJobsButton
+ }
+ };
+ Content = layout;
+ }
+
+ [Preserve (AllMembers = true)]
+ public class CustomViewCell : ViewCell
+ {
+ public CustomViewCell ()
+ {
+ var jobId = new Label {
+ Font = Font.SystemFontOfSize(20),
+ WidthRequest = 105,
+ VerticalOptions = LayoutOptions.Center,
+
+ HorizontalOptions = LayoutOptions.StartAndExpand
+ };
+ jobId.SetBinding(Label.TextProperty, "JobId");
+
+ var jobName = new Label {
+ VerticalOptions = LayoutOptions.Center,
+ WidthRequest = 175,
+ HorizontalOptions = LayoutOptions.CenterAndExpand,
+ };
+ jobName.SetBinding(Label.TextProperty, "JobName");
+
+ var hours = new Label {
+ WidthRequest = 45,
+ VerticalOptions = LayoutOptions.Center,
+ XAlign = TextAlignment.End,
+ HorizontalOptions = LayoutOptions.EndAndExpand,
+
+ };
+ hours.SetBinding(Label.TextProperty, new Binding("Hours", BindingMode.OneWay, new DoubleStringConverter()));
+
+ var hlayout = new StackLayout {
+ Children = {
+ jobId,
+ jobName,
+ hours
+ },
+ Orientation = StackOrientation.Horizontal,
+ };
+
+ View = hlayout;
+ }
+ }
+
+#if UITEST
+ [Test]
+ public void AddingMultipleListViewTests1AllElementsPresent ()
+ {
+ RunningApp.WaitForElement (q => q.Marked ("Big Job"));
+ RunningApp.WaitForElement (q => q.Marked ("Smaller Job"));
+ RunningApp.WaitForElement (q => q.Marked ("Add On Job"));
+ RunningApp.WaitForElement (q => q.Marked ("Add One"));
+ RunningApp.WaitForElement (q => q.Marked ("Add Two"));
+ RunningApp.WaitForElement (q => q.Marked ("3672"));
+ RunningApp.WaitForElement (q => q.Marked ("6289"));
+ RunningApp.WaitForElement (q => q.Marked ("3672-41"));
+ RunningApp.WaitForElement (q => q.Marked ("2"));
+ RunningApp.WaitForElement (q => q.Marked ("2"));
+ RunningApp.WaitForElement (q => q.Marked ("23"));
+
+ RunningApp.Screenshot ("All elements are present");
+ }
+
+ [Test]
+ public void AddingMultipleListViewTests2AddOneElementToList ()
+ {
+ RunningApp.Tap (q => q.Marked ("Add One"));
+
+ RunningApp.WaitForElement (q => q.Marked ("1234"), timeout: TimeSpan.FromSeconds (2));
+ RunningApp.Screenshot ("One more element exists");
+ }
+
+ [Test]
+ public void AddingMultipleListViewTests3AddTwoElementToList ()
+ {
+ RunningApp.Screenshot ("Click 'Add Two'");
+ RunningApp.Tap (q => q.Marked ("Add Two"));
+
+ RunningApp.WaitForElement (q => q.Marked ("9999"), timeout: TimeSpan.FromSeconds (2));
+ RunningApp.WaitForElement (q => q.Marked ("8888"), timeout: TimeSpan.FromSeconds (2));
+ RunningApp.Screenshot ("Two more element exist");
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/AppBarIconColors.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/AppBarIconColors.cs
new file mode 100644
index 00000000..fffe5ecf
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/AppBarIconColors.cs
@@ -0,0 +1,52 @@
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve(AllMembers = true)]
+ [Issue(IssueTracker.None, 0, "[UWP] Modal NavigationPage ignores BarTextColor settings for icons", PlatformAffected.WinRT)]
+ public class AppBarIconColors : TestNavigationPage
+ {
+ protected override void Init()
+ {
+ var firstPage = new ContentPage() { Title = "Page One" };
+
+ var button = new Button { Text = "Push Modal Page" };
+
+ firstPage.Content = new StackLayout { Children = { new Label { Text = "Click the 'push modal page' button" }, button } };
+
+ var otherButton = new Button() { Text = "back" };
+ otherButton.Clicked += (sender, args) => Navigation.PopModalAsync();
+
+ var page = new ContentPage {
+ Title = "Page Two",
+ Content =
+ new StackLayout {
+ Children = {
+ new Label {
+ Text =
+ "This is a modal page. The 'X' icon, the 'Done' label below it, and the '...' in the toolbar should all be white on UWP. If any of them are not white, this test has failed."
+ },
+ otherButton
+ }
+ }
+ };
+ page.ToolbarItems.Add(new ToolbarItem("Done", "toolbar_close.png", () => { Navigation.PopModalAsync(); }));
+
+ button.Clicked += (sender, args) => Navigation.PushModalAsync(new NavigationPageWithAppBarColors(page));
+
+ PushAsync(new NavigationPageWithAppBarColors(firstPage));
+ }
+ }
+
+ [Preserve(AllMembers = true)]
+ public class NavigationPageWithAppBarColors : NavigationPage
+ {
+ public NavigationPageWithAppBarColors(Page root) : base(root)
+ {
+ BarBackgroundColor = Color.Purple;
+ BarTextColor = Color.White;
+ Title = root.Title;
+ Icon = root.Icon;
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla21368.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla21368.cs
new file mode 100644
index 00000000..88d9d2ac
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla21368.cs
@@ -0,0 +1,90 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls.TestCasesPages
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Bugzilla, 21368, "Button text alignment breaks if the buttons are in a stack layout inside another layout and the button is clicked", PlatformAffected.Android)]
+ public class Bugzilla21368 : ContentPage
+ {
+ ScrollView _scrollView;
+ StackLayout _buttonsStack;
+ Grid _buttonsGrid;
+
+ public Bugzilla21368 ()
+ {
+ _scrollView = new ScrollView {
+ Orientation = ScrollOrientation.Horizontal,
+ Content = new StackLayout {
+ Orientation = StackOrientation.Horizontal
+ },
+ HeightRequest = 100
+ };
+
+ _buttonsGrid = new Grid {
+ RowSpacing = 10
+ };
+
+ _buttonsGrid.Children.Add (_scrollView, 0, 0);
+ _buttonsGrid.Children.Add (new Button {
+ Text = "Add Control",
+ Command = new Command (OnAddControl),
+ WidthRequest=400
+ }, 0, 1);
+ _buttonsGrid.Children.Add (new Button {
+ Text = "Insert Control",
+ Command = new Command (OnInsertControl)
+ }, 0, 2);
+ _buttonsGrid.Children.Add (new Button {
+ Text = "Remove Control",
+ Command = new Command (OnRemoveControl)
+ }, 0, 3);
+ _buttonsStack = new StackLayout { Children = { _buttonsGrid } };
+
+ Content = new StackLayout {
+ Orientation = StackOrientation.Vertical,
+ Children =
+ {
+ _buttonsStack
+ }
+ };
+ }
+
+ StackLayout ScrollStackLayout
+ {
+ get { return (StackLayout) _scrollView.Content; }
+ }
+
+ void OnAddControl ()
+ {
+ ScrollStackLayout.Children.Add (new Button { Text = "hello" });
+ ForceRelayout ();
+ }
+
+ void OnInsertControl ()
+ {
+ ScrollStackLayout.Children.Insert (0, new Button {
+ Text = "hello"
+ });
+ ForceRelayout ();
+ }
+
+ void OnRemoveControl ()
+ {
+ if (ScrollStackLayout.Children.Count > 0) {
+ ScrollStackLayout.Children.RemoveAt (0);
+ ForceRelayout ();
+ }
+ }
+
+ void ForceRelayout ()
+ {
+ ScrollStackLayout.ForceLayout ();
+ _scrollView.ForceLayout ();
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla21501.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla21501.cs
new file mode 100644
index 00000000..a9b896a5
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla21501.cs
@@ -0,0 +1,47 @@
+using System;
+using Xamarin.Forms.CustomAttributes;
+using System.Collections.Generic;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Bugzilla, 21501, "ListView: Button in ItemTemplate breaks SelectedItem",PlatformAffected.Android)]
+ public class Bugzilla21501 : ContentPage
+ {
+ public Bugzilla21501 ()
+ {
+ var stringList = new List<string> () { "abc", "xyz", "todo" };
+
+ var resultLabel = new Label () { Text = "A" };
+
+ var listView = new ListView ();
+ listView.ItemsSource = stringList;
+ listView.ItemTemplate = new DataTemplate (() => {
+ var label = new Label ();
+ label.SetBinding (Label.TextProperty, ".");
+
+ var button = new Button () { Text = "Test" };
+
+ return new ViewCell {
+ View = new StackLayout {
+ Padding = new Thickness (0, 5),
+ Orientation = StackOrientation.Horizontal,
+ Children = { label, button }
+ }
+ };
+ });
+
+ listView.ItemSelected += (sender, args) => {
+ resultLabel.Text = resultLabel.Text + "!";
+ };
+
+ var layout = new StackLayout () {
+ Orientation = StackOrientation.Vertical,
+ Children = { listView, resultLabel }
+ };
+
+ Content = layout;
+ }
+ }
+}
+
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla21780.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla21780.cs
new file mode 100644
index 00000000..70283c45
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla21780.cs
@@ -0,0 +1,19 @@
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Bugzilla, 21780, "Windows Phone Editor control has black background with black text, background turns to white when editing", PlatformAffected.WinPhone)]
+ public class Bugzilla21780 : ContentPage
+ {
+ public Bugzilla21780 ()
+ {
+ var label = new Label () { Text = "If text is visible in the editor below, this test has passed." };
+ var editor = new Editor () { Text = "This text should be visible even if the editor does not have focus" };
+
+ Content = new StackLayout() {
+ Children = { label, editor }
+ };
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla22229.xaml b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla22229.xaml
new file mode 100644
index 00000000..1f4c96d4
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla22229.xaml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+ x:Class="Xamarin.Forms.Controls.Bugzilla22229" CurrentPageChanged="OnCurrentPageChanged" Title="Test Page">
+ <TabbedPage.Children>
+ <ContentPage Title="Tab 1"/>
+ <ContentPage Title="Tab 2"/>
+ <ContentPage Title="Tab 3"/>
+ <ContentPage Title="Tab 4"/>
+ <ContentPage Title="Tab 5"/>
+ </TabbedPage.Children>
+</TabbedPage> \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla22229.xaml.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla22229.xaml.cs
new file mode 100644
index 00000000..10b6e8ad
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla22229.xaml.cs
@@ -0,0 +1,51 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+#if APP
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 22229, "ToolbarItems not clearing", PlatformAffected.iOS | PlatformAffected.WinPhone, NavigationBehavior.PushAsync)]
+ public partial class Bugzilla22229 : TabbedPage
+ {
+ string _prefix;
+
+ public Bugzilla22229()
+ {
+ InitializeComponent();
+ _prefix = Device.OnPlatform(
+ iOS: "Images/",
+ Android: "",
+ WinPhone: "Assets/"
+ );
+ InitializeActionBar();
+ }
+
+
+ public void OnCurrentPageChanged(object sender, EventArgs e)
+ {
+ InitializeActionBar();
+ }
+
+ void InitializeActionBar()
+ {
+ ToolbarItems.Clear();
+ if (CurrentPage == Children[0])
+ {
+ ToolbarItems.Add(new ToolbarItem("Action 1", null, () => { }, ToolbarItemOrder.Primary, 1));
+ ToolbarItems.Add(new ToolbarItem("Action 2", null, () => { }, ToolbarItemOrder.Primary, 2));
+
+ ToolbarItems.Add(new ToolbarItem("Action 3", null, () => { }, ToolbarItemOrder.Secondary, 3));
+ ToolbarItems.Add(new ToolbarItem("Action 4", null, () => { }, ToolbarItemOrder.Secondary, 4));
+ ToolbarItems.Add(new ToolbarItem("Action 5", null, () => { }, ToolbarItemOrder.Secondary, 5));
+ }
+
+ }
+ }
+#endif
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla22401.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla22401.cs
new file mode 100644
index 00000000..c19b3c92
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla22401.cs
@@ -0,0 +1,114 @@
+using System.Collections.Generic;
+using System.Linq;
+
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls.TestCasesPages
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Bugzilla, 22401, "MasterDetailPage detail width broken when landscape", PlatformAffected.iOS, NavigationBehavior.PushAsync)]
+ public class Bugzilla22401 : MasterDetailPage
+ {
+ public Bugzilla22401()
+ {
+ List<Person> people = GetDemoData ();
+
+ // Create the ListView.
+ var listView = new ListView {
+ // Source of data items.
+ ItemsSource = people,
+
+ // Define template for displaying each item.
+ // (Argument of DataTemplate constructor is called for
+ // each item; it must return a Cell derivative.)
+ ItemTemplate = new DataTemplate (() => {
+ // Create views with bindings for displaying each property.
+ Label nameLabel = new Label();
+ nameLabel.SetBinding (Label.TextProperty, "Name");
+
+ // Return an assembled ViewCell.
+ return new ViewCell {
+ View = new StackLayout {
+ Padding = new Thickness(0, 5),
+ Orientation = StackOrientation.Horizontal,
+ Children = {
+ new StackLayout {
+ VerticalOptions = LayoutOptions.Center,
+ Spacing = 0,
+ Children = {
+ nameLabel
+ }
+ }
+ }
+ }
+ };
+ })
+ };
+
+ Master = new ContentPage { Title = "master", Icon = "menuIcon.png", Content = listView };
+
+ listView.ItemSelected += (sender, e) => {
+ Detail = CreateDetailPage (string.Format("Page {0}", (e.SelectedItem as Person).Name));
+ IsPresented = false;
+ };
+ listView.SelectedItem = people.First ();
+ }
+
+ static List<Person> GetDemoData()
+ {
+ List<Person> people = new List<Person> {
+ new Person("Abigail"),
+ new Person("Bob"),
+ new Person("Cathy"),
+ new Person("David"),
+ new Person("Eugenie"),
+ new Person("Freddie"),
+ new Person("Greta"),
+ new Person("Harold"),
+ new Person("Irene"),
+ new Person("Jonathan"),
+ new Person("Kathy"),
+ new Person("Larry"),
+ new Person("Monica"),
+ new Person("Nick"),
+ new Person("Olive"),
+ new Person("Pendletonlow"),
+ new Person("Queenie"),
+ new Person("Rob"),
+ new Person("Sally"),
+ new Person("Timothy"),
+ new Person("Uma"),
+ new Person("Victor"),
+ new Person("Wendy"),
+ new Person("Xavier"),
+ new Person("Yvonne"),
+ new Person("Zachary"),
+ };
+ return people;
+ }
+
+ static Page CreateDetailPage(string text)
+ {
+ var page = new ContentPage {
+ Title = text,
+ Content = new StackLayout {
+ Children = {
+ new Label {
+ Text = text,
+ VerticalOptions = LayoutOptions.CenterAndExpand,
+ HorizontalOptions = LayoutOptions.CenterAndExpand,
+ }
+ }
+ }
+ };
+
+ var tbiBank = new ToolbarItem { Command = new Command (() => { }), Icon = "bank.png" };
+ var tbiCalc = new ToolbarItem { Command = new Command (() => { }), Icon = "calculator.png" };
+
+ page.ToolbarItems.Add (tbiBank);
+ page.ToolbarItems.Add (tbiCalc);
+
+ return new NavigationPage (page);
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla24574.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla24574.cs
new file mode 100644
index 00000000..b6d3c508
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla24574.cs
@@ -0,0 +1,50 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 24574, "Tap Double Tap")]
+ public class Issue24574 : TestContentPage // or TestMasterDetailPage, etc ...
+ {
+ protected override void Init ()
+ {
+ var label = new Label {
+ AutomationId = "TapLabel",
+ Text = "123"
+ };
+
+ var rec = new TapGestureRecognizer () { NumberOfTapsRequired = 1 };
+ rec.Tapped += (s, e) => { label.Text = "Single"; };
+ label.GestureRecognizers.Add (rec);
+
+ rec = new TapGestureRecognizer () { NumberOfTapsRequired = 2 };
+ rec.Tapped += (s, e) => { label.Text = "Double"; };
+ label.GestureRecognizers.Add (rec);
+
+ Content = label;
+ }
+
+#if UITEST
+ [Test]
+ public void Issue1Test ()
+ {
+ RunningApp.Screenshot ("I am at Issue 24574");
+
+ RunningApp.WaitForElement (q => q.Marked ("TapLabel"));
+
+ RunningApp.Tap (q => q.Marked ("TapLabel"));
+ RunningApp.WaitForElement (q => q.Marked ("Single"));
+
+ RunningApp.DoubleTap (q => q.Marked ("TapLabel"));
+ RunningApp.WaitForElement (q => q.Marked ("Double"));
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla24769.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla24769.cs
new file mode 100644
index 00000000..699887bf
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla24769.cs
@@ -0,0 +1,80 @@
+using System.Collections.Generic;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 24769, "Layout cycle when Progress Bar is in a ListView", PlatformAffected.WinPhone | PlatformAffected.WinRT)]
+ public class Bugzilla24769 : TestContentPage
+ {
+ protected override void Init ()
+ {
+ var instructions = new Label () {
+ Text = @"Click the button labeled 'Progress++' three times. Each time, all four ProgressBar controls should increment. If they do not increment, the test has failed."
+ };
+
+ var items = new List<ListItem> {
+ new ListItem { Name = "Item1" },
+ new ListItem { Name = "Item2" },
+ new ListItem { Name = "Item3" }
+ };
+
+ var btn = new Button {
+ Text = "Progress++"
+ };
+
+ var progressBar = new ProgressBar { Progress = 0.1 };
+
+ btn.Clicked += (sender, arg) => {
+ MessagingCenter.Send (this, "set_progress");
+ progressBar.Progress += 0.1;
+ };
+
+ var list = new ListView {
+ ItemsSource = items,
+ ItemTemplate = new DataTemplate (typeof(ListCell))
+ };
+
+ BackgroundColor = Color.Maroon;
+
+ Content = new StackLayout {
+ VerticalOptions = LayoutOptions.Fill,
+ HorizontalOptions = LayoutOptions.Fill,
+ Children = {
+ instructions,
+ btn,
+ progressBar,
+ list
+ }
+ };
+ }
+ }
+
+ internal class ListCell : ViewCell
+ {
+ public ListCell ()
+ {
+ var label = new Label ();
+ label.SetBinding (Label.TextProperty, "Name");
+
+ var progress = new ProgressBar { Progress = 0.1 };
+
+ MessagingCenter.Subscribe<Bugzilla24769> (this, "set_progress", sender => { progress.Progress += 0.1; });
+
+ View =
+ new StackLayout {
+ HorizontalOptions = LayoutOptions.Fill,
+ BackgroundColor = Color.Gray,
+ Children = {
+ label,
+ progress
+ }
+ };
+ }
+ }
+
+ internal class ListItem
+ {
+ public string Name { get; set; }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla25662.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla25662.cs
new file mode 100644
index 00000000..6a34cdf7
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla25662.cs
@@ -0,0 +1,35 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls.Issues
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 25662, "Setting IsEnabled does not disable SwitchCell")]
+ public class Bugzilla25662 : ContentPage
+ {
+ class MySwitch : SwitchCell
+ {
+ public MySwitch ()
+ {
+ IsEnabled = false;
+ }
+ }
+
+
+ public Bugzilla25662 ()
+ {
+ var list = new ListView {
+ ItemsSource = new[] {
+ "One", "Two", "Three"
+ },
+ ItemTemplate = new DataTemplate (typeof (MySwitch))
+ };
+
+ Content = list;
+ Title = "My page";
+
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla25979.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla25979.cs
new file mode 100644
index 00000000..277ac684
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla25979.cs
@@ -0,0 +1,133 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 25979, "https://bugzilla.xamarin.com/show_bug.cgi?id=25979")]
+ public class Bugzilla25979 : TestNavigationPage // or TestMasterDetailPage, etc ...
+ {
+ [Preserve (AllMembers = true)]
+ internal sealed class MyPage : ContentPage
+ {
+ public MyPage()
+ {
+ Title = "Page 1";
+ AutomationId = "PageOneId";
+
+ var b = new Button {
+ AutomationId = "PageOneButtonId",
+ Text = "Next"
+ };
+ b.Clicked += async (sender, e) => {
+ await Navigation.PushAsync (new MyPage2());
+ };
+
+ Content = new StackLayout {
+ BackgroundColor = Color.Red,
+ Children = {
+ new Label { Text = "Page 1", FontSize=Device.GetNamedSize(NamedSize.Large, typeof(Label)) },
+ b
+ }
+ };
+ }
+ }
+
+ [Preserve (AllMembers = true)]
+ internal sealed class MyPage2 : ContentPage
+ {
+ public MyPage2()
+ {
+ Title = "Page 2";
+ AutomationId = "PageTwoId";
+
+ var b = new Button {
+ AutomationId = "PageTwoButtonId",
+ Text = "Next"
+ };
+ b.Clicked += async (sender, e) => {
+ await Navigation.PushAsync (new MyPage3());
+ Navigation.NavigationStack[0].BindingContext = null;
+ Navigation.RemovePage(Navigation.NavigationStack[0]);
+ };
+
+ Content = new StackLayout {
+ BackgroundColor = Color.Red,
+ Children = {
+ new Label { Text = "Page 2", FontSize=Device.GetNamedSize(NamedSize.Large, typeof(Label)) },
+ b
+ }
+ };
+ }
+
+ protected override void OnAppearing ()
+ {
+ base.OnAppearing();
+ Navigation.NavigationStack[0].BindingContext = null;
+ Navigation.RemovePage(Navigation.NavigationStack[0]);
+ }
+ }
+
+ [Preserve (AllMembers = true)]
+ internal sealed class MyPage3 : ContentPage
+ {
+ public MyPage3 ()
+ {
+ AutomationId = "PageThreeId";
+ Title = "PageThreeId";
+
+ var label = new Label { Text = "Page 3" };
+
+ Content = new StackLayout {
+ Children = {
+ label,
+ new Button {
+ AutomationId = "PopButton",
+ Text = "Try to Pop",
+ Command = new Command(
+ async() => {
+ await Navigation.PopAsync();
+ label.Text = "PopAttempted";
+ }
+ )}
+ }
+ };
+ }
+ }
+
+ protected override void Init ()
+ {
+ // Initialize ui here instead of ctor
+ Navigation.PushAsync (new MyPage () { Title="Navigation Stack" });
+ }
+
+#if UITEST
+ [Test]
+ public void Bugzilla25979Test ()
+ {
+ RunningApp.WaitForElement (q => q.Marked ("PageOneId"));
+ RunningApp.Screenshot ("At page one");
+ RunningApp.WaitForElement (q => q.Marked ("PageOneButtonId"));
+ RunningApp.Tap (q => q.Marked ("PageOneButtonId"));
+
+ RunningApp.WaitForElement (q => q.Marked ("PageTwoId"));
+ RunningApp.Screenshot ("At page two - I didn't crash");
+ RunningApp.WaitForElement (q => q.Marked ("PageTwoButtonId"));
+ RunningApp.Tap (q => q.Marked ("PageTwoButtonId"));
+
+ RunningApp.WaitForElement (q => q.Marked ("PageThreeId"));
+ RunningApp.Screenshot ("At page three - I didn't crash");
+
+ RunningApp.WaitForElement (q => q.Marked ("PopButton"));
+ RunningApp.Tap (q => q.Marked ("PopButton"));
+ RunningApp.WaitForElement (q => q.Marked ("PopAttempted"));
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla26032.xaml b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla26032.xaml
new file mode 100644
index 00000000..748942a5
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla26032.xaml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<local:TestContentPage xmlns="http://xamarin.com/schemas/2014/forms"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+ xmlns:local="clr-namespace:Xamarin.Forms.Controls"
+ x:Class="Xamarin.Forms.Controls.Bugzilla26032">
+ <RelativeLayout>
+ <ListView x:Name="List1"
+ RelativeLayout.XConstraint="{ConstraintExpression Type=Constant, Constant=0}"
+ RelativeLayout.YConstraint="{ConstraintExpression Type=Constant, Constant=0}"
+ RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.5}"
+ RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.7}"
+
+ ItemTapped="OnItemTapped"
+ ItemSelected="OnItemSelected"
+ >
+ <ListView.ItemTemplate>
+ <DataTemplate>
+ <TextCell Text="{Binding}" />
+ </DataTemplate>
+ </ListView.ItemTemplate>
+ </ListView>
+
+ <ListView x:Name="List2"
+ RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.5}"
+ RelativeLayout.YConstraint="{ConstraintExpression Type=Constant, Constant=0}"
+ RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.5}"
+ RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.7}"
+
+ ItemTapped="OnItemTapped"
+ ItemSelected="OnItemSelected"
+ >
+ <ListView.ItemTemplate>
+ <DataTemplate>
+ <TextCell Text="{Binding}">
+ <TextCell.ContextActions>
+ <MenuItem Text="Delete" IsDestructive="True" />
+ </TextCell.ContextActions>
+ </TextCell>
+ </DataTemplate>
+ </ListView.ItemTemplate>
+ </ListView>
+
+ <ScrollView
+ RelativeLayout.XConstraint="{ConstraintExpression Type=Constant, Constant=0}"
+ RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.7}"
+ RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width}"
+ RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.3}">
+ <Label x:Name="Log" />
+ </ScrollView>
+ </RelativeLayout>
+</local:TestContentPage> \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla26032.xaml.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla26032.xaml.cs
new file mode 100644
index 00000000..e45e6bb3
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla26032.xaml.cs
@@ -0,0 +1,75 @@
+using System;
+using System.Collections.Generic;
+
+using Xamarin.Forms;
+using Xamarin.Forms.CustomAttributes;
+
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 26032, " ListView ItemTapped doesn't get called for the selected item ", PlatformAffected.iOS)]
+ public partial class Bugzilla26032 : TestContentPage
+ {
+ #if APP
+ public Bugzilla26032 ()
+ {
+
+ InitializeComponent ();
+ var data = new[] { "1", "2", "3", "4", "5" };
+ var dataContext = new[] { "1 Context", "2 Context", "3 Context", "4 Context", "5 Context" };
+ List1.ItemsSource = data;
+ List2.ItemsSource = dataContext;
+ }
+
+
+ public void OnItemTapped(object sender, ItemTappedEventArgs e)
+ {
+ Log.Text = string.Format("Item '{0}' tapped\n{1}", e.Item, Log.Text);
+ }
+
+ public void OnItemSelected(object sender, SelectedItemChangedEventArgs e)
+ {
+ Log.Text = string.Format("Item '{0}' selected\n{1}", e.SelectedItem, Log.Text);
+ }
+
+ #endif
+
+ protected override void Init ()
+ {
+ }
+
+
+ #if UITEST
+ [Test]
+ public void SelectedItemTap ()
+ {
+ var id = "1";
+ var idContext = "1 Context";
+ var initalLog = "Item '{0}' tapped\nItem '{0}' selected\n";
+
+ var forId1 = string.Format (initalLog, id);
+ RunningApp.WaitForElement (q => q.Marked (id));
+ RunningApp.Tap (q => q.Marked (id));
+ RunningApp.WaitForElement (q => q.Text (forId1));
+ RunningApp.Tap (q => q.Marked (id));
+ forId1 = string.Format ( "Item '{0}' tapped\n" + initalLog, id);
+ RunningApp.WaitForElement (q => q.Text (forId1));
+
+ var forIdContext = string.Format (initalLog, idContext);
+ RunningApp.WaitForElement (q => q.Marked (idContext));
+ RunningApp.Tap (q => q.Marked (idContext));
+ RunningApp.WaitForElement (q => q.Text (forIdContext + forId1));
+ RunningApp.Tap (q => q.Marked (idContext));
+ forIdContext = string.Format ( "Item '{0}' tapped\n" + initalLog, idContext);
+ RunningApp.WaitForElement (q => q.Text (forIdContext + forId1));
+ }
+ #endif
+ }
+}
+
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla26171.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla26171.cs
new file mode 100644
index 00000000..6ad49179
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla26171.cs
@@ -0,0 +1,98 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+using Xamarin.Forms.Maps;
+using System.Threading.Tasks;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 26171, "Xamarin.Forms.Maps is not updating VisibleRegion property when layout is changed")]
+ public class Bugzilla26171 : TestContentPage // or TestMasterDetailPage, etc ...
+ {
+ protected override void Init ()
+ {
+ var map = MakeMap ();
+
+ var label = new Label { AutomationId = "lblValue" };
+
+ var buttonLayout = new Button { Text = "Change layout" };
+ buttonLayout.Clicked += async (a, e) => {
+ map.VerticalOptions = LayoutOptions.Start;
+ await Print (map,label);
+ };
+
+ var stack = new StackLayout {
+ Spacing = 0,
+ Padding = new Thickness (30, 0)
+ };
+
+ stack.Children.Add (label);
+ stack.Children.Add (map);
+ stack.Children.Add (buttonLayout);
+
+ Content = new ScrollView { Content = stack };
+
+ Appearing += async (sender, e) => await Print (map, label);
+
+ }
+
+ static async Task Print (Map map, Label label)
+ {
+ await Task.Delay(500);
+ if (map.VisibleRegion != null) {
+ label.Text = map.VisibleRegion.Radius.Kilometers.ToString ();
+ }
+ }
+
+ public static Map MakeMap ()
+ {
+ Pin colosseum = null;
+ Pin pantheon = null;
+ Pin chapel = null;
+
+ var map = new Map {
+ IsShowingUser = false,
+ VerticalOptions = LayoutOptions.FillAndExpand,
+ HeightRequest = 100,
+ Pins = {
+ (colosseum = new Pin {
+ Type = PinType.Place,
+ Position = new Position (41.890202, 12.492049),
+ Label = "Colosseum",
+ Address = "Piazza del Colosseo, 00184 Rome, Province of Rome, Italy"
+ }),
+ (pantheon = new Pin {
+ Type = PinType.Place,
+ Position = new Position (41.898652, 12.476831),
+ Label = "Pantheon",
+ Address = "Piazza della Rotunda, 00186 Rome, Province of Rome, Italy"
+ }),
+ (chapel = new Pin {
+ Type = PinType.Place,
+ Position = new Position (41.903209, 12.454545),
+ Label = "Sistine Chapel",
+ Address = "Piazza della Rotunda, 00186 Rome, Province of Rome, Italy"
+ })
+ }
+ };
+
+ return map;
+ }
+
+#if UITEST
+ [Test]
+ public void Bugzilla26171Test ()
+ {
+ RunningApp.WaitForElement (q => q.Marked ("lblValue"));
+ var value = RunningApp.Query (q => q.Marked ("lblValue")) [0].Text;
+ RunningApp.Screenshot ("I see the Label");
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla26233.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla26233.cs
new file mode 100644
index 00000000..0a9f3fdc
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla26233.cs
@@ -0,0 +1,56 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 26233, "Windows phone crashing when going back to page containing listview with Frame inside ViewCell")]
+ public class Bugzilla26233 : TestContentPage
+ {
+ protected override void Init ()
+ {
+ var listview = new ListView ();
+ listview.ItemTemplate = new DataTemplate (typeof (ItemTemplate));
+ listview.ItemsSource = new string[] { "item", "item", "item", "item", "item" };
+ var btnBack = new Button { Text = "back", Command = new Command (() => Navigation.PopAsync ()) };
+ listview.ItemSelected += (s, e) => Navigation.PushAsync (new ContentPage { Content = btnBack });
+ var btnPush = new Button {
+ Text = "Next",
+ AutomationId = "btnPush",
+ Command = new Command (() => Navigation.PushAsync (new ContentPage { Content = btnBack }))
+ };
+
+ Content = new StackLayout { Children = { btnPush, listview } };
+ }
+
+ [Preserve (AllMembers = true)]
+ internal class ItemTemplate : ViewCell
+ {
+ public ItemTemplate ()
+ {
+ var frame = new Frame ();
+ frame.Content = new StackLayout { Children = { new Label { Text = "hello 1" } } };
+ View = frame;
+ }
+ }
+
+#if UITEST
+ [Test]
+ public void DoesntCrashOnNavigatingBackToThePage ()
+ {
+ RunningApp.WaitForElement (q => q.Marked ("btnPush"));
+ RunningApp.Tap (q => q.Marked ("btnPush"));
+ RunningApp.WaitForElement (q => q.Marked ("back"));
+ RunningApp.Screenshot ("I see the back button");
+ RunningApp.Tap (q => q.Marked ("back"));
+ RunningApp.WaitForElement (q => q.Marked ("btnPush"));
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla26501.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla26501.cs
new file mode 100644
index 00000000..2ab31f0a
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla26501.cs
@@ -0,0 +1,150 @@
+using System;
+using System.Collections.Generic;
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using NUnit.Framework;
+using Xamarin.UITest;
+#endif
+
+namespace Xamarin.Forms.Controls.TestCasesPages
+{
+ [Preserve (AllMembers = true)]
+ public class FamilyViewModel
+ {
+ public Guid ProfileId { get; set; }
+ public string DisplayName { get; set; }
+ public string ImageFilename { get; set; }
+ public string BonusBalance { get; set; }
+ public string MemberNo { get; set; }
+
+ public FamilyViewModel ()
+ {
+ ProfileId = Guid.Empty;
+ DisplayName = "";
+ BonusBalance = "";
+ MemberNo = "";
+ ImageFilename = "";
+ }
+ }
+
+ [Preserve (AllMembers = true)]
+ public class FamilyCell : ViewCell
+ {
+ public Label FamilyLabel;
+
+ public FamilyCell ()
+ {
+ FamilyLabel = new Label ();
+
+ var l1 = new RelativeLayout ();
+
+ l1.Children.Add (FamilyLabel,
+ Constraint.Constant (50),
+ Constraint.Constant (4),
+ Constraint.RelativeToParent (p => p.Width - 10 - 50 - 85)
+ );
+
+
+ View = l1;
+
+ FamilyLabel.SetBinding (Label.TextProperty, "DisplayName");
+
+ // COMMENT LINE BELOW OUT TO MAKE IT WORK!
+ AddContextActions ();
+ }
+
+ void AddContextActions ()
+ {
+ ContextActions.Add (new MenuItem () {
+ Text = "Delete",
+ IsDestructive = true,
+ Command = new Command (Delete)
+ });
+
+ ContextActions.Add (new MenuItem () {
+ Text = "More",
+ IsDestructive = false,
+ Command = new Command (More)
+ });
+ }
+
+ void Delete ()
+ {
+ }
+
+ void More ()
+ {
+ }
+ }
+
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Bugzilla, 26501, "BindingSource / Context action issue", PlatformAffected.iOS)]
+ public class Bugzilla26501 : TestContentPage
+ {
+ protected override void Init ()
+ {
+ //TODO: Multilanguage
+ Title = "Context Action Bug";
+
+ _familyListView = new ListView () {
+ RowHeight = 50,
+ ItemTemplate = new DataTemplate (typeof (FamilyCell)),
+ HasUnevenRows = true
+ };
+
+ //TODO: Multilanguage
+ ToolbarItems.Add (new ToolbarItem ("Refresh", "", () => {
+ _familyListView.ItemsSource = _demoDataSource2;
+ }));
+
+
+ _familyListView.ItemSelected += (sender, e) => _familyListView.SelectedItem = null;
+
+ Content = _familyListView;
+
+ UpdateData ();
+ }
+
+ readonly FamilyViewModel[] _demoDataSource = new FamilyViewModel[] {
+ new FamilyViewModel {DisplayName = "ZOOMER robothund"},
+ new FamilyViewModel {DisplayName = "FROST sengetøj"},
+ new FamilyViewModel {DisplayName = "BEADOS Quick Dry designstation"},
+ new FamilyViewModel {DisplayName = "Redningsstation i junglen"},
+ };
+
+ readonly FamilyViewModel[] _demoDataSource2 = new FamilyViewModel[] {
+ new FamilyViewModel {DisplayName = "ZOOMER robothund"},
+ new FamilyViewModel {DisplayName = "FROST sengetøj"},
+ new FamilyViewModel {DisplayName = "BEADOS Quick Dry designstation"},
+ new FamilyViewModel {DisplayName = "Redningsstation i junglen"},
+ new FamilyViewModel {DisplayName = "CHAMPIONS LEAGUE 2014/15 boosterpakke"},
+ new FamilyViewModel {DisplayName = "NEW BORN BABY luksusæske med dukke"},
+ new FamilyViewModel {DisplayName = "FURBY Boom Festive Sweater elektronisk plysdyr"},
+ new FamilyViewModel {DisplayName = "LEGO FRIENDS 41007 Heartlake hundesalon"},
+ new FamilyViewModel {DisplayName = "LEGO CITY 4204 Minen"}
+ };
+
+ ListView _familyListView;
+
+ List<FamilyViewModel> _itemSource;
+
+ void UpdateData ()
+ {
+ Device.BeginInvokeOnMainThread (() => _familyListView.ItemsSource = _demoDataSource);
+ }
+
+#if UITEST
+ [Test]
+ public void TestCellsShowAfterRefresh ()
+ {
+ RunningApp.Tap (q => q.Marked ("Refresh"));
+
+ // make sure the refresh has completed
+ System.Threading.Thread.Sleep (1);
+
+ RunningApp.WaitForElement (q => q.Marked ("ZOOMER robothund"));
+ }
+#endif
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla26868.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla26868.cs
new file mode 100644
index 00000000..ca744500
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla26868.cs
@@ -0,0 +1,105 @@
+using System.Collections.Generic;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 26868, "GroupHeaders do not extend on Windows Phone")]
+ public class Bugzilla26868 : TestContentPage
+ {
+ protected override void Init ()
+ {
+ List<GroupedData> groups = new List<GroupedData> ();
+
+ var group1 = new GroupedData { GroupName = "Group #1" };
+ group1.Add (new GroupItem { DisplayText = "Text for ListView item 1.1" });
+ group1.Add (new GroupItem { DisplayText = "Text for ListView item 1.2" });
+ groups.Add (group1);
+
+ var group2 = new GroupedData { GroupName = "Group #2" };
+ group2.Add (new GroupItem { DisplayText = "Text for ListVIew item 2.1" });
+ group2.Add (new GroupItem { DisplayText = "Text for ListView item 2.2" });
+ groups.Add (group2);
+
+ var itemTemplate = new DataTemplate(typeof(GroupItemTemplate));
+ itemTemplate.CreateContent();
+
+ var groupHeaderTemplate = new DataTemplate(typeof(GroupHeaderTemplate));
+ groupHeaderTemplate.CreateContent();
+
+ var listView = new ListView {
+ IsGroupingEnabled = true,
+ GroupDisplayBinding = new Binding ("GroupName"),
+ GroupShortNameBinding = new Binding ("GroupName"),
+ HasUnevenRows = Device.OnPlatform (Android: true, WinPhone: false, iOS: false),
+
+ ItemTemplate = itemTemplate,
+ GroupHeaderTemplate = groupHeaderTemplate,
+
+ ItemsSource = groups
+ };
+
+ Content = new StackLayout {
+ VerticalOptions = LayoutOptions.Center,
+ Children = {
+ new Label {
+ Text = "The group headers below should extend to the width of the screen. If they aren't the width of the screen, this test has failed."
+ },
+ new ContentView {
+ Content = listView,
+ HorizontalOptions = LayoutOptions.FillAndExpand,
+ Padding = 0
+ }
+ }
+ };
+ }
+
+ [Preserve (AllMembers = true)]
+ public class GroupItem
+ {
+ public string DisplayText { get; set; }
+ }
+
+ [Preserve (AllMembers = true)]
+ public class GroupedData : List<GroupItem>
+ {
+ public string GroupName { get; set; }
+ }
+
+ [Preserve (AllMembers=true)]
+ public class GroupItemTemplate : ViewCell
+ {
+ public GroupItemTemplate()
+ {
+ var title = new Label() { FontSize = 14 };
+ title.SetBinding(Label.TextProperty, new Binding("DisplayText", BindingMode.OneWay));
+
+ View = new StackLayout
+ {
+ Orientation = StackOrientation.Horizontal,
+ Padding = new Thickness(8),
+ Children = { title }
+ };
+ }
+ }
+
+ [Preserve(AllMembers = true)]
+ public class GroupHeaderTemplate : ViewCell
+ {
+ public GroupHeaderTemplate()
+ {
+ var title = new Label { TextColor = Color.White, FontSize = 16 };
+ title.SetBinding(Label.TextProperty, new Binding("GroupName", BindingMode.OneWay));
+
+ View = new StackLayout
+ {
+ Padding = new Thickness(8, 0),
+ VerticalOptions = LayoutOptions.StartAndExpand,
+ BackgroundColor = Color.FromHex("#6D91BA"),
+ Orientation = StackOrientation.Horizontal,
+ Children = { title },
+ };
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla26993.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla26993.cs
new file mode 100644
index 00000000..765fbb12
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla26993.cs
@@ -0,0 +1,105 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+using System.Collections.Generic;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 26993, "https://bugzilla.xamarin.com/show_bug.cgi?id=26993")]
+ public class Bugzilla26993 : TestContentPage // or TestMasterDetailPage, etc ...
+ {
+ [Preserve (AllMembers = true)]
+ public class Bz26993ViewCell : ViewCell
+ {
+ static int s_id = 0;
+
+ public Bz26993ViewCell ()
+ {
+ View = new WebView {
+ AutomationId = "AutomationId" + s_id,
+ HeightRequest = 300,
+ Source = new HtmlWebViewSource {
+ Html = "<html><head><link rel=\"stylesheet\" href=\"default.css\"></head><body><h1 id=\"CellID" + s_id + "\">Xamarin.Forms " + s_id + "</h1><p>The CSS and image are loaded from local files!</p><img src='WebImages/XamarinLogo.png'/><p><a id=\"LinkID" + s_id++ + "\" href=\"local.html\">next page</a></p></body></html>"
+ }
+ };
+ }
+ }
+
+ protected override void Init ()
+ {
+ var itemSource = new List<string> {
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ };
+
+ Content = new StackLayout {
+ Children = {
+ new ListView {
+ RowHeight = 300,
+ ItemsSource = itemSource,
+ ItemTemplate = new DataTemplate (typeof(Bz26993ViewCell))
+ }
+ }
+ };
+ }
+
+#if UITEST
+ [Test]
+ public void Bugzilla26993Test ()
+ {
+ RunningApp.Screenshot ("I am at BZ26993");
+
+ RunningApp.WaitForElement (q=>q.WebView(0).Css("#CellID0"));
+ RunningApp.Tap (q=>q.WebView(0).Css("#LinkID0"));
+
+ RunningApp.Screenshot ("Load local HTML");
+
+ RunningApp.WaitForNoElement (q=>q.WebView(0).Css("#LinkID0"));
+ var newElem = RunningApp.Query (q => q.WebView (0).Css ("h1"));
+ Assert.AreEqual ("#LocalHtmlPage", newElem[0].Id);
+
+ RunningApp.Screenshot ("I see the Label");
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla27085.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla27085.cs
new file mode 100644
index 00000000..875d83b5
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla27085.cs
@@ -0,0 +1,36 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Issue (IssueTracker.Bugzilla, 27085, "EntryCell has no possibility to hide keyboard on iOS")]
+ public class Bugzilla27085 : TestContentPage // or TestMasterDetailPage, etc ...
+ {
+ protected override void Init ()
+ {
+ var tableview = new TableView ();
+
+ var section = new TableSection ("Settings");
+ section.Add (new TextCell { Text = "TextCell" });
+ section.Add (new TextCell { Text = "TextCell" });
+ section.Add (new EntryCell { Text = "EntryCell", Keyboard = Keyboard.Numeric });
+ section.Add (new EntryCell { Text = "EntryCell", Keyboard = Keyboard.Numeric });
+ var root = new TableRoot ("Main");
+ root.Add (section);
+
+ tableview.Root = root;
+
+ Content = tableview;
+ }
+
+#if UITEST
+
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla27318.xaml b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla27318.xaml
new file mode 100644
index 00000000..ae1e9ba7
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla27318.xaml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+ x:Class="Xamarin.Forms.Controls.Bugzilla27318">
+ <StackLayout>
+ <ListView x:Name="listView" BackgroundColor="Red">
+ <ListView.ItemTemplate>
+ <DataTemplate>
+ <ViewCell>
+ <StackLayout Spacing="0">
+ <Label Text="Fontsize 30 text"
+ BackgroundColor="Green"
+ FontSize="30" />
+ <Label Text="Small text overwritten"
+ BackgroundColor="Yellow"
+ HorizontalOptions="End" />
+ </StackLayout>
+ </ViewCell>
+ </DataTemplate>
+ </ListView.ItemTemplate>
+ </ListView>
+ </StackLayout>
+</ContentPage> \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla27318.xaml.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla27318.xaml.cs
new file mode 100644
index 00000000..8bd04d09
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla27318.xaml.cs
@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+
+using Xamarin.Forms.CustomAttributes;
+
+using Xamarin.Forms;
+
+namespace Xamarin.Forms.Controls
+{
+#if APP
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 27318, "Labels overlapping", PlatformAffected.Android, NavigationBehavior.PushAsync)]
+ public partial class Bugzilla27318 : ContentPage
+ {
+ public Bugzilla27318 ()
+ {
+ InitializeComponent ();
+ listView.ItemsSource = new [] { "Foo", "Bar", "Baz" };
+ }
+ }
+#endif
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla27350.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla27350.cs
new file mode 100644
index 00000000..e4899358
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla27350.cs
@@ -0,0 +1,151 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+using System.ComponentModel;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Threading.Tasks;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 27350, "Binding throws Null Pointer Exception when Updating Tab")]
+ public class Bugzilla27350 : TestContentPage // or TestMasterDetailPage, etc ...
+ {
+ protected override void Init ()
+ {
+ var btn = new Button { Text = "next main" };
+ btn.Clicked += async (object sender, EventArgs e) => await Navigation.PushAsync (new MainPage1 ());
+ Content = btn;
+ }
+
+ class RecipeViewModel
+ {
+ public Recipe Recipe { get; set; }
+
+ public ObservableCollection<RecipeGroup> RecipeGroups { get; set; }
+
+ public async Task LoadRecipesAsync ()
+ {
+ var groups = new ObservableCollection<RecipeGroup> ();
+ groups.Add (new RecipeGroup { Title = "Teste 1" });
+ groups.Add (new RecipeGroup { Title = "Teste 2" });
+ groups.Add (new RecipeGroup { Title = "Teste 3" });
+ groups.Add (new RecipeGroup { Title = "Teste 4" });
+ groups.Add (new RecipeGroup { Title = "Teste 5" });
+ groups.Add (new RecipeGroup { Title = "Teste 6" });
+ groups.Add (new RecipeGroup { Title = "Teste 4" });
+ groups.Add (new RecipeGroup { Title = "Teste 5" });
+ groups.Add (new RecipeGroup { Title = "Teste 6" });
+
+ RecipeGroups = groups;
+ }
+ }
+
+ class Recipe
+ {
+ public string ID { get; set; }
+
+ public string Title { get; set; }
+
+ public string Subtitle { get; set; }
+
+ public string Description { get; set; }
+
+ public string ImagePath { get; set; }
+
+ public string TileImagePath { get; set; }
+
+ public int PrepTime { get; set; }
+
+ public string Directions { get; set; }
+
+ public List<string> Ingredients { get; set; }
+ }
+
+ class RecipeGroup : INotifyPropertyChanged
+ {
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ void OnPropertyChanged (string caller)
+ {
+ var handler = PropertyChanged;
+ if (handler != null) {
+ handler (this, new PropertyChangedEventArgs (caller));
+ }
+ }
+
+ public string ID { get; set; }
+
+ public string Title {
+ get{ return _title; }
+ set {
+ _title = value;
+ OnPropertyChanged ("Title");
+ }
+ }
+
+ string _title;
+
+ public string Subtitle { get; set; }
+
+ public string ImagePath { get; set; }
+
+ public string GroupImagePath { get; set; }
+
+ public string Description { get; set; }
+
+ public List<Recipe> Recipes { get; set; }
+ }
+
+ class MainPage1 : TabbedPage
+ {
+ public MainPage1 ()
+ {
+ ItemTemplate = new DataTemplate (() => {
+ var page = new ContentPage ();
+ page.SetBinding (TitleProperty, new Binding ("Title"));
+ var btn = new Button { Text = "change", Command = new Command (() => {
+ (page.BindingContext as RecipeGroup).Title = "we changed";
+ })
+ };
+ var btn1 = new Button { Text = "null", Command = new Command (() => {
+ (page.BindingContext as RecipeGroup).Title = null;
+ })
+ };
+ page.Content = new StackLayout { Children = { btn, btn1 } };
+ return page;
+ });
+ SetBinding (ItemsSourceProperty, new Binding ("RecipeGroups"));
+ }
+
+ protected override async void OnAppearing ()
+ {
+ base.OnAppearing ();
+
+ if (BindingContext == null)
+ BindingContext = await GetRecipeViewModelAsync ();
+ }
+
+ RecipeViewModel _rvm;
+
+ public async Task<RecipeViewModel> GetRecipeViewModelAsync ()
+ {
+ if (_rvm == null) {
+ _rvm = new RecipeViewModel ();
+ } else {
+ _rvm.RecipeGroups.Clear ();
+ }
+
+ await _rvm.LoadRecipesAsync ();
+
+ return _rvm;
+ }
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla27378.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla27378.cs
new file mode 100644
index 00000000..7d47e488
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla27378.cs
@@ -0,0 +1,33 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls.Issues
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 27378, "Navigation.InsertPageBefore causes AurgumentException only on Windows Phone", PlatformAffected.WinPhone, NavigationBehavior.PushModalAsync)]
+ public class Bugzilla27378
+ : NavigationPage
+ {
+ public Bugzilla27378()
+ {
+ ContentPage page = null;
+ page = new ContentPage {
+ Content = new Button {
+ Text = "Click",
+ Command = new Command (async () => {
+ Navigation.InsertPageBefore (new ContentPage {
+ Content = new Label {
+ Text = "Second page"
+ }
+ }, page);
+ await Navigation.PopAsync ();
+ })
+ }
+ };
+
+ PushAsync (page);
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla27581.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla27581.cs
new file mode 100644
index 00000000..511e9860
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla27581.cs
@@ -0,0 +1,29 @@
+using System;
+
+using Xamarin.Forms;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Bugzilla, 27581, "WebView in ContentPage", PlatformAffected.Android)]
+ public class Bugzilla27581 : ContentPage
+ {
+ public Bugzilla27581 ()
+ {
+ Content = new StackLayout {
+ VerticalOptions = LayoutOptions.FillAndExpand,
+ Children = {
+ new Label {
+ XAlign = TextAlignment.Center,
+ Text = "Tap input field, then try to scroll"
+ },
+ new WebView {
+ Source = "http://movinglabs.com/temp/xamarin/input.html",
+ VerticalOptions = LayoutOptions.FillAndExpand
+ }
+ }
+ };
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla27642.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla27642.cs
new file mode 100644
index 00000000..ec2c203e
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla27642.cs
@@ -0,0 +1,178 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+using System.Text;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 27642, "[Windows Phone] Adding a ScrollView control to a ContentView, remove it and re-add it will cause an exception on Windows Phone")]
+ public class Bugzilla27642 : TestContentPage // or TestMasterDetailPage, etc ...
+ {
+ ContentView _mainContent;
+ protected override void Init ()
+ {
+ var rootGrid = new Grid {
+ RowDefinitions = new RowDefinitionCollection
+ {
+ new RowDefinition { Height = new GridLength(1, GridUnitType.Star) },
+ new RowDefinition { Height = new GridLength(1, GridUnitType.Auto) },
+ },
+ };
+
+
+ _mainContent = new ContentView { Content = new ScrollView { Content = new Label { Text = Description } } };
+ rootGrid.AddChild (_mainContent, 0, 0);
+
+
+ var buttons = new StackLayout { Orientation = StackOrientation.Horizontal };
+
+ var button1A = new Button { Text = "View 1A" };
+ button1A.Clicked += (sender, args) => ShowView (_view1A);
+ buttons.Children.Add (button1A);
+
+ var button1B = new Button { Text = "View 1B" };
+ button1B.Clicked += (sender, args) => ShowView (_view1B);
+ buttons.Children.Add (button1B);
+
+ var button2 = new Button { Text = "View 2" };
+ button2.Clicked += (sender, args) => ShowView (_view2);
+ buttons.Children.Add (button2);
+
+ rootGrid.AddChild (buttons, 0, 1);
+
+
+ Content = rootGrid;
+ }
+
+ const string Description = "A view containing a ScrollView cannot be re-used (same instance, Singleton) \n\n\n"
+ + "Steps to reproduce: \n\n" + "View1a contains a ScrollView \n"
+ + "Click: View1A -> View2 -> View1A => Exception\n\n"
+ + "View1b also contains a ScrollView, but its Content (including ScrollView!) will be re-generated during activation.\n"
+ + "Click: View1B -> View2 -> View1B => Exception\n\n"
+ + "View2 doesn't contain a ScrollView and therefore can be called again without problems.\n\n"
+ + "The Error-Message-View contains a ScrollView, too but will be re-created every time.";
+
+ readonly View1A _view1A = new View1A (); // always same instance, simulates Singleton from IoC
+ readonly View1B _view1B = new View1B (); // -"-
+ readonly View2 _view2 = new View2 (); // -"-
+
+ void ShowView (ExtendedContentView view)
+ {
+ try {
+ view.Activating (); // implemented only for View1B
+ _mainContent.Content = view;
+ }
+ catch (Exception ex) {
+ _mainContent.Content = new ErrorView (ex);
+ }
+ }
+
+ [Preserve (AllMembers = true)]
+ public class ExtendedContentView : ContentView
+ {
+ public virtual void Activating ()
+ {
+ }
+ }
+
+ [Preserve (AllMembers = true)]
+ public class View1A : ExtendedContentView
+ {
+ public View1A ()
+ {
+
+ BackgroundColor = Color.Olive;
+ var scrollView = new ScrollView ();
+ var sb = new StringBuilder ();
+ for (var i = 0; i < 100; i++)
+ sb.Append ("View 1a with ScrollView +++ ");
+
+ var label = new Label { Text = sb.ToString (), HorizontalOptions = LayoutOptions.Center, VerticalOptions = LayoutOptions.Center, XAlign = TextAlignment.Center, };
+
+ scrollView.Content = label;
+
+ Content = scrollView;
+
+ }
+
+ }
+
+ [Preserve (AllMembers = true)]
+ public class View1B : ExtendedContentView
+ {
+ public View1B ()
+ {
+ BackgroundColor = Color.Navy;
+ }
+
+ public override void Activating ()
+ {
+ var scrollView = new ScrollView ();
+ var sb = new StringBuilder ();
+ for (var i = 0; i < 50; i++)
+ sb.Append ("View 1b with ScrollView and recreation of content +++++ ");
+
+ var label = new Label { Text = sb.ToString (), HorizontalOptions = LayoutOptions.Center, VerticalOptions = LayoutOptions.Center, XAlign = TextAlignment.Center, };
+
+ scrollView.Content = label;
+
+ Content = scrollView;
+
+ }
+ }
+
+ public class View2 : ExtendedContentView
+ {
+ public View2 ()
+ {
+ BackgroundColor = Color.Teal;
+ Content = new Label { Text = "View 2", HorizontalOptions = LayoutOptions.Center, VerticalOptions = LayoutOptions.Center, XAlign = TextAlignment.Center, };
+ }
+ }
+
+ [Preserve (AllMembers = true)]
+ public class ErrorView : ExtendedContentView
+ {
+ public ErrorView (Exception ex)
+ {
+ BackgroundColor = Color.Maroon;
+ Content = new ScrollView { Content = new Label { Text = ex.ToString () } };
+ }
+ }
+
+ }
+
+ public static class GridExtension
+ {
+ public static void AddChild (this Grid grid, View view, int column, int row, int columnspan = 1, int rowspan = 1)
+ {
+ if (row < 0) {
+ throw new ArgumentOutOfRangeException ("row");
+ }
+ if (column < 0) {
+ throw new ArgumentOutOfRangeException ("column");
+ }
+ if (rowspan <= 0) {
+ throw new ArgumentOutOfRangeException ("rowspan");
+ }
+ if (columnspan <= 0) {
+ throw new ArgumentOutOfRangeException ("columnspan");
+ }
+ if (view == null) {
+ throw new ArgumentNullException ("view");
+ }
+
+ Grid.SetRow (view, row);
+ Grid.SetRowSpan (view, rowspan);
+ Grid.SetColumn (view, column);
+ Grid.SetColumnSpan (view, columnspan);
+ grid.Children.Add (view);
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla27698.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla27698.cs
new file mode 100644
index 00000000..08122826
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla27698.cs
@@ -0,0 +1,53 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Issue (IssueTracker.Bugzilla, 27698, "[iOS] DisplayAlert and DisplayActionSheet are shown below master page ")]
+ public class Bugzilla27698 : TestMasterDetailPage // or TestMasterDetailPage, etc ...
+ {
+ protected override void Init ()
+ {
+
+ var showAlertBtn = new Button { Text = "DisplayAlert" };
+ var showActionSheetBtn = new Button { Text = "DisplayActionSheet" };
+
+ var master = new ContentPage
+ {
+ Title = "Master",
+ Content = new StackLayout
+ {
+ VerticalOptions = LayoutOptions.Center,
+ Children = {
+ showAlertBtn,
+ showActionSheetBtn
+ }
+ }
+ };
+
+ Master = master;
+
+ MasterBehavior = MasterBehavior.Popover;
+
+ Detail = new ContentPage {
+ Content = new Label { Text = "Details", HorizontalOptions =
+ LayoutOptions.Center, VerticalOptions = LayoutOptions.Center
+ }
+ };
+
+ showAlertBtn.Clicked += (s, e) => DisplayAlert("Title","Message", "Cancel");
+ showActionSheetBtn.Clicked += (s, e) => DisplayActionSheet ("Title", "Cancel", null, "Button1", "Button2", "Button3");
+
+ }
+
+#if UITEST
+
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla27779.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla27779.cs
new file mode 100644
index 00000000..271c4b05
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla27779.cs
@@ -0,0 +1,83 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+using System.Collections.Generic;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 27779, "Xamarin.Forms.ReadOnlyListAdapter.IndexOf throws NotImplementedExcpetion ")]
+ public class Bugzilla27779 : TestContentPage // or TestMasterDetailPage, etc ...
+ {
+ ListView _listview;
+ IReadOnlyList<Person> _itemsSource;
+
+ public class Source : IReadOnlyList<Person>
+ {
+ List<Person> _items;
+ public Source ()
+ {
+ _items = new List<Person> ();
+
+ for (int i = 0; i < 100; i++) {
+ _items.Add (new Person ("Person #" + i));
+ }
+
+ }
+ #region IEnumerable implementation
+ public IEnumerator<Person> GetEnumerator ()
+ {
+ return _items.GetEnumerator ();
+ }
+ #endregion
+ #region IEnumerable implementation
+ System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator ()
+ {
+ return _items.GetEnumerator ();
+ }
+ #endregion
+ #region IReadOnlyList implementation
+ public Person this [int index] {
+ get {
+ return _items [index];
+ }
+ }
+ #endregion
+ #region IReadOnlyCollection implementation
+ public int Count {
+ get {
+ return _items.Count;
+ }
+ }
+ #endregion
+
+ }
+ protected override void Init ()
+ {
+
+ _itemsSource = new Source();
+
+ _listview = new ListView {
+ ItemsSource = _itemsSource
+ };
+
+ var btn = new Button { Text = "Set selected", AutomationId="btnSelect" };
+ btn.Clicked+= (object sender, EventArgs e) => {
+ _listview.SelectedItem = _itemsSource [0];
+ };
+
+ Content = new StackLayout { Children = { btn, _listview } };
+ }
+
+ protected override void OnAppearing ()
+ {
+ base.OnAppearing ();
+ }
+
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla28001.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla28001.cs
new file mode 100644
index 00000000..e73bc0dd
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla28001.cs
@@ -0,0 +1,60 @@
+using System;
+using Xamarin.Forms.CustomAttributes;
+
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 28001, "[Android] TabbedPage: invisible tabs are not Disposed", PlatformAffected.Android)]
+ public class Bugzilla28001 : TestContentPage
+ {
+ static int s_disposeCount;
+ static Label s_lbl;
+
+ void HandleDispose (object sender, EventArgs e)
+ {
+ s_disposeCount++;
+ s_lbl.Text = string.Format ("Dispose {0} pages", s_disposeCount);
+ }
+
+ protected override void Init ()
+ {
+ s_lbl = new Label { AutomationId = "lblDisposedCound" };
+ var tab1 = new DisposePage { Title = "Tab1" };
+ var tab2 = new DisposePage { Title = "Tab2" };
+ tab1.RendererDisposed += HandleDispose;
+ tab2.RendererDisposed += HandleDispose;
+
+ tab2.PopAction = tab1.PopAction = async () => await Navigation.PopAsync ();
+
+ var tabbedPage = new TabbedPage { Children = { tab1, tab2 } };
+ var btm = new Button { Text = "Push" };
+
+ btm.Clicked += async (object sender, EventArgs e) => {
+ await Navigation.PushAsync (tabbedPage);
+ };
+
+ Content = new StackLayout { Children = { btm, s_lbl } };
+ }
+
+
+ #if UITEST
+ [Test]
+ public void Bugzilla28001Test ()
+ {
+ RunningApp.Screenshot ("I am at Bugzilla 28001");
+ RunningApp.Tap (q => q.Marked ("Push"));
+ RunningApp.Tap (q => q.Marked ("Tab2"));
+ RunningApp.Tap (q => q.Marked ("Tab1"));
+ RunningApp.Tap (q => q.Marked ("Pop"));
+ RunningApp.WaitForElement (q => q.Marked (string.Format ("Dispose {0} pages", 2)));
+
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla28240.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla28240.cs
new file mode 100644
index 00000000..f2bf078a
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla28240.cs
@@ -0,0 +1,38 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 28240, "Problems with a NavigationPage as Master+Detail of a MasterDetailPage", PlatformAffected.Android)]
+ public class Bugzilla28240 : TestMasterDetailPage
+ {
+ protected override void Init ()
+ {
+ Detail = new NavigationPage( new ContentPage { Title = "DetailPage", BackgroundColor = Color.Red });
+ Master = new NavigationPage( new ContentPage { Title = "MasterPage", BackgroundColor = Color.Blue }) { Title =" Master" };
+ }
+
+ protected override async void OnAppearing ()
+ {
+ var btn = new Button () { Text = "GO Back" };
+ btn.Clicked+= async (object sender, EventArgs e) => await (Master as NavigationPage).PopAsync ();
+
+ await (Master as NavigationPage).PushAsync (new ContentPage { Title = "New MasterPage", Content = btn , BackgroundColor = Color.Pink });
+ base.OnAppearing ();
+ }
+#if UITEST
+ [Test]
+ public void Bugzilla28240Test ()
+ {
+
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla28498.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla28498.cs
new file mode 100644
index 00000000..3f5f5abc
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla28498.cs
@@ -0,0 +1,78 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 28498, "App crashes when switching between NavigationPages on a MasterDetailPage when In-Call Status Bar is visible")]
+ public class Bugzilla28498 : TestMasterDetailPage
+ {
+ protected override void Init ()
+ {
+
+
+ var carrouselChildPage = new ContentPage { Content = new StackLayout {
+ Orientation = StackOrientation.Vertical,
+ Children = {
+ new Label { Text = "Carousel Page" },
+ new Button { Text = "Open", AutomationId="btnOpen", Command = new Command (() => IsPresented = true) },
+ },
+ Padding = 10
+ }
+ };
+
+ var otherPage = new ContentPage { Content = new StackLayout {
+ Orientation = StackOrientation.Vertical,
+ Children = {
+ new Label { Text = "Other" },
+ new Button { Text = "Open", AutomationId="btnOpen", Command = new Command (() => IsPresented = true) },
+ },
+ Padding = 10
+ }
+ };
+
+ var carousel = new NavigationPage(new CarouselPage { Children = { carrouselChildPage } });
+ var other = new NavigationPage(otherPage);
+ Detail = carousel;
+
+ Master = new ContentPage
+ {
+ Title = "Menu",
+ Content = new StackLayout
+ {
+ Orientation = StackOrientation.Vertical,
+ Children = {
+ new Button { Text = "Page 1 (Carousel)", AutomationId="btnCarousel", Command = new Command(() => Detail = carousel) },
+ new Button { Text = "Page 2 (Other)", AutomationId="btnOther", Command = new Command(() => Detail = other) },
+ },
+ Padding = 10
+ }
+ };
+
+ }
+
+#if UITEST
+ [Test]
+ public void Bugzilla28498Test ()
+ {
+ RunningApp.SetOrientationPortrait ();
+ RunningApp.Tap (q => q.Marked ("btnOpen"));
+ RunningApp.Tap (q => q.Marked ("btnOther"));
+ RunningApp.SetOrientationLandscape ();
+ RunningApp.Tap (q => q.Marked ("btnOpen"));
+ RunningApp.Screenshot ("Detail open");
+
+ if (RunningApp.Query (c => c.Marked ("btnCarousel")).Length > 0)
+ Assert.DoesNotThrow (() => RunningApp.Tap (q => q.Marked ("btnCarousel")));
+ else
+ Assert.Inconclusive ("Should be button here, but rotation could take some time on XTC");
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla28570.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla28570.cs
new file mode 100644
index 00000000..5e9a8cb8
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla28570.cs
@@ -0,0 +1,118 @@
+using System;
+using System.Diagnostics;
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest.Android;
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 28570, "https://bugzilla.xamarin.com/show_bug.cgi?id=28570")]
+ internal class Bugzilla28570 : TestContentPage
+ {
+ public ScrollView ScrollView;
+
+ protected override void Init ()
+ {
+ Label header = new Label {
+ Text = "ScrollView Bug",
+ FontSize = 50,
+ FontAttributes = FontAttributes.Bold,
+ HorizontalOptions = LayoutOptions.Center
+ };
+
+ Label lab1 = new Label ();
+ lab1.Text = "Sometimes page content fits entirely on " +
+ "the page. That's very convenient. But " +
+ "on many occasions, the content of the page " +
+ "is much too large for the page, or only " +
+ "becomes available at runtime." +
+ "\n\n" +
+ "For cases such as these, the ScrollView " +
+ "provides a solution. Simply set its " +
+ "Content property to your content \u2014 in this " +
+ "case a Label but in the general case very " +
+ "likely a Layout derivative with multiple " +
+ "children \u2014 and the ScrollView provides " +
+ "scrolling with the distinctive look and touch " +
+ "familiar to the user." +
+ "\n\n" +
+ "The ScrollView is also capable of " +
+ "horizontal scrolling, and while that's " +
+ "usually not as common as vertical scrolling, " +
+ "sometimes it comes in handy." +
+ "\n\n" +
+ "Most often, the content of a ScrollView is " +
+ "a StackLayout. Whenever you're using a " +
+ "StackLayout with a number of items determined " +
+ "only at runtime, you should probably put it in " +
+ "a StackLayout just to be sure your stuff doesn't " +
+ "go running off the bottom of the screen." +
+ "Most often, the content of a ScrollView is " +
+ "a StackLayout. Whenever you're using a " +
+ "StackLayout with a number of items determined " +
+ "only at runtime, you should probably put it in " +
+ "a StackLayout just to be sure your stuff doesn't " +
+ "go running off the bottom of the screen.";
+
+ var targetLabel = new Label {Text = "Find Me"};
+ targetLabel.AutomationId = "28570Target";
+
+ lab1.FontSize = Device.GetNamedSize (NamedSize.Small, typeof (Label));
+
+
+ ScrollView = new ScrollView {
+ VerticalOptions = LayoutOptions.FillAndExpand,
+ Content = new StackLayout {
+ Children = {
+ lab1,
+ targetLabel
+ }
+ }
+ };
+
+ Button makeBig = new Button ();
+ makeBig.Text = "Tap";
+ //
+ // Clicking button first time does not scroll event though scrollView.Height is already set.
+ // Clicking a second time does correctly scroll to the end. scrollView.Height is unchanged.
+ //
+ // For this test to work you should make sure the text fits into the screen when the font is small
+ // and then becomes larger than the screeen when switching to the Large font.
+ //
+ makeBig.Clicked += (object sender, EventArgs e) => {
+ lab1.FontSize = Device.GetNamedSize (NamedSize.Large, typeof (Label));
+ Debug.WriteLine ("******** scrollView.Height= {0}", lab1.Height); // this shows the same updated size on all clicks, so this is not the problem.
+ ScrollView.ScrollToAsync (0, lab1.Bounds.Bottom, false);
+ };
+
+ // Build the page.
+ Content = new StackLayout {
+ Children = {
+ makeBig,
+ header,
+ ScrollView,
+ }
+ };
+ }
+
+#if UITEST
+ [Test]
+ [Ignore("Fails intermittently on TestCloud")]
+ public void Bugzilla28570Test ()
+ {
+ if (RunningApp is AndroidApp) {
+ RunningApp.WaitForElement (q => q.Marked ("Tap"));
+ RunningApp.Screenshot ("At test page");
+ RunningApp.Tap (q => q.Marked ("Tap"));
+
+ RunningApp.WaitForElement (q => q.Marked ("28570Target"));
+ }
+ }
+#endif
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla28575.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla28575.cs
new file mode 100644
index 00000000..665dec2d
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla28575.cs
@@ -0,0 +1,53 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 28575, "listview header set to null")]
+ public class Bugzilla28575 : TestContentPage
+ {
+ readonly string _header = "Hello I am Header!!!!";
+
+ protected override void Init ()
+ {
+ var listview = new ListView ();
+ listview.Header = new Label () {
+ Text = _header,
+ TextColor = Color.Red,
+ XAlign = TextAlignment.Center
+ };
+
+ var b = new Button () {
+ Text = "Click",
+ AutomationId = "btnClick"
+
+ };
+ b.Clicked += (sender, e) => listview.Header = null;
+
+ Content = new StackLayout {
+ Children = {
+ b,
+ listview
+ }
+ };
+ }
+
+ #if UITEST
+ [Test]
+ public void Bugzilla28575Test ()
+ {
+ RunningApp.Screenshot ("I am at Bugzilla28575Test ");
+ RunningApp.WaitForElement (q => q.Marked (_header));
+ RunningApp.Tap (q => q.Marked ("Click"));
+ RunningApp.WaitForNoElement (q => q.Marked (_header));
+ }
+ #endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla28709.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla28709.cs
new file mode 100644
index 00000000..db67e935
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla28709.cs
@@ -0,0 +1,94 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+using System.Threading.Tasks;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 28709, "Application.Properties saving crash ")]
+ public class Bugzilla28709 : TestContentPage // or TestMasterDetailPage, etc ...
+ {
+ protected override void Init ()
+ {
+
+ var btn = new Button () {
+ Text = "Save Properties",
+ HorizontalOptions = LayoutOptions.Center,
+ VerticalOptions = LayoutOptions.Center
+ };
+
+ var btn1 = new Button () {
+ Text = "Save Properties Multiple Threads",
+ HorizontalOptions = LayoutOptions.Center,
+ VerticalOptions = LayoutOptions.Center
+ };
+ btn.Clicked += OnButtonClicked;
+ btn1.Clicked += (sender, e) => {
+ Task.Run(() => {System.Diagnostics.Debug.WriteLine ("thread 1"); OnButtonClicked1("thread1",new EventArgs());});
+ Task.Run(() => {System.Diagnostics.Debug.WriteLine ("thread 2"); OnButtonClicked1("thread2",new EventArgs());});
+ Task.Run(() => {System.Diagnostics.Debug.WriteLine ("thread 3"); OnButtonClicked1("thread3",new EventArgs());});
+
+ };
+ Content = new StackLayout { Children = { btn, btn1 }};
+ }
+
+ void OnButtonClicked (object sender, EventArgs e)
+ {
+ System.Diagnostics.Debug.WriteLine ($"OnButtonClicked {sender.ToString()}");
+
+ int j = -1;
+ var properties = Application.Current.Properties;
+ int seed = 13;
+ while (++j < 300) {
+ seed = ((seed * 257) + 41) % 65536;
+ int i = seed % 20;
+
+ int previousClickTotal = -1;
+ if (properties.ContainsKey ("PreviousClickTotal" + i.ToString ()))
+ previousClickTotal = (int)(Application.Current.Properties ["PreviousClickTotal" + i.ToString ()]);
+
+ string clickTotal = "0";
+ if (properties.ContainsKey ("ClickTotal" + i.ToString ()))
+ clickTotal = (string)Application.Current.Properties ["ClickTotal" + i.ToString ()];
+
+ double nextClickTotal = 1.0;
+ if (properties.ContainsKey ("NextClickTotal" + i.ToString ()))
+ nextClickTotal = (double)(Application.Current.Properties ["NextClickTotal" + i.ToString ()]);
+
+ Application.Current.Properties ["PreviousClickTotal" + i.ToString ()] = ++previousClickTotal;
+ Application.Current.Properties ["ClickTotal" + i.ToString ()] = previousClickTotal.ToString ();
+ Application.Current.Properties ["NextClickTotal" + i.ToString ()] = ++nextClickTotal;
+
+ SaveAllProperties ();
+ }
+ }
+
+ async void OnButtonClicked1 (object sender, EventArgs e)
+ {
+ System.Diagnostics.Debug.WriteLine ($"OnButtonClicked {sender.ToString()}");
+ //Application.Current.Properties[sender.ToString()] = 1;
+ await Application.Current.SavePropertiesAsync ();
+ System.Diagnostics.Debug.WriteLine ($"OnButtonClicked {sender.ToString()} done");
+ }
+
+ async void SaveAllProperties ()
+ {
+ await Application.Current.SavePropertiesAsync ();
+ }
+
+
+ #if UITEST
+ [Test]
+ public void Bugzilla28709Test ()
+ {
+ RunningApp.Tap (q => q.Marked ("Save Properties"));
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla28796.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla28796.cs
new file mode 100644
index 00000000..98938d77
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla28796.cs
@@ -0,0 +1,35 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 28796, "Crash on Tab change", PlatformAffected.Android, NavigationBehavior.PushModalAsync)]
+ public class Bugzilla28796
+ : TabbedPage
+ {
+ public Bugzilla28796()
+ {
+ Children.Add (new ContentPage {
+ Title = "First",
+ Content = new Label {
+ Text = "Select the second tab. Click the button and before it finishes animating, select the first tab."
+ }
+ });
+
+ var button = new Button {
+ Text = "Navigate"
+ };
+ button.Clicked += (sender, args) => {
+ Navigation.PushModalAsync (new ContentPage());
+ };
+
+ Children.Add (new ContentPage {
+ Title = "Second",
+ Content = button
+ });
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla28939.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla28939.cs
new file mode 100644
index 00000000..c216f23d
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla28939.cs
@@ -0,0 +1,21 @@
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Issue (IssueTracker.Bugzilla, 28939, " Entry Control loses cursor position to either beginning or end of input ",
+ PlatformAffected.WinPhone)]
+ public class Bugzilla28939 : TestContentPage
+ {
+ protected override void Init ()
+ {
+ Content = new StackLayout {
+ Children = {
+ new Label {
+ Text = @"Enter the text ""testing"" in the Entry Control below. Move the cursor between the 'e' and the 's'. Type the letter 'a'. If the cursor is positioned after the 'a', the test has passed."
+ },
+ new Entry()
+ }
+ };
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29017.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29017.cs
new file mode 100644
index 00000000..eea9295d
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29017.cs
@@ -0,0 +1,82 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+using Xamarin.Forms.Maps;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Issue (IssueTracker.Bugzilla, 29017, "Pin clicked does not work on iOS maps")]
+ public class Issue29017 : TestContentPage // or TestMasterDetailPage, etc ...
+ {
+ Label _lbl;
+
+ protected override void Init ()
+ {
+ var map = new Map {
+ HorizontalOptions = LayoutOptions.FillAndExpand,
+ VerticalOptions = LayoutOptions.FillAndExpand
+ };
+
+ _lbl = new Label {
+ Text = "Not Clicked"
+ };
+
+ Content = new StackLayout {
+ Children = {
+ new Button {
+ Text = "Add pins",
+ Command = new Command (() => {
+
+ foreach (var pin in map.Pins) {
+ pin.Clicked -= PinClicked;
+ }
+
+ map.Pins.Clear ();
+
+ for (int i = 0; i < 100; i++) {
+ var rnd = new Random ();
+ var lat = rnd.NextDouble () / 10;
+ var lng = rnd.NextDouble () / 10;
+
+ if (i % 2 == 0) {
+ lat = -lat;
+ lng = -lng;
+ }
+
+ var pin = new Pin {
+ Address = "address",
+ Label = "label",
+ Type = PinType.Place,
+ Position = new Position (map.VisibleRegion.Center.Latitude + lat, map.VisibleRegion.Center.Longitude + lng)
+ };
+
+ pin.Clicked += PinClicked;
+ map.Pins.Add (pin);
+ }
+ })
+ },
+ _lbl,
+ map
+ }
+ };
+ }
+
+ void PinClicked (object sender, EventArgs e)
+ {
+ _lbl.Text = "Click " + DateTime.Now.ToLocalTime ();
+ }
+
+#if UITEST
+ [Test]
+ public void Issue1Test ()
+ {
+
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29107.xaml b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29107.xaml
new file mode 100644
index 00000000..de0f96d7
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29107.xaml
@@ -0,0 +1,249 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<local:TestContentPage xmlns="http://xamarin.com/schemas/2014/forms"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+ xmlns:local="clr-namespace:Xamarin.Forms.Controls"
+ x:Class="Xamarin.Forms.Controls.Bugzilla29107">
+ <StackLayout Orientation="Vertical" HorizontalOptions="FillAndExpand" Padding="20">
+ <Frame OutlineColor="Gray" Padding="5">
+ <Label Text="" VerticalOptions="End" HorizontalOptions="Start" />
+ </Frame>
+ <StackLayout HorizontalOptions="FillAndExpand" Orientation="Horizontal">
+ <Label Text=" State:" HorizontalOptions="Start">
+ <Label.Font>
+ Bold,Large
+ </Label.Font>
+ </Label>
+ <Label Text="Test State" HorizontalOptions="Start">
+ <Label.Font>
+ Bold,Large
+ </Label.Font>
+ </Label>
+ </StackLayout>
+ <StackLayout HorizontalOptions="FillAndExpand" Orientation="Horizontal">
+ <ScrollView Orientation="Vertical" IsClippedToBounds="true">
+ <StackLayout HorizontalOptions="FillAndExpand">
+ <Label Text="Parameter1" HorizontalOptions="FillAndExpand" />
+ <Picker x:Name="pickerParam1" Title="Prameter1">
+ </Picker>
+ <StackLayout x:Name="layoutParam1" HorizontalOptions="FillAndExpand">
+ <Label Text="Entry" HorizontalOptions="FillAndExpand">
+ </Label>
+ <Entry HorizontalOptions="FillAndExpand">
+ </Entry>
+ <Label Text="Entry" HorizontalOptions="FillAndExpand">
+ </Label>
+ <Entry HorizontalOptions="FillAndExpand">
+ </Entry>
+ <Label Text="Entry" HorizontalOptions="FillAndExpand">
+ </Label>
+ <Entry HorizontalOptions="FillAndExpand">
+ </Entry>
+ <Label Text="Entry" HorizontalOptions="FillAndExpand">
+ </Label>
+ <Entry HorizontalOptions="FillAndExpand">
+ </Entry>
+ <Label Text="Entry" HorizontalOptions="FillAndExpand">
+ </Label>
+ <Entry HorizontalOptions="FillAndExpand">
+ </Entry>
+ <Label Text="Entry" HorizontalOptions="FillAndExpand">
+ </Label>
+ <Entry HorizontalOptions="FillAndExpand">
+ </Entry>
+ <Label Text="Entry" HorizontalOptions="FillAndExpand">
+ </Label>
+ <Entry HorizontalOptions="FillAndExpand">
+ </Entry>
+ <Label Text="Entry" HorizontalOptions="FillAndExpand">
+ </Label>
+ <Entry HorizontalOptions="FillAndExpand">
+ </Entry>
+ <Entry HorizontalOptions="FillAndExpand">
+ </Entry>
+ <Label Text="Entry" HorizontalOptions="FillAndExpand">
+ </Label>
+ <Entry HorizontalOptions="FillAndExpand">
+ </Entry>
+ <Label Text="Entry" HorizontalOptions="FillAndExpand">
+ </Label>
+ <Entry HorizontalOptions="FillAndExpand">
+ </Entry>
+ <Label Text="Entry" HorizontalOptions="FillAndExpand">
+ </Label>
+ <Entry HorizontalOptions="FillAndExpand">
+ </Entry>
+ <Label Text="Entry" HorizontalOptions="FillAndExpand">
+ </Label>
+ <Entry HorizontalOptions="FillAndExpand">
+ </Entry>
+ <Label Text="Entry" HorizontalOptions="FillAndExpand">
+ </Label>
+ <Entry HorizontalOptions="FillAndExpand">
+ </Entry>
+ </StackLayout>
+ </StackLayout>
+ </ScrollView>
+ <ScrollView Orientation="Vertical" IsClippedToBounds="true">
+ <StackLayout HorizontalOptions="FillAndExpand">
+ <Label Text="Parameter2" HorizontalOptions="FillAndExpand" />
+ <Picker x:Name="pickerParam2" Title="Parameter2">
+ </Picker>
+ <StackLayout x:Name="layoutParam2" HorizontalOptions="FillAndExpand">
+ <Label Text="Entry" HorizontalOptions="FillAndExpand">
+ </Label>
+ <Entry HorizontalOptions="FillAndExpand">
+ </Entry>
+ <Label Text="Entry" HorizontalOptions="FillAndExpand">
+ </Label>
+ <Entry HorizontalOptions="FillAndExpand">
+ </Entry>
+ <Label Text="Entry" HorizontalOptions="FillAndExpand">
+ </Label>
+ <Entry HorizontalOptions="FillAndExpand">
+ </Entry>
+ <Label Text="Entry" HorizontalOptions="FillAndExpand">
+ </Label>
+ <Entry HorizontalOptions="FillAndExpand">
+ </Entry>
+ <Label Text="Entry" HorizontalOptions="FillAndExpand">
+ </Label>
+ <Entry HorizontalOptions="FillAndExpand">
+ </Entry>
+ <Label Text="Entry" HorizontalOptions="FillAndExpand">
+ </Label>
+ <Entry HorizontalOptions="FillAndExpand">
+ </Entry>
+ <Label Text="Entry" HorizontalOptions="FillAndExpand">
+ </Label>
+ <Entry HorizontalOptions="FillAndExpand">
+ </Entry>
+ <Label Text="Entry" HorizontalOptions="FillAndExpand">
+ </Label>
+ <Entry HorizontalOptions="FillAndExpand">
+ </Entry>
+ <Entry HorizontalOptions="FillAndExpand">
+ </Entry>
+ <Label Text="Entry" HorizontalOptions="FillAndExpand">
+ </Label>
+ <Entry HorizontalOptions="FillAndExpand">
+ </Entry>
+ <Label Text="Entry" HorizontalOptions="FillAndExpand">
+ </Label>
+ <Entry HorizontalOptions="FillAndExpand">
+ </Entry>
+ <Label Text="Entry" HorizontalOptions="FillAndExpand">
+ </Label>
+ <Entry HorizontalOptions="FillAndExpand">
+ </Entry>
+ <Label Text="Entry" HorizontalOptions="FillAndExpand">
+ </Label>
+ <Entry HorizontalOptions="FillAndExpand">
+ </Entry>
+ <Label Text="Entry" HorizontalOptions="FillAndExpand">
+ </Label>
+ <Entry HorizontalOptions="FillAndExpand">
+ </Entry>
+ </StackLayout>
+ </StackLayout>
+ </ScrollView>
+ <Grid HorizontalOptions="Start" Padding="2" VerticalOptions="FillAndExpand">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="200" />
+ <ColumnDefinition Width="200" />
+ </Grid.ColumnDefinitions>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="20">
+ </RowDefinition>
+ <RowDefinition Height="20">
+ </RowDefinition>
+ <RowDefinition Height="20">
+ </RowDefinition>
+ <RowDefinition Height="20">
+ </RowDefinition>
+ <RowDefinition Height="20">
+ </RowDefinition>
+ <RowDefinition Height="20">
+ </RowDefinition>
+ <RowDefinition Height="20">
+ </RowDefinition>
+ <RowDefinition Height="20">
+ </RowDefinition>
+ </Grid.RowDefinitions>
+ <Label Text="Field" Grid.Row="0" Grid.Column="0">
+ <Label.Font>
+ Bold,Large
+ </Label.Font>
+ </Label>
+ <Label Text="Field" Grid.Row="0" Grid.Column="1">
+ <Label.Font>
+ Bold,Large
+ </Label.Font>
+ </Label>
+ <Label Text="Field" Grid.Row="1" Grid.Column="0">
+ <Label.Font>
+ Bold,Medium
+ </Label.Font>
+ </Label>
+ <Label Text="Field" Grid.Row="1" Grid.Column="1">
+ </Label>
+ <Label Text="Field" Grid.Row="2" Grid.Column="0">
+ <Label.Font>
+ Bold,Medium
+ </Label.Font>
+ </Label>
+ <Label Text="Field" Grid.Row="2" Grid.Column="1">
+ </Label>
+ <Label Text="Field" Grid.Row="3" Grid.Column="0">
+ <Label.Font>
+ Bold,Medium
+ </Label.Font>
+ </Label>
+ <Label Text="Field" Grid.Row="3" Grid.Column="1">
+ </Label>
+ <Label Text="Field" Grid.Row="4" Grid.Column="0">
+ <Label.Font>
+ Bold,Medium
+ </Label.Font>
+ </Label>
+ <Label Text="Field" Grid.Row="4" Grid.Column="1">
+ </Label>
+ <Label Text="Field" Grid.Row="5" Grid.Column="0">
+ <Label.Font>
+ Bold,Medium
+ </Label.Font>
+ </Label>
+ <Label Text="Field" Grid.Row="5" Grid.Column="1">
+ </Label>
+ <Label Text="Field" Grid.Row="6" Grid.Column="0">
+ <Label.Font>
+ Bold,Medium
+ </Label.Font>
+ </Label>
+ <Label Text="Field" Grid.Row="6" Grid.Column="1">
+ </Label>
+ <Label Text="Field" Grid.Row="7" Grid.Column="0">
+ <Label.Font>
+ Bold,Medium
+ </Label.Font>
+ </Label>
+ <Label Text="Field" Grid.Row="7" Grid.Column="1">
+ </Label>
+ <Label Text="Field" Grid.Row="8" Grid.Column="0">
+ <Label.Font>
+ Bold,Medium
+ </Label.Font>
+ </Label>
+ <Label Text="Field" Grid.Row="8" Grid.Column="1">
+ </Label>
+ </Grid>
+ </StackLayout>
+ <StackLayout HorizontalOptions="FillAndExpand" Orientation="Horizontal">
+ <Button Text="Start">
+ </Button>
+ <Button Text="Cancel">
+ </Button>
+ <Button Text="End">
+ </Button>
+ </StackLayout>
+ </StackLayout>
+</local:TestContentPage> \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29107.xaml.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29107.xaml.cs
new file mode 100644
index 00000000..d7a7ddca
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29107.xaml.cs
@@ -0,0 +1,22 @@
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 29107, "Xamarin.Android ScrollView text overlaps", PlatformAffected.Android)]
+ public partial class Bugzilla29107 : TestContentPage
+ {
+ public Bugzilla29107 ()
+ {
+#if APP
+ InitializeComponent ();
+#endif
+ }
+
+ protected override void Init ()
+ {
+
+ }
+
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29128.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29128.cs
new file mode 100644
index 00000000..c414e49e
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29128.cs
@@ -0,0 +1,36 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 29128, "Slider background lays out wrong Android")]
+ public class Bugzilla29128 : TestContentPage
+ {
+ protected override void Init ()
+ {
+ Content = new Slider {
+ AutomationId = "SliderId",
+ BackgroundColor = Color.Blue,
+ Maximum = 255,
+ Minimum = 0,
+ };
+ }
+
+#if UITEST
+ [Test]
+ public void Bugzilla29128Test ()
+ {
+ RunningApp.WaitForElement (q => q.Marked ("SliderId"));
+ RunningApp.Screenshot("Slider and button should be centered");
+ Assert.Inconclusive ("For visual review only");
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29158.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29158.cs
new file mode 100644
index 00000000..f755348b
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29158.cs
@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls.Issues
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 29158, "XF for WP8.1RT - BeginInvokeOnMainThread generates NullReferenceException", (PlatformAffected)(1<<3))]
+ public class Bugzilla29158
+ : ContentPage
+ {
+ protected override void OnAppearing()
+ {
+ base.OnAppearing();
+
+ System.Threading.Tasks.Task.Run (async () =>
+ {
+ await System.Threading.Tasks.Task.Delay (1000);
+ Device.BeginInvokeOnMainThread (() => DisplayAlert("Time's up", "", "OK"));
+ });
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29229.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29229.cs
new file mode 100644
index 00000000..059c2110
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29229.cs
@@ -0,0 +1,29 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls.Issues
+{
+ [Issue (IssueTracker.Bugzilla, 29229, "ListView crash on Windows Phone", PlatformAffected.WinPhone, NavigationBehavior.PushModalAsync)]
+ public class Bugzilla29229
+ : NavigationPage
+ {
+ public Bugzilla29229()
+ {
+ var absLayout = new AbsoluteLayout();
+ absLayout.BackgroundColor = Color.Red;
+ absLayout.Scale = 1;
+
+ var cPx = new ListView ();
+ Point ptx = Point.Zero;
+ cPx.ItemTapped += delegate (object sender, ItemTappedEventArgs e) {
+ };
+ cPx.ClassId = "weather";
+ cPx.Layout (new Rectangle (0,0,480,768));
+ absLayout.Children.Add (cPx, new Rectangle (cPx.X, cPx.Y, cPx.Width, cPx.Height), AbsoluteLayoutFlags.None);
+ absLayout.LowerChild (cPx);
+ PushAsync (new ContentPage { Content = absLayout });
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29247.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29247.cs
new file mode 100644
index 00000000..74828e71
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29247.cs
@@ -0,0 +1,67 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 29247, "iOS Device.OpenUri breaks with encoded params", PlatformAffected.iOS )]
+ public class Bugzilla29247 : TestContentPage
+ {
+ protected override void Init ()
+ {
+ Content = new StackLayout {
+ VerticalOptions = LayoutOptions.Center,
+ Children = {
+ new Label {
+ XAlign = TextAlignment.Center,
+ Text = "Welcome to Xamarin Forms!"
+ },
+ new Button {
+ Text = "Without Params (Works)",
+ AutomationId = "btnOpenUri1",
+ Command = new Command (() => Device.OpenUri (new Uri ("http://www.bing.com")))
+ },
+ new Button {
+ Text = "With encoded Params (Breaks)",
+ AutomationId = "btnOpenUri2",
+ Command = new Command (() => Device.OpenUri (new Uri ("http://www.bing.com/search?q=xamarin%20bombs%20on%20this")))
+ },
+ new Button {
+ Text = "With decoded Params (Breaks)",
+ AutomationId = "btnOpenUri3",
+ Command = new Command (() => Device.OpenUri (new Uri ("http://www.bing.com/search?q=xamarin bombs on this")))
+ }
+ }
+ };
+ }
+
+ #if UITEST
+ [Test]
+ [Ignore("Fails on ios 7.1")]
+ public void Bugzilla29247Test ()
+ {
+ RunningApp.Tap (q => q.Marked ("btnOpenUri1"));
+ }
+
+ [Test]
+ [Ignore("Fails on ios 7.1")]
+ public void Bugzilla29247EncodedParamsTest ()
+ {
+ RunningApp.Tap (q => q.Marked ("btnOpenUri2"));
+ }
+
+ [Test]
+ [Ignore("Fails on ios 7.1")]
+ public void Bugzilla29247DecodeParamsTest ()
+ {
+ RunningApp.Tap (q => q.Marked ("btnOpenUri3"));
+ }
+ #endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29257.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29257.cs
new file mode 100644
index 00000000..012ed59e
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29257.cs
@@ -0,0 +1,100 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+using System.Collections.Generic;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 29257, "CarouselPage.CurrentPage Does Not Work Properly When Used Inside a NavigationPage ")]
+ public class Bugzilla29257 : TestContentPage
+ {
+ List<string> _menuItems = new List<string> {
+ "Page 1", "Page 2", "Page 3", "Page 4", "Page 5"
+ };
+
+ ListView _menu;
+
+ protected override void Init ()
+ {
+ _menu = new ListView { ItemsSource = _menuItems };
+
+ _menu.ItemSelected += PageSelected;
+
+ Content = _menu;
+ }
+
+ async void PageSelected(object sender, SelectedItemChangedEventArgs e)
+ {
+ var selection = e.SelectedItem as string;
+
+ switch (selection)
+ {
+ case "Page 1":
+ await Navigation.PushAsync(new TestPage(0));
+ break;
+
+ case "Page 2":
+ await Navigation.PushAsync(new TestPage(1));
+ break;
+
+ case "Page 3":
+ await Navigation.PushAsync(new TestPage(2));
+ break;
+
+ case "Page 4":
+ await Navigation.PushAsync(new TestPage(3));
+ break;
+
+ case "Page 5":
+ await Navigation.PushAsync(new TestPage(4));
+ break;
+ }
+ _menu.SelectedItem = null;
+ }
+
+ public class TestPage : CarouselPage
+ {
+ public TestPage()
+ {
+ Children.Add(new ContentPage { Content = new Label { Text = "This is page 1" , BackgroundColor = Color.Red} });
+ Children.Add(new ContentPage { Content = new Label { Text = "This is page 2" , BackgroundColor = Color.Green} });
+ Children.Add(new ContentPage { Content = new Label { Text = "This is page 3" , BackgroundColor = Color.Blue} });
+ Children.Add(new ContentPage { Content = new Label { Text = "This is page 4" , BackgroundColor = Color.Pink} });
+ Children.Add(new ContentPage { Content = new Label { Text = "This is page 5" , BackgroundColor = Color.Yellow } });
+
+ }
+
+ public TestPage(int page) : this()
+ {
+ CurrentPage = Children[page];
+ }
+ }
+
+#if UITEST
+ [Test]
+ public void Bugzilla29257Test ()
+ {
+ RunningApp.Tap (q => q.Marked ("Page 1"));
+ RunningApp.WaitForElement (q => q.Marked ("This is page 1"));
+ RunningApp.Back ();
+ RunningApp.Tap (q => q.Marked ("Page 2"));
+ RunningApp.WaitForElement (q => q.Marked ("This is page 2"));
+ RunningApp.Back ();
+ RunningApp.Tap (q => q.Marked ("Page 3"));
+ RunningApp.WaitForElement (q => q.Marked ("This is page 3"));
+ RunningApp.Back ();
+ RunningApp.Tap (q => q.Marked ("Page 4"));
+ RunningApp.WaitForElement (q => q.Marked ("This is page 4"));
+ RunningApp.Back ();
+ RunningApp.Tap (q => q.Marked ("Page 5"));
+ RunningApp.WaitForElement (q => q.Marked ("This is page 5"));
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29363.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29363.cs
new file mode 100644
index 00000000..fbacce89
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29363.cs
@@ -0,0 +1,48 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using NUnit.Framework;
+#endif
+
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 29363, "PushModal followed immediate by PopModal crashes")]
+ public class Bugzilla29363 : TestContentPage
+ {
+ protected override void Init ()
+ {
+ var layout = new StackLayout () {HorizontalOptions = LayoutOptions.FillAndExpand, VerticalOptions = LayoutOptions.FillAndExpand};
+
+ Button modal = new Button {
+ Text = "Modal Push Pop Test",
+ Font = Font.SystemFontOfSize (25, FontAttributes.Bold),
+ HorizontalOptions = LayoutOptions.Center
+ };
+ modal.Clicked += async (object sender, EventArgs e) => {
+ var page = new ContentPage () {BackgroundColor = Color.Red};
+
+ await Navigation.PushModalAsync (page);
+
+ await Navigation.PopModalAsync (true);
+ };
+
+ layout.Children.Add (modal);
+ Content = layout;
+ }
+
+#if UITEST
+ [Test]
+ public void PushButton ()
+ {
+ RunningApp.Tap (q => q.Marked ("Modal Push Pop Test"));
+ System.Threading.Thread.Sleep (5);
+ // if it didn't crash, yay
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29453.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29453.cs
new file mode 100644
index 00000000..ce6e5e12
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29453.cs
@@ -0,0 +1,72 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 29453, "Navigation.PopAsync(false) in Entry.Completed handler => System.ArgumentException", PlatformAffected.Android)]
+ public class Bugzilla29453 : TestContentPage // or TestMasterDetailPage, etc ...
+ {
+ protected override void Init ()
+ {
+ var page1Layout = new StackLayout {
+ Children = {
+ new Label {
+ XAlign = TextAlignment.Center,
+ Text = "Page 1"
+ }
+ }
+ };
+
+ var page2Layout = new StackLayout {
+ Children = {
+ new Label {
+ XAlign = TextAlignment.Center,
+ Text = "Page 2"
+ }
+ }
+ };
+
+ var entry = new Entry { AutomationId = "entryText" };
+
+ entry.Completed += async (sender, args) => {
+ await Navigation.PopAsync (false);
+ };
+
+ page2Layout.Children.Add (entry);
+
+ var page2 = new ContentPage {
+ Content = page2Layout
+ };
+
+ var button = new Button {
+ Text = "Go to page 2",
+ AutomationId = "btnGotoPage2",
+ Command = new Command (async () => await Navigation.PushAsync (page2))
+ };
+
+ page1Layout.Children.Add (button);
+ Content = page1Layout;
+ }
+
+ #if UITEST
+ [Test]
+ public void Bugzilla29453Test ()
+ {
+ RunningApp.Screenshot ("I am at Issue Bugzilla29453");
+ RunningApp.WaitForElement (q => q.Marked ("Page 1"));
+ RunningApp.Tap (q => q.Marked ("btnGotoPage2"));
+ RunningApp.Tap (q => q.Marked ("entryText"));
+ RunningApp.EnterText ("XF");
+ RunningApp.PressEnter ();
+ RunningApp.WaitForElement (q => q.Marked ("Page 1"));
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla30317.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla30317.cs
new file mode 100644
index 00000000..7cc07709
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla30317.cs
@@ -0,0 +1,260 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+using Xamarin.UITest.Android;
+using System.Collections.Generic;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 30317, "https://bugzilla.xamarin.com/show_bug.cgi?id=30137")]
+ public class Bugzilla30317 : TestNavigationPage // or TestMasterDetailPage, etc ...
+ {
+ [Preserve (AllMembers = true)]
+ public class Bugzilla30317ListItem
+ {
+ public string Label { get; set; }
+ }
+
+ [Preserve (AllMembers = true)]
+ public class Bugzilla30317ListCell : ViewCell
+ {
+ public Bugzilla30317ListCell()
+ {
+ var label = new Label (); ;
+ label.SetBinding(Label.TextProperty, "Label");
+ View = label;
+ }
+ }
+
+ [Preserve (AllMembers = true)]
+ public class Bugzilla30317Page1 : ContentPage
+ {
+ ListView _listView;
+
+ public Bugzilla30317Page1 ()
+ {
+ AutomationId = "PageOne";
+ Title = "Set ItemSource On Appearing";
+
+ _listView = new ListView ();
+
+ _listView.ItemTemplate = new DataTemplate(typeof(Bugzilla30317ListCell));
+
+ var nextPageButton = new Button {
+ AutomationId = "GoToPageTwoButton",
+ Text = "Go Page 2",
+ Command = new Command (async () => {
+ await Navigation.PushAsync (new Bugzilla30317Page2 ());
+ })
+ };
+
+ Content = new StackLayout { Children = { nextPageButton, _listView } };
+ }
+
+ protected override void OnAppearing ()
+ {
+ base.OnAppearing ();
+
+ _listView.ItemsSource = new Bugzilla30317ListItem[] {
+ new Bugzilla30317ListItem { Label = "PageOneItem1" },
+ new Bugzilla30317ListItem { Label = "PageOneItem2" },
+ new Bugzilla30317ListItem { Label = "PageOneItem3" },
+ new Bugzilla30317ListItem { Label = "PageOneItem4" },
+ new Bugzilla30317ListItem { Label = "PageOneItem5" },
+ };
+ }
+ }
+
+ [Preserve (AllMembers = true)]
+ public class Bugzilla30317Page2 : ContentPage
+ {
+ public Bugzilla30317Page2 ()
+ {
+ AutomationId = "PageTwo";
+ Title = "Set ItemSource in ctor";
+
+ var listView = new ListView ();
+
+ listView.ItemTemplate = new DataTemplate(typeof(Bugzilla30317ListCell));
+ listView.ItemsSource = new Bugzilla30317ListItem[] {
+ new Bugzilla30317ListItem { Label = "PageTwoItem1" },
+ new Bugzilla30317ListItem { Label = "PageTwoItem2" },
+ new Bugzilla30317ListItem { Label = "PageTwoItem3" },
+ new Bugzilla30317ListItem { Label = "PageTwoItem4" },
+ new Bugzilla30317ListItem { Label = "PageTwoItem5" },
+ };
+
+ var nextPageButton = new Button {
+ AutomationId = "GoToPageThreeButton",
+ Text = "Go Page 3",
+ Command = new Command (async () => {
+ await Navigation.PushModalAsync (new Bugzilla30317Page3 ());
+ })
+ };
+
+ Content = new StackLayout { Children = { nextPageButton, listView } };
+ }
+ }
+
+ [Preserve (AllMembers = true)]
+ public class Bugzilla30317Page3TabOne : ContentPage
+ {
+ public Bugzilla30317Page3TabOne ()
+ {
+ AutomationId = "TabbedPageOne";
+ Title = "TabOneCtor";
+
+ var listView = new ListView ();
+
+ listView.ItemTemplate = new DataTemplate(typeof(Bugzilla30317ListCell));
+ listView.ItemsSource = new Bugzilla30317ListItem[] {
+ new Bugzilla30317ListItem { Label = "PageThreeTabOneItem1" },
+ new Bugzilla30317ListItem { Label = "PageThreeTabOneItem2" },
+ new Bugzilla30317ListItem { Label = "PageThreeTabOneItem3" },
+ new Bugzilla30317ListItem { Label = "PageThreeTabOneItem4" },
+ new Bugzilla30317ListItem { Label = "PageThreeTabOneItem5" },
+ };
+
+ Content = listView;
+ }
+ }
+
+ [Preserve (AllMembers = true)]
+ public class Bugzilla30317Page3TabTwo : ContentPage
+ {
+ ListView _listView;
+
+ public Bugzilla30317Page3TabTwo ()
+ {
+ AutomationId = "TabbedPageTwo";
+ Title = "TabTwoOnAppearing";
+
+ _listView = new ListView ();
+
+ _listView.ItemTemplate = new DataTemplate(typeof(Bugzilla30317ListCell));
+
+
+ Content = _listView;
+
+ }
+
+ protected override void OnAppearing ()
+ {
+ base.OnAppearing ();
+
+ _listView.ItemsSource = new Bugzilla30317ListItem[] {
+ new Bugzilla30317ListItem { Label = "PageThreeTabTwoItem1" },
+ new Bugzilla30317ListItem { Label = "PageThreeTabTwoItem2" },
+ new Bugzilla30317ListItem { Label = "PageThreeTabTwoItem3" },
+ new Bugzilla30317ListItem { Label = "PageThreeTabTwoItem4" },
+ new Bugzilla30317ListItem { Label = "PageThreeTabTwoItem5" },
+ };
+ }
+ }
+
+ [Preserve (AllMembers = true)]
+ public class Bugzilla30317Page3 : TabbedPage
+ {
+ public Bugzilla30317Page3 ()
+ {
+ Children.Add (new Bugzilla30317Page3TabOne ());
+ Children.Add (new Bugzilla30317Page3TabTwo ());
+ }
+ }
+
+ protected override void Init ()
+ {
+ Navigation.PushAsync (new Bugzilla30317Page1 ());
+ }
+
+#if UITEST
+ [Test]
+ public void Bugzilla30317ItemSourceOnAppearingContentPage ()
+ {
+ if (RunningApp is AndroidApp) {
+ RunningApp.Screenshot ("I am at Bugzilla30317");
+ RunningApp.WaitForElement (q => q.Marked ("PageOne"));
+ RunningApp.Screenshot ("I see Page 1");
+
+ RunningApp.WaitForElement (q => q.Marked ("PageOneItem1"));
+ RunningApp.TouchAndHold (q => q.Marked ("PageOneItem1"));
+
+ RunningApp.WaitForElement (q => q.Marked ("PageOneItem5"));
+ RunningApp.TouchAndHold (q => q.Marked ("PageOneItem5"));
+
+ RunningApp.Screenshot ("I did not crash");
+ } else {
+ Assert.Inconclusive ("Not run on iOS");
+ }
+ }
+
+ [Test]
+ public void Bugzilla30317ItemSourceCtorContentPage ()
+ {
+ if (RunningApp is AndroidApp) {
+ RunningApp.WaitForElement (q => q.Marked ("GoToPageTwoButton"));
+ RunningApp.Tap (q => q.Marked ("GoToPageTwoButton"));
+
+ RunningApp.WaitForElement (q => q.Marked ("PageTwo"));
+ RunningApp.Screenshot ("I see Page 2");
+
+ RunningApp.WaitForElement (q => q.Marked ("PageTwoItem1"));
+ RunningApp.TouchAndHold (q => q.Marked ("PageTwoItem1"));
+
+ RunningApp.WaitForElement (q => q.Marked ("PageTwoItem5"));
+ RunningApp.TouchAndHold (q => q.Marked ("PageTwoItem5"));
+
+ RunningApp.Screenshot ("I did not crash");
+ } else {
+ Assert.Inconclusive ("Not run on iOS");
+ }
+ }
+
+ [Test]
+ public void Bugzilla30317ItemSourceTabbedPage ()
+ {
+ if (RunningApp is AndroidApp) {
+ RunningApp.WaitForElement (q => q.Marked ("GoToPageTwoButton"));
+ RunningApp.Tap (q => q.Marked ("GoToPageTwoButton"));
+
+ RunningApp.Screenshot ("I see Page 2");
+ RunningApp.WaitForElement (q => q.Marked ("PageTwo"));
+
+ RunningApp.WaitForElement (q => q.Marked ("GoToPageThreeButton"));
+ RunningApp.Tap (q => q.Marked ("GoToPageThreeButton"));
+
+ RunningApp.Screenshot ("I see TabbedPage One");
+ RunningApp.WaitForElement (q => q.Marked ("TabOneCtor"));
+
+ RunningApp.WaitForElement (q => q.Marked ("PageThreeTabOneItem1"));
+ RunningApp.TouchAndHold (q => q.Marked ("PageThreeTabOneItem1"));
+ RunningApp.WaitForElement (q => q.Marked ("PageThreeTabOneItem1"));
+
+ RunningApp.WaitForElement (q => q.Marked ("PageThreeTabOneItem5"));
+ RunningApp.TouchAndHold (q => q.Marked ("PageThreeTabOneItem5"));
+ RunningApp.WaitForElement (q => q.Marked ("PageThreeTabOneItem5"));
+
+ RunningApp.Screenshot ("I see TabbedPage Two");
+ RunningApp.WaitForElement (q => q.Marked ("TabTwoOnAppearing"));
+ RunningApp.Tap (q => q.Marked ("TabTwoOnAppearing"));
+
+ RunningApp.WaitForElement (q => q.Marked ("PageThreeTabTwoItem1"));
+ RunningApp.TouchAndHold (q => q.Marked ("PageThreeTabTwoItem1"));
+ RunningApp.WaitForElement (q => q.Marked ("PageThreeTabTwoItem1"));
+
+ RunningApp.WaitForElement (q => q.Marked ("PageThreeTabTwoItem5"));
+ RunningApp.TouchAndHold (q => q.Marked ("PageThreeTabTwoItem5"));
+ RunningApp.WaitForElement (q => q.Marked ("PageThreeTabTwoItem5"));
+ } else {
+ Assert.Inconclusive ("Not run on iOS");
+ }
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla30324.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla30324.cs
new file mode 100644
index 00000000..1356ffa7
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla30324.cs
@@ -0,0 +1,97 @@
+using System;
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 30324, "Detail view of MasterDetailPage does not get appearance events on Android when whole MasterDetailPage disappears/reappears")]
+ public class Bugzilla30324 : TestNavigationPage
+ {
+ Label _lbl;
+ int _count;
+
+ protected override void Init ()
+ {
+ MasterDetailPage page = new MasterDetailPage();
+ page.Master = new Page () { Title = "Master", BackgroundColor = Color.Red };
+ _lbl = new Label ();
+
+ var otherPage = new ContentPage () {
+ Title = "Other",
+ Content = new StackLayout { Children = {
+ new Button () {
+ Text = "navigate back",
+ HorizontalOptions = LayoutOptions.Center,
+ VerticalOptions = LayoutOptions.Center,
+
+ Command = new Command (() => Navigation.PopAsync())
+ }
+ }
+ }
+ };
+
+ page.Detail = new ContentPage () {
+ Title = "Detail",
+ Content = new StackLayout { Children = {
+ _lbl,
+ new Button () {
+ Text = "navigate",
+ HorizontalOptions = LayoutOptions.Center,
+ VerticalOptions = LayoutOptions.Center,
+
+ Command = new Command (() => Navigation.PushAsync (otherPage))
+ }
+ }
+ }
+ };
+
+ page.Appearing += (sender, e) =>
+ {
+ System.Diagnostics.Debug.WriteLine("Appear MDP");
+ };
+ page.Disappearing += (sender, e) =>
+ {
+ System.Diagnostics.Debug.WriteLine("Disappear MDP");
+ };
+ page.Detail.Appearing += (sender, args) =>
+ {
+ if(_count ==2)
+ _lbl.Text = "Appear detail";
+ System.Diagnostics.Debug.WriteLine("Appear detail");
+ };
+ page.Detail.Disappearing += (sender, args) => {
+ System.Diagnostics.Debug.WriteLine ("Disappear detail");
+ _lbl.Text = "Disappear detail";
+ page.Detail.BackgroundColor = Color.Green;
+ _count++;
+ };
+ page.Master.Appearing += (sender, e) =>
+ {
+ System.Diagnostics.Debug.WriteLine("Appear master");
+ };
+ Navigation.PushAsync (page);
+ }
+
+ #if UITEST
+ [Test]
+ public void Bugzilla30324Test ()
+ {
+ RunningApp.Tap (q => q.Marked ("navigate"));
+ RunningApp.Tap (q => q.Marked ("navigate back"));
+ RunningApp.WaitForElement (q => q.Marked ("Disappear detail"));
+ RunningApp.Tap (q => q.Marked ("navigate"));
+ RunningApp.Tap (q => q.Marked ("navigate back"));
+ RunningApp.WaitForElement (q => q.Marked ("Appear detail"));
+ }
+ #endif
+ }
+
+
+}
+
+
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla30353.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla30353.cs
new file mode 100644
index 00000000..56c5ef87
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla30353.cs
@@ -0,0 +1,113 @@
+using System;
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest.iOS;
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 30353, "MasterDetailPage.IsPresentedChanged is not raised")]
+ public class Bugzilla30353 : TestMasterDetailPage
+ {
+ protected override void Init ()
+ {
+ var lbl = new Label {
+ HorizontalOptions = LayoutOptions.CenterAndExpand,
+ VerticalOptions = LayoutOptions.CenterAndExpand,
+ Text = "Detail"
+ };
+
+ #if !UITEST
+ if (App.IOSVersion == 7) {
+ lbl.Text = "Don't run";
+ }
+ #endif
+
+ var lblMaster = new Label {
+ HorizontalOptions = LayoutOptions.CenterAndExpand,
+ VerticalOptions = LayoutOptions.CenterAndExpand,
+ Text = "Master"
+ };
+ var btn = new Button () {
+ Text = "Toggle"
+ };
+ var btn1 = new Button () {
+ Text = "Toggle"
+ };
+
+ btn.Clicked += (object sender, EventArgs e) => IsPresented = !IsPresented;
+ btn1.Clicked += (object sender, EventArgs e) => IsPresented = !IsPresented;
+
+ var stacklayout = new StackLayout ();
+ stacklayout.Children.Add (lbl);
+ stacklayout.Children.Add (btn);
+
+ var stacklayout1 = new StackLayout ();
+ stacklayout1.Children.Add (lblMaster);
+ stacklayout1.Children.Add (btn1);
+
+ Master = new ContentPage {
+ Title = "IsPresentedChanged Test",
+ BackgroundColor = Color.Green,
+ Content = stacklayout1
+ };
+ Detail = new ContentPage {
+ BackgroundColor = Color.Gray,
+ Content = stacklayout
+ };
+ MasterBehavior = MasterBehavior.Popover;
+ IsPresentedChanged += (s, e) =>
+ lblMaster.Text = lbl.Text = string.Format ("The Master is now {0}", IsPresented ? "visible" : "invisible");
+ }
+
+ #if UITEST
+ [Test]
+ public void Bugzilla30353Test ()
+ {
+ var dontRun = RunningApp.Query (q => q.Marked ("Don't run"));
+ if (dontRun.Length > 0)
+ {
+ return;
+ }
+ RunningApp.SetOrientationPortrait ();
+ RunningApp.Screenshot ("Portrait");
+ RunningApp.Tap (q => q.Marked ("Toggle"));
+ RunningApp.Screenshot ("Portrait Visible");
+ RunningApp.WaitForElement (q => q.Marked ("The Master is now visible"));
+ if (RunningApp is iOSApp)
+ RunningApp.Tap (q => q.Marked ("Toggle"));
+ else
+ RunningApp.Back ();
+ RunningApp.Screenshot ("Portrait Invisible");
+ RunningApp.WaitForElement (q => q.Marked ("The Master is now invisible"));
+ RunningApp.SetOrientationLandscape ();
+ RunningApp.Screenshot ("Landscape Invisible");
+ RunningApp.WaitForElement (q => q.Marked ("The Master is now invisible"));
+ RunningApp.Tap (q => q.Marked ("Toggle"));
+ RunningApp.Screenshot ("Landscape Visible");
+ RunningApp.WaitForElement (q => q.Marked ("The Master is now visible"));
+ if (RunningApp is iOSApp)
+ RunningApp.Tap (q => q.Marked ("Toggle"));
+ else
+ RunningApp.Back ();
+ RunningApp.Screenshot ("Landscape InVisible");
+ RunningApp.WaitForElement (q => q.Marked ("The Master is now invisible"));
+ RunningApp.SetOrientationPortrait ();
+ RunningApp.Tap (q => q.Marked ("Toggle"));
+ RunningApp.Screenshot ("Portrait Visible");
+ RunningApp.WaitForElement (q => q.Marked ("The Master is now visible"));
+ if (RunningApp is iOSApp)
+ RunningApp.Tap (q => q.Marked ("Toggle"));
+ else
+ RunningApp.Back ();
+ RunningApp.Screenshot ("Portrait Invisible");
+ RunningApp.WaitForElement (q => q.Marked ("The Master is now invisible"));
+ RunningApp.SetOrientationLandscape ();
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla30651.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla30651.cs
new file mode 100644
index 00000000..a2466b98
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla30651.cs
@@ -0,0 +1,101 @@
+using System;
+using Xamarin.Forms.CustomAttributes;
+using System.Collections.ObjectModel;
+using System.Linq;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 30651, "ListView jumps around while scrolling after items are added to its source")]
+ public class Bugzilla30651: TestContentPage
+ {
+ ListViewModel _viewModel;
+ protected override void Init ()
+ {
+ _viewModel = new ListViewModel();
+ BindingContext = _viewModel;
+ var lv = new ListView ();
+ lv.SetBinding (ListView.ItemsSourceProperty, new Binding ("Items"));
+ lv.SeparatorVisibility = SeparatorVisibility.None;
+ lv.HasUnevenRows = true;
+ lv.ItemAppearing+= (object sender, ItemVisibilityEventArgs e) => {
+ _viewModel.OnItemAppearing(e.Item.ToString());
+ };
+ lv.ItemTemplate = new DataTemplate (typeof(TestCell));
+ Content = lv;
+ }
+
+ public class TestCell : ViewCell {
+ Label _myLabel;
+ public TestCell ()
+ {
+ View = _myLabel = new Label();
+ }
+
+ protected override void OnBindingContextChanged()
+ {
+ if (BindingContext == null)
+ return;
+
+ var i = BindingContext as string;
+ _myLabel.Text = i;
+ Height = 100;
+
+ base.OnBindingContextChanged();
+ }
+ }
+
+
+ public class ListViewModel : ViewModelBase
+ {
+ ObservableCollection<string> _items;
+ int _counter = 0;
+
+ public ObservableCollection<string> Items
+ {
+ get { return _items; }
+ set { _items = value; OnPropertyChanged ();}
+ }
+
+ public ListViewModel()
+ {
+ Items = new ObservableCollection<string>();
+ AddMoreData();
+ }
+
+ public void OnItemAppearing(string s)
+ {
+ if (Items.Last() == s)
+ AddMoreData();
+ }
+
+ void AddMoreData()
+ {
+ _counter++;
+ Items.Add(_counter.ToString());
+ _counter++;
+ Items.Add(_counter.ToString());
+ _counter++;
+ Items.Add(_counter.ToString());
+ _counter++;
+ Items.Add(_counter.ToString());
+ _counter++;
+ Items.Add(_counter.ToString());
+ _counter++;
+ Items.Add(_counter.ToString());
+ _counter++;
+ Items.Add(_counter.ToString());
+ _counter++;
+ Items.Add(_counter.ToString());
+ _counter++;
+ Items.Add(_counter.ToString());
+ _counter++;
+ Items.Add(_counter.ToString());
+ _counter++;
+ Items.Add(_counter.ToString());
+ _counter++;
+ Items.Add(_counter.ToString());
+ }
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla30835.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla30835.cs
new file mode 100644
index 00000000..c4af01d6
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla30835.cs
@@ -0,0 +1,207 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+using System.Collections.Generic;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 30835, "Navigating to and from the Carousel page with MasterDetail page creates an Out of memory exception")]
+ public class Bugzilla30835 : TestMasterDetailPage // or TestMasterDetailPage, etc ...
+ {
+ protected override void Init ()
+ {
+ var menuPage = new MenuPage ();
+
+ menuPage.Menu.ItemSelected += (sender, e) => NavigateTo (e.SelectedItem as MenuItem);
+
+ Master = menuPage;
+ Detail = new NavigationPage (new HolderCarouselPages ());
+ }
+
+ void NavigateTo (MenuItem menu)
+ {
+ var displayPage = (Page)Activator.CreateInstance (menu.TargetType);
+ Detail = new NavigationPage (displayPage);
+ IsPresented = false;
+ }
+
+ [Preserve (AllMembers = true)]
+ public class HolderCarouselPages : CarouselPage
+ {
+ public HolderCarouselPages ()
+ {
+ Device.BeginInvokeOnMainThread (() => {
+ ItemsSource = new HolderImage[] {
+ new HolderImage ("frog", "photo.jpg"),
+ new HolderImage ("history", "photo.jpg"),
+ new HolderImage ("Test", "photo.jpg"),
+ };
+ });
+
+ ItemTemplate = new DataTemplate (() => new DisplayContentPage ());
+ }
+ }
+
+ [Preserve (AllMembers = true)]
+ public class HolderImage
+ {
+ public HolderImage (string name, string images)
+ {
+ Name = name;
+ Homeimages = images;
+ }
+
+ public string Name { private set; get; }
+
+ public string Homeimages { private set; get; }
+
+ public override string ToString ()
+ {
+ return Name;
+ }
+ }
+
+ [Preserve (AllMembers = true)]
+ public class DisplayContentPage : ContentPage
+ {
+ public DisplayContentPage ()
+ {
+ var imageView = new Image {
+ HorizontalOptions = LayoutOptions.Center,
+ };
+
+ Content = new StackLayout {
+ Children = {
+ new StackLayout {
+ HorizontalOptions = LayoutOptions.Center,
+ VerticalOptions = LayoutOptions.StartAndExpand,
+ Children = {
+ imageView
+ }
+ },
+ }
+ };
+ imageView.SetBinding (Image.SourceProperty, "Homeimages");
+ }
+ }
+
+ [Preserve (AllMembers = true)]
+ public class MenuPage : ContentPage
+ {
+ public ListView Menu { get; set; }
+
+ public MenuPage ()
+ {
+ Icon = "bank.png";
+ Title = "Carsousel Memory Bug";
+ BackgroundColor = Color.FromHex ("#000000");
+
+ Menu = new MenuListView ();
+
+ var menuLabel = new ContentView {
+ Padding = new Thickness (10, 36, 0, 5),
+ Content = new Label {
+ TextColor = Color.FromHex ("#FFFFFF"),
+ Text = "Carsousel Memory Bug",
+ }
+ };
+
+ var layout = new StackLayout {
+ Spacing = 0,
+ VerticalOptions = LayoutOptions.FillAndExpand,
+ };
+ layout.Children.Add (menuLabel);
+ layout.Children.Add (Menu);
+
+ Content = layout;
+ }
+ }
+
+ [Preserve (AllMembers = true)]
+ public class MenuListView : ListView
+ {
+ public MenuListView ()
+ {
+ List<MenuItem> data = new MenuListData ();
+
+ ItemsSource = data;
+ VerticalOptions = LayoutOptions.FillAndExpand;
+ BackgroundColor = Color.Black;
+
+ var cell = new DataTemplate (typeof(ImageCell));
+ cell.SetBinding (TextCell.TextColorProperty, "TextColor");
+ cell.SetBinding (TextCell.TextProperty, "Title");
+ cell.SetBinding (ImageCell.ImageSourceProperty, "IconSource");
+
+ ItemTemplate = cell;
+ SelectedItem = data [0];
+ }
+ }
+
+ [Preserve (AllMembers = true)]
+ public class MenuListData : List<MenuItem>
+ {
+ public MenuListData ()
+ {
+ Add (new MenuItem () {
+ Title = "Carousel",
+ IconSource = "icon.png",
+ TargetType = typeof(HolderCarouselPages),
+ TextColor = Color.White
+ });
+
+ Add (new MenuItem () {
+ Title = "Pic 1",
+ IconSource = "icon.png",
+ TargetType = typeof(Pic1),
+ TextColor = Color.White
+ });
+
+ Add (new MenuItem () {
+ Title = "Pic 2",
+ IconSource = "icon.png",
+ TargetType = typeof(Pic1),
+ TextColor = Color.White
+ });
+
+ Add (new MenuItem () {
+ Title = "Pic 3",
+ IconSource = "icon.png",
+ TargetType = typeof(Pic1),
+ TextColor = Color.White
+ });
+ }
+ }
+
+ [Preserve (AllMembers = true)]
+ public class MenuItem
+ {
+ public string Title { get; set; }
+
+ public string IconSource { get; set; }
+
+ public Type TargetType { get; set; }
+
+ public Color TextColor { get ; set; }
+ }
+
+ [Preserve (AllMembers = true)]
+ public class Pic1 : ContentPage
+ {
+ public Pic1 ()
+ {
+ Content = new StackLayout {
+ Children = {
+ new Image { Source = "photo.jpg" }
+ }
+ };
+ }
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla30935.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla30935.cs
new file mode 100644
index 00000000..3953f63d
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla30935.cs
@@ -0,0 +1,44 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Issue (IssueTracker.Bugzilla, 30935, "NullReferenceException in ViewRenderer<TView, TNativeView> (Xamarin.Forms.Platform.Android)")]
+ public class Bugzilla30935 : TestContentPage
+ {
+ Entry _entry;
+ protected override void Init ()
+ {
+ _entry = new Entry { AutomationId = "entry" };
+ // Initialize ui here instead of ctor
+ Content = new StackLayout { Children = { new Label {
+ AutomationId = "IssuePageLabel",
+ Text = "See if I'm here"
+ },_entry
+ }
+ };
+ }
+
+ protected override void OnAppearing ()
+ {
+ _entry.Focus ();
+ Content = null;
+ base.OnAppearing ();
+ }
+
+#if UITEST
+ [Test]
+ public void Bugzilla30935DoesntThrowException ()
+ {
+ RunningApp.WaitForNoElement (q => q.Marked ("IssuePageLabel"));
+ RunningApp.WaitForNoElement (q => q.Marked ("entry"));
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31029.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31029.cs
new file mode 100644
index 00000000..9f9594a2
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31029.cs
@@ -0,0 +1,126 @@
+using System;
+using System.IO;
+using System.Text;
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 31029, "[Windows Phone 8.1]Generating an Image via MemoryStream does not appear")]
+ public class Bugzilla31029 : TestContentPage // or TestMasterDetailPage, etc ...
+ {
+ protected override void Init ()
+ {
+ var generatedImage = new Image { Aspect = Aspect.AspectFit };
+
+ var btn = new Button { Text="generate" };
+
+ btn.Clicked += (sender, e) => {
+ var source = GenerateBmp (60, 60, Color.Red);
+ generatedImage.Source = source;
+
+ };
+
+ Content = new StackLayout {
+ Children = {
+ btn,
+ new Label {Text = "GeneratedImage", Font=Font.BoldSystemFontOfSize(NamedSize.Medium)},
+ generatedImage
+ },
+ Padding = new Thickness (0, 20, 0, 0),
+ VerticalOptions = LayoutOptions.StartAndExpand,
+ HorizontalOptions = LayoutOptions.CenterAndExpand
+ };
+ }
+ public ImageSource GenerateBmp (int rows, int cols, Color color)
+ {
+ BmpMaker bmpMaker = new BmpMaker (rows, cols);
+ //background color to white
+ for (int i = 0; i < rows; i++) {
+ for (int j = 0; j < cols; j++) {
+ bmpMaker.SetPixel (i, j, Color.White);
+ }
+ }
+ //draw a square
+ int marginX = rows / 10;
+ int marginY = cols / 10;
+ for (int row = marginX; row < (rows - marginX); row++) {
+ for (int col = marginY; col < (cols - marginY); col++) {
+ bmpMaker.SetPixel (row, col, color);
+ }
+ }
+ ImageSource resultImage = bmpMaker.Generate ();
+ return resultImage;
+ }
+ }
+
+ public class BmpMaker
+ {
+ const int HeaderSize = 54;
+ readonly byte[] _buffer;
+ public BmpMaker (int width, int height)
+ {
+ Width = width;
+ Height = height;
+ int numPixels = Width * Height;
+ int numPixelBytes = 4 * numPixels;
+ int fileSize = HeaderSize + numPixelBytes;
+ _buffer = new byte[fileSize];
+ // Write headers in MemoryStream and hence the buffer.
+ using (MemoryStream memoryStream = new MemoryStream (_buffer)) {
+ using (BinaryWriter writer = new BinaryWriter (memoryStream, Encoding.UTF8)) {
+ // Construct BMP header (14 bytes).
+ writer.Write (new char[] { 'B', 'M' }); // Signature
+ writer.Write (fileSize); // File size
+ writer.Write ((short) 0); // Reserved
+ writer.Write ((short) 0); // Reserved
+ writer.Write (HeaderSize); // Offset to pixels
+ // Construct BitmapInfoHeader (40 bytes).
+ writer.Write (40); // Header size
+ writer.Write (Width); // Pixel width
+ writer.Write (Height); // Pixel height
+ writer.Write ((short) 1); // Planes
+ writer.Write ((short) 32); // Bits per pixel
+ writer.Write (0); // Compression
+ writer.Write (numPixelBytes); // Image size in bytes
+ writer.Write (0); // X pixels per meter
+ writer.Write (0); // Y pixels per meter
+ writer.Write (0); // Number colors in color table
+ writer.Write (0); // Important color count
+ }
+ }
+ }
+
+ public int Width { get; private set; }
+ public int Height { get; private set; }
+
+ public void SetPixel (int row, int col, Color color)
+ {
+ SetPixel (row, col, (int) (255 * color.R),
+ (int) (255 * color.G),
+ (int) (255 * color.B),
+ (int) (255 * color.A));
+ }
+
+ public void SetPixel (int row, int col, int r, int g, int b, int a = 255)
+ {
+ int index = (row * Width + col) * 4 + HeaderSize;
+ _buffer[index + 0] = (byte) b;
+ _buffer[index + 1] = (byte) g;
+ _buffer[index + 2] = (byte) r;
+ _buffer[index + 3] = (byte) a;
+ }
+
+ public ImageSource Generate ()
+ {
+ Stream memoryStream = new MemoryStream (_buffer);
+ ImageSource imageSource = ImageSource.FromStream (() => { return memoryStream; });
+ return imageSource;
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31114.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31114.cs
new file mode 100644
index 00000000..e7f5be4d
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31114.cs
@@ -0,0 +1,421 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+using System.Collections.ObjectModel;
+
+#if UITEST
+using Xamarin.UITest.iOS;
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 31114, "iOS ContextAction leaves blank line after swiping in ListView")]
+ public class Bugzilla31114 : TestContentPage
+ {
+ ObservableCollection<ListItem> _items = new ObservableCollection<ListItem>();
+ ListView _listView;
+ Button _btbLoad;
+ public Command RefreshListCommand;
+ bool _isBusy = false;
+
+ protected override void Init ()
+ {
+
+ RefreshListCommand = new Command(LoadItemsFromCommand, CanRefreshList);
+ _listView = new ListView();
+ _listView.ItemsSource = _items;
+ _listView.ItemTemplate = new DataTemplate(typeof(TaskItemTemplate));
+ _listView.RowHeight = 64;
+ _listView.RefreshCommand = RefreshListCommand;
+ _listView.IsPullToRefreshEnabled = true;
+
+ _btbLoad = new Button { Text = "Load", AutomationId = "btnLoad", Command = RefreshListCommand };
+ TaskItemTemplate.RefreshFromQuickComplete += TaskListPageRefreshFromQuickComplete;
+
+ LoadItems();
+
+ Content = new StackLayout {
+ VerticalOptions = LayoutOptions.FillAndExpand,
+ HorizontalOptions = LayoutOptions.FillAndExpand,
+ Children = {
+ _listView,_btbLoad
+ }
+ };
+ }
+
+ protected override void OnDisappearing ()
+ {
+ TaskItemTemplate.RefreshFromQuickComplete -= TaskListPageRefreshFromQuickComplete;
+ base.OnDisappearing ();
+ }
+
+ bool CanRefreshList()
+ {
+ return !isBusy;
+ }
+
+ void LoadItemsFromCommand()
+ {
+ LoadItems();
+ }
+
+ void TaskListPageRefreshFromQuickComplete(object sender, ListItemEventArgs e)
+ {
+ Device.BeginInvokeOnMainThread(() =>
+ {
+ LoadItemsFromCommand();
+ });
+ }
+
+ void LoadItems()
+ {
+ isBusy = true;
+
+ Random random = new Random(DateTime.Now.Millisecond);
+
+ int count = random.Next(20, 30);
+
+ _items.Clear();
+
+ for (int i = 0; i < count - 1; i++)
+ {
+ var newItem = new ListItem()
+ {
+ Id = Guid.NewGuid().ToString(),
+ EntityTypeId = 1350,
+ BackgroundColor = "00aa00",
+ TextColor = "FFFFFF",
+ PrimaryText = "PIPE #"+(i+1000).ToString(),
+ CircleColor = "0000aa",
+ Icon = "",
+ OtherText = random.Next(100, 200).ToString() + " ft",
+ SecondaryText = "LENGTH " + i.ToString(),
+ SupportsQuickComplete = true,
+ };
+
+ //Debug.WriteLine(newItem.PrimaryText);
+
+ _items.Add(newItem);
+ }
+
+
+ isBusy = false;
+ }
+
+ bool isBusy
+ {
+ get { return _isBusy; }
+ set
+ {
+ _isBusy = value;
+ _listView.IsRefreshing = _isBusy;
+ }
+ }
+
+ [Preserve (AllMembers = true)]
+ public class ListItem
+ {
+ public string Id { get; set; }
+
+ public string PrimaryText { get; set; }
+
+ public string SecondaryText { get; set; }
+
+ public string TertiaryText { get; set; }
+
+ public string OtherText { get; set; }
+
+ public string ListControl { get; set; }
+
+ public string Icon { get; set; }
+
+ public string Params { get; set; }
+
+ public string BackgroundColor { get; set; }
+
+ public string TextColor { get; set; }
+
+ public string CircleColor { get; set; }
+
+ public long EntityTypeId { get; set; }
+
+ public bool SupportsQuickComplete { get; set; }
+
+ public ListItem ()
+ {
+ }
+
+ public string BackgroundColorColor
+ {
+ get
+ {
+ return BackgroundColor;
+ }
+ set
+ {
+ if (BackgroundColor != value)
+ {
+ BackgroundColor = value;
+ }
+ }
+ }
+
+ public string PrimaryLabelText
+ {
+ get
+ {
+ return PrimaryText;
+ }
+ }
+
+ public string SecondaryLabelText
+ {
+ get
+ {
+ return SecondaryText;
+ }
+ }
+
+ public string OtherLabelText
+ {
+ get
+ {
+ return OtherText;
+ }
+ }
+ }
+
+ public class ListItemEventArgs : EventArgs
+ {
+ public ListItem ListItem { get; set; }
+
+ public ListItemEventArgs(ListItem item)
+ {
+ ListItem = item;
+ }
+ }
+
+ [Preserve (AllMembers = true)]
+ public class TaskItemTemplate : ViewCell
+ {
+ Image _photo;
+ Label _mainLabel;
+ Label _secondaryLabel;
+ Label _distanceLabel;
+ Label _statusCircle;
+ StackLayout _stackLayout;
+ StackLayout _primaryContent;
+ StackLayout _secondaryContent;
+ AbsoluteLayout _masterLayout;
+
+ MenuItem _quickCompleteMenu;
+
+ public static event EventHandler<ListItemEventArgs> RefreshFromQuickComplete;
+
+ public TaskItemTemplate()
+ {
+ Init(true);
+ }
+
+ public TaskItemTemplate(bool fast = true)
+ {
+ Init(fast);
+ }
+
+ void Init(bool fast)
+ {
+ _photo = new Image
+ {
+ HeightRequest = 52,
+ WidthRequest = 52,
+ };
+
+
+ _mainLabel = new Label() { HeightRequest = 40, FontSize = 24, TranslationY = 5, LineBreakMode = LineBreakMode.TailTruncation };
+ _mainLabel.SetBinding(Label.TextProperty, "PrimaryLabelText");
+
+ _secondaryLabel = new Label() { HeightRequest = 40, FontSize = 16, TranslationY = -5, LineBreakMode = LineBreakMode.TailTruncation };
+ _secondaryLabel.SetBinding(Label.TextProperty, "SecondaryLabelText");
+
+ _distanceLabel = new Label() { XAlign = TextAlignment.End, HorizontalOptions = LayoutOptions.EndAndExpand, FontSize = 11, LineBreakMode = LineBreakMode.NoWrap };
+ _distanceLabel.SetBinding(Label.TextProperty, "OtherLabelText");
+
+ _statusCircle = new Label()
+ {
+ HorizontalOptions = LayoutOptions.EndAndExpand,
+ FontSize = 30,
+ TranslationY = 0,
+ };
+
+ _primaryContent = new StackLayout()
+ {
+ HorizontalOptions = LayoutOptions.StartAndExpand,
+ Orientation = StackOrientation.Vertical,
+ Children =
+ {
+ _mainLabel,
+ _secondaryLabel,
+ },
+ Padding = new Thickness(12, 0, 0, 0),
+ };
+
+ _secondaryContent = new StackLayout()
+ {
+ MinimumWidthRequest = 50,
+ HorizontalOptions = LayoutOptions.EndAndExpand,
+ Children =
+ {
+ _distanceLabel,
+ _statusCircle,
+ },
+ Padding = new Thickness(0, 5, 5, 0),
+ };
+
+ _stackLayout = new StackLayout
+ {
+ Orientation = StackOrientation.Horizontal,
+ Children =
+ {
+ _photo,
+ _primaryContent,
+ _secondaryContent,
+ },
+ Padding = new Thickness(5, 0, 0, 0)
+ };
+
+ if (!fast)
+ {
+ View = _stackLayout;
+ }
+ else
+ {
+ _quickCompleteMenu = new MenuItem { Text = "Complete", IsDestructive = false };
+ _quickCompleteMenu.SetBinding(MenuItem.CommandParameterProperty, new Binding("."));
+
+ // Delete context menu action
+ _quickCompleteMenu.Clicked += (sender, e) =>
+ {
+ FastCompleteForCmd(sender);
+ };
+
+ // Add this action to the cell
+ ContextActions.Add(_quickCompleteMenu);
+
+ _masterLayout = new AbsoluteLayout();
+
+ _masterLayout.Children.Add(_stackLayout);
+
+ AbsoluteLayout.SetLayoutFlags(_stackLayout, AbsoluteLayoutFlags.All);
+ AbsoluteLayout.SetLayoutBounds(_stackLayout, new Rectangle(0.0, 0.0, 1.0f, 1.0f));
+
+ View = _masterLayout;
+ }
+ }
+
+
+ protected override void OnPropertyChanged(string propertyName = null)
+ {
+ base.OnPropertyChanged(propertyName);
+ if (propertyName == "BackgroundColor")
+ {
+ var item = BindingContext as ListItem;
+ if (item != null && !string.IsNullOrEmpty(item.BackgroundColor))
+ View.BackgroundColor = Color.FromHex(item.BackgroundColor);
+ }
+ }
+
+ protected override void OnBindingContextChanged()
+ {
+ try
+ {
+ base.OnBindingContextChanged();
+ var item = BindingContext as ListItem;
+ if (item != null)
+ {
+ Color transformedColor;
+
+ if (!string.IsNullOrWhiteSpace(item.TextColor))
+ {
+ transformedColor = Color.FromHex(item.TextColor);
+
+ _mainLabel.TextColor = transformedColor;
+ _secondaryLabel.TextColor = transformedColor;
+ _distanceLabel.TextColor = transformedColor;
+ }
+
+ if (string.IsNullOrEmpty(item.Icon))
+ item.Icon = "https://beehive.blob.core.windows.net/staticimages/FeatureImages/MutantLizard01.png";
+
+ _photo.Source = new UriImageSource()
+ {
+ Uri = new Uri(item.Icon),
+ CachingEnabled = true,
+ CacheValidity = new TimeSpan(30, 0, 0, 0),
+ };
+
+ if (!string.IsNullOrWhiteSpace(item.BackgroundColor))
+ {
+ transformedColor = Color.FromHex(item.BackgroundColor);
+ View.BackgroundColor = transformedColor;
+ }
+
+ if (!string.IsNullOrWhiteSpace(item.CircleColor))
+ {
+ _statusCircle.Text = "\u25CF "; // ascii circle
+ _statusCircle.TextColor = Color.FromHex(item.CircleColor);
+ _statusCircle.FontSize = 30;
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ }
+ }
+
+ async void FastCompleteForCmd(object sender)
+ {
+ try
+ {
+ {
+ var item = BindingContext as ListItem;
+ bool success = true; // await _taskListManager.FastComplete(item);
+
+ if (success)
+ RefreshFromQuickComplete(this, new ListItemEventArgs(item));
+ }
+ }
+ catch (Exception ex)
+ {
+
+ }
+ }
+
+ }
+
+#if UITEST
+ [Test]
+ [Ignore("Fails sometimes - needs a better test")]
+ public void Bugzilla31114Test ()
+ {
+ if (RunningApp is iOSApp) {
+ for (int i = 0; i < 5; i++) {
+ RunningApp.DragCoordinates (10, 300, 10, 10);
+ }
+ RunningApp.Tap (q => q.Marked ("btnLoad"));
+ RunningApp.DragCoordinates (10, 300, 10, 10);
+ RunningApp.WaitForElement (q => q.Marked ("PIPE #1007"));
+ RunningApp.WaitForElement (q => q.Marked ("PIPE #1008"));
+ RunningApp.WaitForElement (q => q.Marked ("PIPE #1009"));
+ RunningApp.DragCoordinates (10, 300, 10, 10);
+ RunningApp.WaitForElement (q => q.Marked ("PIPE #1010"));
+ RunningApp.WaitForElement (q => q.Marked ("PIPE #1011"));
+ RunningApp.WaitForElement (q => q.Marked ("PIPE #1012"));
+ RunningApp.WaitForElement (q => q.Marked ("PIPE #1013"));
+ }
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31145.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31145.cs
new file mode 100644
index 00000000..9e1d7916
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31145.cs
@@ -0,0 +1,67 @@
+using System;
+using System.Threading.Tasks;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve(AllMembers = true)]
+ [Issue(IssueTracker.Bugzilla, 31145, "Picker cause memory leak holding entire Page in memory after it popped (WP8 SL only)", PlatformAffected.WinPhone)]
+ public class Bugzilla31145 : TestContentPage
+ {
+ WeakReference _page2Tracker;
+ Label _resultLabel;
+
+ protected override void Init()
+ {
+ var instructions = new Label () { Text = "The counter below should say 'Page2 IsAlive = false' after a short period of time. If the counter does not say that within 5 seconds, this test has failed." };
+ _resultLabel = new Label ();
+ Content = new StackLayout { Children = { instructions, _resultLabel } };
+ }
+
+ protected override async void OnAppearing()
+ {
+ base.OnAppearing();
+
+ if (_page2Tracker == null)
+ {
+ var page2 = new Bugzilla31145Page2();
+
+ _page2Tracker = new WeakReference(page2, false);
+
+ await Task.Yield();
+ await Navigation.PushModalAsync(page2);
+
+ StartTrackPage2();
+ }
+ }
+
+ async void StartTrackPage2()
+ {
+ var n = 0;
+ while (_page2Tracker.IsAlive)
+ {
+ _resultLabel.Text = $"Page2 IsAlive = {_page2Tracker.IsAlive} ({n++})";
+ await Task.Delay(1000);
+ GC.Collect();
+ }
+
+ _resultLabel.Text = $"Page2 IsAlive = {_page2Tracker.IsAlive}";
+ }
+ }
+
+ public class Bugzilla31145Page2 : ContentPage
+ {
+ public Bugzilla31145Page2()
+ {
+ Content = new Picker();
+ }
+
+ protected override async void OnAppearing()
+ {
+ base.OnAppearing();
+
+ await Task.Yield();
+ await Navigation.PopModalAsync();
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31255.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31255.cs
new file mode 100644
index 00000000..378077e0
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31255.cs
@@ -0,0 +1,88 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+using System.Threading.Tasks;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 31255, "Master's page Icon cause memory leak after MasterDetailPage is popped out by holding on page")]
+ public class Bugzilla31255 : TestContentPage // or TestMasterDetailPage, etc ...
+ {
+ protected override void Init ()
+ {
+ var stack = new StackLayout () { VerticalOptions = LayoutOptions.Center };
+
+ stack.Children.Add (new Label () { VerticalOptions =
+ LayoutOptions.Center, XAlign = TextAlignment.Center, Text = "Page 1"
+ });
+
+ Content = stack;
+
+ }
+
+ WeakReference _page2Tracker;
+
+ protected override async void OnAppearing ()
+ {
+ base.OnAppearing ();
+
+ if (_page2Tracker == null) {
+ var page2 = new Page2 ();
+
+ _page2Tracker = new WeakReference (page2, false);
+
+ await Task.Delay (1000);
+ await Navigation.PushModalAsync (page2);
+
+ StartTrackPage2 ();
+ }
+ }
+
+ async void StartTrackPage2 ()
+ {
+ while (true) {
+ ((Label)((StackLayout)Content).Children [0]).Text =
+ string.Format ("Page1. But Page2 IsAlive = {0}", _page2Tracker.IsAlive);
+ await Task.Delay (1000);
+ GC.Collect ();
+ }
+ }
+
+ [Preserve (AllMembers = true)]
+ public class Page2 : MasterDetailPage
+ {
+ public Page2 ()
+ {
+ Master = new Page () { Title = "Master",
+ Icon = "Icon.png"
+ };
+ Detail = new Page () { Title = "Detail" };
+ }
+
+ protected override async void OnAppearing ()
+ {
+ base.OnAppearing ();
+
+ await Task.Delay (1000);
+ await Navigation.PopModalAsync ();
+ }
+ }
+
+ #if UITEST
+ [Test]
+ [Ignore("Fails intermittently on TestCloud")]
+ public async void Bugzilla31255Test ()
+ {
+ RunningApp.Screenshot ("I am at Bugzilla 31255");
+ await Task.Delay (5000);
+ RunningApp.WaitForElement (q => q.Marked ("Page1. But Page2 IsAlive = False"));
+ }
+ #endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31330.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31330.cs
new file mode 100644
index 00000000..5f7e14ec
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31330.cs
@@ -0,0 +1,163 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+using System.Collections.ObjectModel;
+using System.Windows.Input;
+
+
+#if UITEST
+using Xamarin.UITest.iOS;
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 31330, "Disabled context actions appear enabled")]
+ public class Bugzilla31330 : TestContentPage
+ {
+ protected override void Init ()
+ {
+ var vm = new ListViewModel ();
+ BindingContext = vm;
+ vm.Init ();
+ var listview = new ListView ();
+ listview.SetBinding (ListView.ItemsSourceProperty, new Binding ("Items"));
+ listview.ItemTemplate = new DataTemplate (typeof(CustomTextCell));
+ listview.ItemSelected += (object sender, SelectedItemChangedEventArgs e) => {
+ (e.SelectedItem as ListItemViewModel).CanExecute = true;
+ ((e.SelectedItem as ListItemViewModel).DeleteItemCommand as Command).ChangeCanExecute ();
+ };
+ // Initialize ui here instead of ctor
+ Content = listview;
+ }
+
+ [Preserve (AllMembers = true)]
+ public class CustomTextCell : TextCell
+ {
+ public CustomTextCell ()
+ {
+ SetBinding (TextProperty, new Binding ("Title"));
+ var deleteMenuItem = new MenuItem ();
+ deleteMenuItem.Text = "Delete";
+ deleteMenuItem.IsDestructive = true;
+ deleteMenuItem.SetBinding (MenuItem.CommandProperty, new Binding ("DeleteItemCommand"));
+ ContextActions.Add (deleteMenuItem);
+ }
+ }
+
+ [Preserve (AllMembers = true)]
+ public class ListViewModel : ViewModel
+ {
+ public void Init ()
+ {
+ Items.Add (new ListItemViewModel (this) { Title = string.Format ("Something {0}", Items.Count.ToString ()) });
+ Items.Add (new ListItemViewModel (this) { Title = string.Format ("Something {0}", Items.Count.ToString ()) });
+ Items.Add (new ListItemViewModel (this) { Title = string.Format ("Something {0}", Items.Count.ToString ()) });
+ }
+
+ public ObservableCollection<ListItemViewModel> Items { get; } = new ObservableCollection<ListItemViewModel>();
+
+ ICommand _disabledCommand;
+
+ public ICommand DisabledCommand {
+ get {
+ if (_disabledCommand == null) {
+ _disabledCommand = new Command (() => {
+ }, () => false);
+ }
+
+ return _disabledCommand;
+ }
+ }
+
+ ICommand _addItemCommand;
+
+ public ICommand AddItemCommand {
+ get {
+ if (_addItemCommand == null) {
+ _addItemCommand = new Command (() => Items.Add (new ListItemViewModel (this) { Title = string.Format ("Something {0}", Items.Count.ToString ()) }));
+ }
+
+ return _addItemCommand;
+ }
+ }
+ }
+
+ [Preserve (AllMembers = true)]
+ public class ListItemViewModel : ViewModel
+ {
+ public bool CanExecute = false;
+ readonly ListViewModel _listViewModel;
+
+ public ListItemViewModel (ListViewModel listViewModel)
+ {
+ if (listViewModel == null) {
+ throw new ArgumentNullException ("listViewModel");
+ }
+ _listViewModel = listViewModel;
+ }
+
+ public string Title { get; set; }
+
+ ICommand _deleteItemCommand;
+
+ public ICommand DeleteItemCommand {
+ get {
+ if (_deleteItemCommand == null) {
+ _deleteItemCommand = new Command (() => _listViewModel.Items.Remove (this), () => CanExecute);
+ }
+
+ return _deleteItemCommand;
+ }
+ }
+
+ ICommand _otherCommand;
+
+ public ICommand OtherCommand {
+ get {
+ if (_otherCommand == null) {
+ _otherCommand = new Command (() => {
+ }, () => false);
+ }
+
+ return _otherCommand;
+ }
+ }
+ }
+
+ #if UITEST
+ [Test]
+ public void Bugzilla31330Test ()
+ {
+ var screenBounds = RunningApp.Query (q => q.Raw ("* index:0"))[0].Rect;
+
+ var cell = RunningApp.Query (c => c.Marked ("Something 1")) [0];
+ var cell2 = RunningApp.Query (c => c.Marked ("Something 2")) [0];
+ if (RunningApp is iOSApp) {
+ RunningApp.DragCoordinates (screenBounds.Width - 10, cell.Rect.CenterY, 0, cell.Rect.CenterY);
+ RunningApp.WaitForElement (c => c.Marked ("Delete"));
+ RunningApp.Tap (c => c.Marked ("Delete"));
+ RunningApp.WaitForElement (c => c.Marked ("Something 1"));
+ RunningApp.Tap (c => c.Marked ("Something 2"));
+ RunningApp.DragCoordinates (screenBounds.Width - 10, cell2.Rect.CenterY, 0, cell2.Rect.CenterY);
+ RunningApp.Tap (c => c.Marked ("Delete"));
+ RunningApp.WaitForNoElement (c => c.Marked ("Something 2"));
+ }
+ else {
+ RunningApp.TouchAndHoldCoordinates (cell.Rect.CenterX, cell.Rect.CenterY);
+ RunningApp.WaitForElement (c => c.Marked ("Delete"));
+ RunningApp.Tap (c => c.Marked ("Delete"));
+ RunningApp.Back ();
+ RunningApp.WaitForElement (c => c.Marked ("Something 1"));
+ RunningApp.Tap (c => c.Marked ("Something 2"));
+ RunningApp.TouchAndHoldCoordinates (cell2.Rect.CenterX, cell2.Rect.CenterY);
+ RunningApp.Tap (c => c.Marked ("Delete"));
+ RunningApp.WaitForNoElement (c => c.Marked ("Something 2"));
+ }
+
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31333.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31333.cs
new file mode 100644
index 00000000..3d8f68d7
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31333.cs
@@ -0,0 +1,256 @@
+using System;
+using System.Collections.ObjectModel;
+using System.ComponentModel;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using Xamarin.Forms.CustomAttributes;
+#if UITEST
+using NUnit.Framework;
+using Xamarin.UITest;
+
+#endif
+
+namespace Xamarin.Forms.Controls.TestCasesPages
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Bugzilla, 31333,
+ "Focus() on Entry in ViewCell brings up keyboard, but doesn't have cursor in EditText", PlatformAffected.Android)]
+ public class Bugzilla31333 : TestContentPage
+ {
+ [Preserve (AllMembers=true)]
+ public class Model31333 : INotifyPropertyChanged
+ {
+ public string Data
+ {
+ get { return _data; }
+ set
+ {
+ _data = value;
+ OnPropertyChanged ();
+ }
+ }
+
+ bool _isFocused = false;
+ string _data;
+
+ public bool IsFocused
+ {
+ get { return _isFocused; }
+ set
+ {
+ _isFocused = value;
+ OnPropertyChanged ();
+ }
+ }
+
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ protected virtual void OnPropertyChanged ([CallerMemberName] string propertyName = null)
+ {
+ PropertyChanged?.Invoke (this, new PropertyChangedEventArgs (propertyName));
+ }
+ }
+
+ [Preserve (AllMembers=true)]
+ public interface IHaveControlFocusedProperty
+ {
+ void SetBinding ();
+ }
+
+ [Preserve (AllMembers=true)]
+ public class ExtendedEntry : Entry, IHaveControlFocusedProperty
+ {
+ public static readonly BindableProperty IsControlFocusedProperty =
+ BindableProperty.Create ("IsControlFocused", typeof(bool), typeof(ExtendedEntry), false);
+
+ public bool IsControlFocused
+ {
+ get { return (bool)GetValue (IsControlFocusedProperty); }
+ set { SetValue (IsControlFocusedProperty, value); }
+ }
+
+ protected override void OnPropertyChanged (string propertyName = null)
+ {
+ base.OnPropertyChanged (propertyName);
+ if (propertyName == IsControlFocusedProperty.PropertyName) {
+ if (IsControlFocused) {
+ Focus ();
+ } else {
+ Unfocus ();
+ }
+ }
+ }
+
+ public void SetBinding ()
+ {
+ this.SetBinding (IsControlFocusedProperty, "IsFocused");
+ }
+ }
+
+ [Preserve (AllMembers=true)]
+ public class ExtendedEditor : Editor, IHaveControlFocusedProperty
+ {
+ public static readonly BindableProperty IsControlFocusedProperty =
+ BindableProperty.Create ("IsControlFocused", typeof(bool), typeof(ExtendedEditor), false);
+
+ public bool IsControlFocused
+ {
+ get { return (bool)GetValue (IsControlFocusedProperty); }
+ set { SetValue (IsControlFocusedProperty, value); }
+ }
+
+ protected override void OnPropertyChanged (string propertyName = null)
+ {
+ base.OnPropertyChanged (propertyName);
+ if (propertyName == IsControlFocusedProperty.PropertyName) {
+ if (IsControlFocused) {
+ Focus ();
+ } else {
+ Unfocus ();
+ }
+ }
+ }
+
+ public void SetBinding ()
+ {
+ this.SetBinding (IsControlFocusedProperty, "IsFocused");
+ }
+ }
+
+ [Preserve (AllMembers=true)]
+ public class ExtendedCell<T> : ViewCell where T : View, IHaveControlFocusedProperty
+ {
+ public ExtendedCell ()
+ {
+ var control = (T)Activator.CreateInstance (typeof(T));
+ control.SetBinding ();
+ control.HorizontalOptions = LayoutOptions.FillAndExpand;
+
+ View = new StackLayout {
+ Orientation = StackOrientation.Horizontal,
+ HorizontalOptions = LayoutOptions.StartAndExpand,
+ Children = {
+ control
+ }
+ };
+ }
+ }
+
+ StackLayout CreateListViewTestSection (Type controlType)
+ {
+ var name = controlType.GenericTypeArguments[0].Name;
+ name = name.Replace ("Extended", "");
+
+ var button = new Button () { Text = $"Focus {name} in ListView" };
+
+ var data = new ObservableCollection<Model31333> { new Model31333 () };
+
+ var listView = new ListView {
+ VerticalOptions = LayoutOptions.Start,
+ ItemsSource = data,
+ ItemTemplate = new DataTemplate (controlType)
+ };
+
+ button.Clicked += (sender, args) => {
+ var item = data[0];
+ if (item != null) {
+ item.IsFocused = !item.IsFocused;
+ }
+ };
+
+ return new StackLayout () { Children = { button, listView } };
+ }
+
+ StackLayout CreateTableViewTestSection<T> () where T : View, IHaveControlFocusedProperty
+ {
+ var name = typeof(T).Name;
+ name = name.Replace ("Extended", "");
+
+ var button = new Button () { Text = $"Focus {name} in Table" };
+
+ var data = new Model31333 ();
+
+ var tableView = new TableView {
+ VerticalOptions = LayoutOptions.Start
+ };
+
+ var tableRoot = new TableRoot();
+ var tableSection = new TableSection();
+
+ var cell = new ExtendedCell<T> ();
+
+ cell.BindingContext = data;
+
+ tableSection.Add(cell);
+ tableRoot.Add (tableSection);
+ tableView.Root = tableRoot;
+
+ button.Clicked += (sender, args) => {
+ var item = data;
+ if (item != null) {
+ item.IsFocused = !item.IsFocused;
+ }
+ };
+
+ return new StackLayout () { Children = { button, tableView } };
+ }
+
+ protected override void Init ()
+ {
+ var entrySection = CreateListViewTestSection (typeof(ExtendedCell<ExtendedEntry>));
+ var editorSection = CreateListViewTestSection (typeof(ExtendedCell<ExtendedEditor>));
+
+ var entryTableSection = CreateTableViewTestSection<ExtendedEntry> ();
+ var editorTableSection = CreateTableViewTestSection<ExtendedEditor> ();
+
+ Content = new StackLayout () { Children = { entrySection, editorSection, entryTableSection, editorTableSection } };
+ }
+
+#if UITEST
+ [Test]
+ [UiTest (typeof(NavigationPage))]
+ public void Issue31333FocusEntryInListViewCell ()
+ {
+ RunningApp.Tap (q => q.Marked ("Focus Entry in ListView"));
+ RunningApp.Screenshot ("Entry control in ListView cell is focused");
+ RunningApp.EnterText ("Entry in ListView Success");
+ Assert.True(RunningApp.Query(query => query.Text("Entry in ListView Success")).Length > 0);
+ RunningApp.Screenshot ("Entry in ListView Success");
+ }
+
+ [Test]
+ [UiTest (typeof(NavigationPage))]
+ public void Issue31333FocusEditorInListViewCell ()
+ {
+ RunningApp.Tap (q => q.Marked ("Focus Editor in ListView"));
+ RunningApp.Screenshot ("Editor control in ListView cell is focused");
+ RunningApp.EnterText ("Editor in ListView Success");
+ Assert.True(RunningApp.Query(query => query.Text("Editor in ListView Success")).Length > 0);
+ RunningApp.Screenshot ("Editor in ListView Success");
+ }
+
+
+ [Test]
+ [UiTest (typeof(NavigationPage))]
+ public void Issue31333FocusEntryInTableViewCell ()
+ {
+ RunningApp.Tap (q => q.Marked ("Focus Entry in Table"));
+ RunningApp.Screenshot ("Entry control in TableView cell is focused");
+ RunningApp.EnterText ("Entry in TableView Success");
+ Assert.True(RunningApp.Query(query => query.Text("Entry in TableView Success")).Length > 0);
+ RunningApp.Screenshot ("Entry in TableView Success");
+ }
+
+ [Test]
+ [UiTest (typeof(NavigationPage))]
+ public void Issue31333FocusEditorInTableViewCell ()
+ {
+ RunningApp.Tap (q => q.Marked ("Focus Editor in Table"));
+ RunningApp.Screenshot ("Editor control in TableView cell is focused");
+ RunningApp.EnterText ("Editor in TableView Success");
+ Assert.True(RunningApp.Query(query => query.Text("Editor in TableView Success")).Length > 0);
+ RunningApp.Screenshot ("Editor in TableView Success");
+ }
+#endif
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31366.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31366.cs
new file mode 100644
index 00000000..75853f1d
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31366.cs
@@ -0,0 +1,85 @@
+using System;
+using System.Threading.Tasks;
+using Xamarin.Forms.CustomAttributes;
+#if UITEST
+using NUnit.Framework;
+using Xamarin.UITest;
+
+#endif
+
+namespace Xamarin.Forms.Controls.TestCasesPages
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 31366, "Pushing and then popping a page modally causes ArgumentOutOfRangeException",
+ PlatformAffected.All)]
+ public class Bugzilla31366 : TestNavigationPage
+ {
+ protected override void Init ()
+ {
+ var page1 = new ContentPage () { Title = "Page1" };
+
+ var successLabel = new Label ();
+ var startPopOnAppearing = new Button () { Text = "Start PopOnAppearing Test" };
+ var startModalStack = new Button () { Text = "Start ModalStack Test" };
+
+ page1.Content = new StackLayout () {
+ Children = { startPopOnAppearing, startModalStack, successLabel }
+ };
+
+ var popOnAppearing = new ContentPage () {
+ Title = "PopOnAppearing",
+ Content = new StackLayout ()
+ };
+
+ popOnAppearing.Appearing += async (sender, args) => {
+ await Task.Yield ();
+ await popOnAppearing.Navigation.PopModalAsync ();
+ };
+
+ startPopOnAppearing.Clicked += async (sender, args) => {
+ successLabel.Text = string.Empty;
+
+ await page1.Navigation.PushModalAsync (popOnAppearing);
+
+ successLabel.Text = "If this is visible, the PopOnAppearing test has passed.";
+ };
+
+ startModalStack.Clicked += async (sender, args) => {
+ successLabel.Text = string.Empty;
+
+ var intermediatePage = new ContentPage () {
+ Content = new StackLayout () {
+ Children = {
+ new Label () { Text = "If this is visible, the modal stack test has passed." }
+ }
+ }
+ };
+
+ await intermediatePage.Navigation.PushModalAsync (popOnAppearing);
+
+ await page1.Navigation.PushModalAsync (intermediatePage);
+ };
+
+ PushAsync (page1);
+ }
+
+
+#if UITEST
+ [Test]
+ [UiTest (typeof (NavigationPage))]
+ public void Issue31366PushingAndPoppingModallyCausesArgumentOutOfRangeException ()
+ {
+ RunningApp.Tap (q => q.Marked ("Start PopOnAppearing Test"));
+ RunningApp.WaitForElement (q => q.Marked ("If this is visible, the PopOnAppearing test has passed."));
+ }
+
+ [Test]
+ [UiTest (typeof (NavigationPage))]
+ public void Issue31366PushingWithModalStackCausesIncorrectStackOrder ()
+ {
+ RunningApp.Tap (q => q.Marked ("Start ModalStack Test"));
+ RunningApp.WaitForElement (q => q.Marked ("If this is visible, the modal stack test has passed."));
+ }
+#endif
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31395.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31395.cs
new file mode 100644
index 00000000..57b9b98c
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31395.cs
@@ -0,0 +1,54 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ // don't forget to update C:\Users\chrisk\Documents\git\DuploBuddy\Xamarin.Forms.ControlGallery.Android\LinkerRoots.cs
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 31395, "Crash when switching MainPage and using a Custom Render")]
+ public class Bugzilla31395 : TestContentPage // or TestMasterDetailPage, etc ...
+ {
+ protected override void Init ()
+ {
+ Content = new CustomContentView { // Replace with ContentView and everything works fine
+ Content = new StackLayout {
+ VerticalOptions = LayoutOptions.Center,
+ Children = {
+ new Button {
+ Text = "Switch Main Page",
+ Command = new Command (() => SwitchMainPage ())
+ }
+ }
+ }
+ };
+ }
+
+ void SwitchMainPage ()
+ {
+ Application.Current.MainPage = new ContentPage { Content = new Label { Text = "Hello" } };
+ }
+
+ public class CustomContentView : ContentView
+ {
+
+ }
+
+ #if UITEST
+ [Test]
+ public void Bugzilla31395Test ()
+ {
+ RunningApp.WaitForElement (q => q.Marked ("Switch Main Page"));
+ Assert.DoesNotThrow (() => {
+ RunningApp.Tap (c => c.Marked ("Switch Main Page"));
+ });
+ RunningApp.WaitForElement (q => q.Marked ("Hello"));
+ }
+ #endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31602.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31602.cs
new file mode 100644
index 00000000..86e8bcb4
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31602.cs
@@ -0,0 +1,130 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+using System.ComponentModel;
+using System.Runtime.CompilerServices;
+using System.Windows.Input;
+
+#if UITEST
+using Xamarin.UITest;
+using Xamarin.UITest.iOS;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 31602, "not possible to programmatically open master page after iPad landscape -> portrait rotation, also tests 31664")]
+ public class Bugzilla31602 : TestMasterDetailPage
+ {
+ protected override void Init ()
+ {
+ BindingContext = new MasterViewModel1 ();
+ ((MasterViewModel1)BindingContext).MasterPage = this;
+
+ Master = new SidemenuPage ();
+ Detail = new NavigationPage (new DetailPage1 (Master as SidemenuPage));
+ }
+
+ public class SidemenuPage : ContentPage
+ {
+ public SidemenuPage ()
+ {
+ Title = "Side";
+ Icon = "menuIcon.png";
+ var lbl = new Label { Text = "SideMenu" };
+ var btn = new Button { Text = "Menu Opener" };
+
+ btn.SetBinding (Button.CommandProperty, new Binding ("OpenSideMenuCommand"));
+
+ var stackpanel = new StackLayout { VerticalOptions = LayoutOptions.Center };
+
+ stackpanel.Children.Add (btn);
+ stackpanel.Children.Add (lbl);
+ Content = stackpanel;
+ }
+
+ public void ChangeIcon() {
+ Icon = "bank.png";
+ }
+ }
+
+ public class DetailPage1 : ContentPage
+ {
+ SidemenuPage _sideMenu;
+
+ public DetailPage1 (SidemenuPage menu)
+ {
+ _sideMenu = menu;
+ Title = "Detail";
+ var btns = new Button { Text = "Change Icon" };
+ btns.Clicked += (object sender, EventArgs e) => {
+ _sideMenu.ChangeIcon();
+ };
+ var btn = new Button { Text = "Sidemenu Opener" };
+ btn.SetBinding (Button.CommandProperty, new Binding ("OpenSideMenuCommand"));
+ Content = new StackLayout { Children = { btns, btn} };
+ }
+ }
+
+ [Preserve (AllMembers = true)]
+ public class MasterViewModel1 : INotifyPropertyChanged
+ {
+ public MasterDetailPage MasterPage;
+
+ public event PropertyChangedEventHandler PropertyChanged = delegate { };
+
+ protected void OnPropertyChanged ([CallerMemberName] string propertyName = null)
+ {
+ if (PropertyChanged != null) {
+ PropertyChanged (this, new PropertyChangedEventArgs (propertyName));
+ }
+ }
+
+ bool _isMenuOpen;
+
+ public bool IsMenuOpen {
+ get { return _isMenuOpen; }
+ private set {
+ if (_isMenuOpen != value) {
+ System.Diagnostics.Debug.WriteLine ("setting new sidemenu visibility flag to: " + value);
+ _isMenuOpen = value;
+ OnPropertyChanged ();
+ }
+ }
+ }
+
+ public ICommand OpenSideMenuCommand { get; private set; }
+
+ public MasterViewModel1 ()
+ {
+ IsMenuOpen = true;
+ OpenSideMenuCommand = new Command (OpenSideMenu);
+ }
+
+ void OpenSideMenu ()
+ {
+ IsMenuOpen = true;
+ MasterPage.IsPresented = IsMenuOpen;
+ }
+ }
+
+ #if UITEST
+ [Test]
+ public void Bugzilla31602Test ()
+ {
+ var appAs = RunningApp as iOSApp;
+ if (appAs != null && appAs.Device.IsTablet) {
+ RunningApp.Tap (q => q.Marked ("Sidemenu Opener"));
+ RunningApp.WaitForElement (q => q.Marked ("SideMenu"));
+ RunningApp.SetOrientationLandscape ();
+ RunningApp.WaitForElement (q => q.Marked ("SideMenu"));
+ RunningApp.SetOrientationPortrait ();
+ RunningApp.WaitForNoElement (q => q.Marked ("SideMenu"));
+ RunningApp.Tap (q => q.Marked ("Sidemenu Opener"));
+ RunningApp.WaitForElement (q => q.Marked ("SideMenu"));
+ }
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31964.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31964.cs
new file mode 100644
index 00000000..da673f8f
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31964.cs
@@ -0,0 +1,116 @@
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Runtime.CompilerServices;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 31964, "[Xamarin.Forms SwitchCell]OnChange() did not work for Windows platform",
+ PlatformAffected.WinRT)]
+ public class Bugzilla31964 : TestContentPage
+ {
+ protected override void Init ()
+ {
+ var listView = new ListView ();
+
+ var selection = new Selection ();
+ listView.SetBinding (ListView.ItemsSourceProperty, "Items");
+
+ listView.ItemTemplate = new DataTemplate (() => {
+ var cell = new SwitchCell ();
+ cell.SetBinding (SwitchCell.TextProperty, "Name");
+ cell.SetBinding (SwitchCell.OnProperty, "IsSelected", BindingMode.TwoWay);
+ return cell;
+ });
+
+ var instructions = new Label {
+ FontSize = 16,
+ Text =
+ "The label at the bottom should equal the number of switches which are in the 'on' position. Flip some of the switches. If the number at the bottom does not equal the number of 'on' switches, the test has failed."
+ };
+
+ var label = new Label { FontSize = 24 };
+ label.SetBinding (Label.TextProperty, "SelectedCount");
+
+ Content = new StackLayout {
+ VerticalOptions = LayoutOptions.Fill,
+ Children = {
+ instructions,
+ listView,
+ label
+ }
+ };
+
+ BindingContext = selection;
+ }
+
+ [Preserve (AllMembers = true)]
+ public class SelectionItem : INotifyPropertyChanged
+ {
+ bool _isSelected;
+
+ public string Name { get; set; }
+
+ public bool IsSelected
+ {
+ get { return _isSelected; }
+ set
+ {
+ _isSelected = value;
+ OnPropertyChanged ();
+ }
+ }
+
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ void OnPropertyChanged ([CallerMemberName] string propertyName = null)
+ {
+ PropertyChanged?.Invoke (this, new PropertyChangedEventArgs (propertyName));
+ }
+ }
+
+ [Preserve (AllMembers = true)]
+ public class Selection : INotifyPropertyChanged
+ {
+ int _selectedCount;
+
+ public Selection ()
+ {
+ Items = new List<SelectionItem> {
+ new SelectionItem { Name = "Item1" },
+ new SelectionItem { Name = "Item2" },
+ new SelectionItem { Name = "Item3", IsSelected = true },
+ new SelectionItem { Name = "Item4" },
+ new SelectionItem { Name = "Item5" }
+ };
+
+ SelectedCount = Items.Count (i => i.IsSelected);
+
+ foreach (SelectionItem selectionItem in Items) {
+ selectionItem.PropertyChanged += (sender, args) => SelectedCount = Items.Count (i => i.IsSelected);
+ }
+ }
+
+ public List<SelectionItem> Items { get; }
+
+ public int SelectedCount
+ {
+ get { return _selectedCount; }
+ set
+ {
+ _selectedCount = value;
+ OnPropertyChanged ();
+ }
+ }
+
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ void OnPropertyChanged ([CallerMemberName] string propertyName = null)
+ {
+ PropertyChanged?.Invoke (this, new PropertyChangedEventArgs (propertyName));
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31967.xaml b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31967.xaml
new file mode 100644
index 00000000..3cc33841
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31967.xaml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+ x:Class="Xamarin.Forms.Controls.Bugzilla31967">
+ <Grid VerticalOptions="Start"
+ Padding = "20">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="auto" />
+ <RowDefinition Height="{Binding Path=ToolbarHeight,Mode=TwoWay}" />
+ </Grid.RowDefinitions>
+ <Button Text="Click"
+ Command="{Binding Fire}"/>
+ <Label Grid.Row="1"
+ Text="Hello there"
+ BackgroundColor="Red"
+ VerticalOptions="FillAndExpand"/>
+ </Grid>
+</ContentPage> \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31967.xaml.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31967.xaml.cs
new file mode 100644
index 00000000..acb8230e
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31967.xaml.cs
@@ -0,0 +1,47 @@
+using System;
+using System.Collections.Generic;
+
+using Xamarin.Forms.CustomAttributes;
+
+using Xamarin.Forms;
+using System.ComponentModel;
+
+namespace Xamarin.Forms.Controls
+{
+#if APP
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 31967, "Grid Layout on Bound RowDefinition")]
+ public partial class Bugzilla31967 : ContentPage
+ {
+ public Bugzilla31967 ()
+ {
+ InitializeComponent ();
+ BindingContext = new Bugzilla31967Vm ();
+ }
+
+ public class Bugzilla31967Vm: INotifyPropertyChanged {
+ public Command Fire {
+ get { return new Command (() => ToolbarHeight = 50); }
+ }
+
+ GridLength _toolbarHeight;
+ public GridLength ToolbarHeight {
+ get { return _toolbarHeight; }
+ set {
+ _toolbarHeight = value;
+ OnPropertyChanged ("ToolbarHeight");
+ }
+ }
+
+ protected void OnPropertyChanged (string propertyName)
+ {
+ var handler = PropertyChanged;
+ if (handler != null)
+ handler (this, new PropertyChangedEventArgs (propertyName));
+ }
+
+ public event PropertyChangedEventHandler PropertyChanged;
+ }
+ }
+#endif
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32034.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32034.cs
new file mode 100644
index 00000000..97ccad1a
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32034.cs
@@ -0,0 +1,31 @@
+using System.Collections.Generic;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Bugzilla, 32034, "MissingMethodException while pushing and popping pages",PlatformAffected.Android, NavigationBehavior.PushModalAsync)]
+ public class Bugzilla32034 : NavigationPage
+ {
+ public class ButtonPage : ContentPage
+ {
+ public ButtonPage ()
+ {
+ Content = new StackLayout {
+ Children = {
+ new Button {
+ Text = "Push", Command = new Command (o => ((NavigationPage) Parent).PushAsync (new ButtonPage ()))
+ },
+ new Button {
+ Text = "Pop", Command = new Command (o => ((NavigationPage) Parent).Navigation.PopAsync ())
+ },
+ },
+ };
+ }
+ }
+
+ public Bugzilla32034 () : base (new ButtonPage ())
+ {
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32040.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32040.cs
new file mode 100644
index 00000000..a6d9c830
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32040.cs
@@ -0,0 +1,59 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 32040, "EntryCell.Tapped or SwitchCell.Tapped does not fire when within a TableView ")]
+ public class Bugzilla32040 : TestContentPage // or TestMasterDetailPage, etc ...
+ {
+ protected override void Init ()
+ {
+ var switchCell = new SwitchCell { Text = "blahblah" };
+ switchCell.Tapped += (s, e) =>
+ {
+ switchCell.Text = "Tapped";
+ };
+ switchCell.OnChanged += (sender, e) => {
+ switchCell.Text = "Switched";
+ };
+
+ var entryCell = new EntryCell { Text = "yaddayadda" };
+ entryCell.XAlign = TextAlignment.End;
+ entryCell.Label = "Click Here";
+ entryCell.Tapped += (s, e) =>
+ {
+ entryCell.Text = "Tapped";
+ };
+ entryCell.Completed += (sender, e) => {
+ entryCell.Text = "Completed";
+ };
+
+ // The root page of your application
+ Content = new TableView {
+ Intent = TableIntent.Form,
+ Root = new TableRoot ("Table Title") {
+ new TableSection ("Section 1 Title") {
+ switchCell,
+ entryCell
+ }
+ }
+ };
+ }
+#if UITEST
+ [Test]
+ public void TappedWorksForEntryAndSwithCellTest ()
+ {
+ RunningApp.Tap (q => q.Marked ("blahblah"));
+ RunningApp.Tap (q => q.Marked ("Click Here"));
+ Assert.GreaterOrEqual (RunningApp.Query (q => q.Marked ("Tapped")).Length, 2);
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32148.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32148.cs
new file mode 100644
index 00000000..76e3819b
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32148.cs
@@ -0,0 +1,240 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+using System.Linq.Expressions;
+using System.Threading.Tasks;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Collections.Generic;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 32148, " Pull to refresh hides the first item on a list view")]
+ public class Bugzilla32148 : TestContentPage // or TestMasterDetailPage, etc ...
+ {
+ Button _searchBtn;
+ ListView _contactsListView;
+ ObservableCollection<Grouping1<string, ContactViewModel1>> _listViewItemSource;
+
+ protected override void Init ()
+ {
+ Title = "Contacts";
+ Content = CreateContent();
+ // Disable the await warning
+ #pragma warning disable 4014
+ LoadContactsAsync();
+ #pragma warning restore 4014
+ }
+
+ Layout CreateContent()
+ {
+ _listViewItemSource = new ObservableCollection<Grouping1<string, ContactViewModel1>>();
+
+ _contactsListView = new ListView()
+ {
+ ItemsSource = _listViewItemSource,
+ IsPullToRefreshEnabled = true,
+ IsGroupingEnabled = true,
+ GroupShortNameBinding = new Binding("Key"),
+ GroupHeaderTemplate = new DataTemplate(typeof(HeaderCell)),
+ HasUnevenRows = true,
+ ItemTemplate = new DataTemplate(typeof(ContactItemTemplate))
+ };
+
+ _contactsListView.Refreshing += contactsListView_Refreshing;
+ _searchBtn = new Button() { Text = "Search" };
+ _searchBtn.Clicked += (object sender, EventArgs e) => _contactsListView.BeginRefresh ();
+
+ Grid grd = new Grid ();
+ grd.RowDefinitions.Add (new RowDefinition () { Height = GridLength.Auto } );
+ grd.RowDefinitions.Add (new RowDefinition ());
+ grd.Children.Add (_searchBtn);
+ grd.Children.Add (_contactsListView);
+ Grid.SetRow (_contactsListView, 1);
+ return grd;
+ }
+
+ async void contactsListView_Refreshing(object sender, EventArgs e)
+ {
+ await Task.Delay (1000);
+ await LoadContactsAsync(true);
+ }
+
+ async Task LoadContactsAsync(bool isPullToRefresh = false)
+ {
+ await ReadFromDbAsync();
+ _contactsListView.IsRefreshing &= !isPullToRefresh;
+ }
+
+ async Task ReadFromDbAsync(Expression<Func<Contact1, bool>> searchExpression = null)
+ {
+ await Task.Run(() =>
+ {
+ Device.BeginInvokeOnMainThread(() =>
+ {
+ // If we want to filter the data, GetItems by expression
+ IList<Contact1> contactEntities = new List<Contact1>();
+ List<ContactViewModel1> data = new List<ContactViewModel1>();
+
+ if (contactEntities == null || contactEntities.Count == 0)
+ {
+ // Fill with dummy contacts
+ for (int i = 0; i < 20; i++)
+ {
+ Contact1 contact = new Contact1()
+ {
+ FirstName = "Contact" + i,
+ LastName = "LastName",
+ Company = "Company" + i
+ } ;
+ contactEntities.Add(contact);
+ }
+ }
+
+ // Create Contact items for the listView
+ foreach (Contact1 contact in contactEntities)
+ {
+ ContactViewModel1 contactItem = new ContactViewModel1()
+ {
+ FirstName = contact.FirstName,
+ LastName = contact.LastName,
+ FullName = contact.FirstName + " " + contact.LastName,
+ Company = contact.Company,
+ } ;
+
+ data.Add(contactItem);
+ }
+
+ // Sort, order and group the contacts
+ var contacts = from contact in data
+ orderby contact.LastName, contact.FirstName
+ group contact by contact.FirstNameSort into contactGroup
+ select new Grouping1<string, ContactViewModel1>(contactGroup.Key, contactGroup);
+
+ // Create a new collection of groups
+ var grouppedContacts = new ObservableCollection<Grouping1<string, ContactViewModel1>>(contacts);
+
+ _contactsListView.ItemsSource = grouppedContacts;
+ } );
+ } );
+ }
+
+ public class Grouping1<K, T> : ObservableCollection<T>
+ {
+ public K Key { get; private set; }
+
+ public Grouping1(K key, IEnumerable<T> items)
+ {
+ Key = key;
+ foreach (T item in items)
+ {
+ Items.Add(item);
+ }
+ }
+ }
+
+ [Preserve (AllMembers = true)]
+ public class ContactViewModel1
+ {
+ public string FirstName { get; set; }
+ public string LastName { get; set; }
+ public string FullName { get; set; }
+ public string Company { get; set; }
+ public ImageSource IconSource { get; set; }
+
+ public string FirstNameSort
+ {
+ get
+ {
+ if (string.IsNullOrWhiteSpace(FirstName) || FirstName.Length == 0)
+ {
+ return "?";
+ }
+
+ return FirstName[0].ToString().ToUpper();
+ }
+ }
+ }
+
+ [Preserve (AllMembers = true)]
+ public class Contact1
+ {
+ public string FirstName { get; set; }
+ public string LastName { get; set; }
+ public string Company { get; set; }
+ public byte[] ProfilePicture { get; set; }
+ public string Email { get; set; }
+ public string Mobile { get; set; }
+ public string RoomNumber { get; set; }
+ public string Street { get; set; }
+ public string Zip { get; set; }
+ public string City { get; set; }
+ public string CountryCode { get; set; }
+ }
+
+ [Preserve (AllMembers = true)]
+ public class HeaderCell : ViewCell
+ {
+ public HeaderCell()
+ {
+ Height = 23;
+
+ Label title = new Label
+ {
+ TextColor = Color.White,
+ VerticalOptions = LayoutOptions.Center
+ } ;
+
+ title.SetBinding(Label.TextProperty, "Key");
+
+ View = new StackLayout
+ {
+ HorizontalOptions = LayoutOptions.FillAndExpand,
+ HeightRequest = 23,
+ BackgroundColor = Color.Pink,
+ Orientation = StackOrientation.Horizontal,
+ Padding = new Thickness(Sizes.GroupingSidePadding, 0, 0, 0),
+ Children = { title }
+ };
+ }
+
+ struct Sizes
+ {
+ public static readonly double GroupingSidePadding = 5;
+ }
+ }
+
+ [Preserve (AllMembers = true)]
+ public class ContactItemTemplate : ImageCell
+ {
+ public ContactItemTemplate()
+ : base()
+ {
+
+ SetBinding(TextProperty, new Binding("FullName"));
+ SetBinding(DetailProperty, new Binding("Company"));
+ SetBinding(ImageSourceProperty, new Binding("IconSource"));
+
+ Height = 50;
+ }
+ }
+
+ #if UITEST
+ [Test]
+ public void Bugzilla32148Test ()
+ {
+ RunningApp.WaitForElement (q => q.Marked ("Contact0 LastName"));
+ RunningApp.Tap (q => q.Marked("Search"));
+ RunningApp.WaitForElement (q => q.Marked ("Contact0 LastName"));
+ RunningApp.Screenshot ("For manual review, is the first cell visible?");
+ }
+ #endif
+ }
+
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32230.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32230.cs
new file mode 100644
index 00000000..e7d99b06
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32230.cs
@@ -0,0 +1,59 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 32230, "isPresentedChanged raises multiple times")]
+ public class Bugzilla32230 : TestMasterDetailPage // or TestMasterDetailPage, etc ...
+ {
+ Label _lblCount;
+ Button _btnOpen;
+ Button _btnClose;
+ int _count;
+
+ protected override void Init ()
+ {
+ _lblCount = new Label { Text = _count.ToString (), AutomationId = "lblCount" };
+ _btnOpen = new Button { Text = "Open", AutomationId = "btnOpen",
+ Command = new Command (() => {
+ IsPresented = true;
+ })
+ };
+ _btnClose = new Button { Text = "Close", AutomationId = "btnClose",
+ Command = new Command (() => {
+ IsPresented = false;
+ })
+ };
+
+ Master = new ContentPage {
+ Title = "Master",
+ Content = new StackLayout { Children = { _lblCount, _btnClose } }
+ };
+
+ Detail = new NavigationPage (new ContentPage { Content = _btnOpen });
+ IsPresentedChanged += (object sender, EventArgs e) => {
+ _count++;
+ _lblCount.Text = _count.ToString();
+ };
+ }
+
+#if UITEST
+ [Test]
+ public void Bugzilla32230Test ()
+ {
+ RunningApp.Tap (q => q.Marked ("btnOpen"));
+ Assert.AreEqual ("1", RunningApp.Query (q => q.Marked ("lblCount"))[0].Text);
+ RunningApp.Tap (q => q.Marked ("btnClose"));
+ RunningApp.Tap (q => q.Marked ("btnOpen"));
+ Assert.AreEqual ("3", RunningApp.Query (q => q.Marked ("lblCount"))[0].Text);
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32447.xaml b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32447.xaml
new file mode 100644
index 00000000..654cf820
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32447.xaml
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<local:TestContentPage xmlns="http://xamarin.com/schemas/2014/forms"
+ xmlns:local="clr-namespace:Xamarin.Forms.Controls"
+xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="Xamarin.Forms.Controls.Bugzilla32447">
+ <local:TestContentPage.Content>
+ <TableView HasUnevenRows="true" Intent="Form" BackgroundColor="#DADEE3">
+ <TableRoot>
+ <TableSection Title="Section 1">
+ <ViewCell >
+ <Label Text="Sample" />
+ </ViewCell>
+ <ViewCell >
+ <Picker Title = "Gender" HorizontalOptions="Start">
+ <Picker.Items>
+ <x:String>Male</x:String>
+ <x:String>Female</x:String>
+ <x:String>N/A</x:String>
+ </Picker.Items>
+ </Picker>
+ </ViewCell>
+
+ <ViewCell >
+ <Label Text="Sample" />
+ </ViewCell>
+
+ <ViewCell >
+ <Picker Title = "Gender" HorizontalOptions="Start">
+ <Picker.Items>
+ <x:String>Male</x:String>
+ <x:String>Female</x:String>
+ <x:String>N/A</x:String>
+ </Picker.Items>
+ </Picker>
+ </ViewCell>
+ <ViewCell >
+ <Picker Title = "Gender" HorizontalOptions="Start">
+ <Picker.Items>
+ <x:String>Male</x:String>
+ <x:String>Female</x:String>
+ <x:String>N/A</x:String>
+ </Picker.Items>
+ </Picker>
+ </ViewCell>
+
+ <ViewCell >
+ <Label Text="Sample" />
+ </ViewCell>
+
+ <ViewCell >
+ <Picker Title = "Gender" HorizontalOptions="Start">
+ <Picker.Items>
+ <x:String>Male</x:String>
+ <x:String>Female</x:String>
+ <x:String>N/A</x:String>
+ </Picker.Items>
+ </Picker>
+ </ViewCell>
+ </TableSection>
+
+ <TableSection Title="Section 2">
+ <ViewCell >
+ <Picker x:Name="genderPicker" Title = "Gender" HorizontalOptions="Start">
+ <Picker.Items>
+ <x:String>Male</x:String>
+ <x:String>Female</x:String>
+ <x:String>N/A</x:String>
+ </Picker.Items>
+ </Picker>
+ </ViewCell>
+ <ViewCell >
+ <Picker Title = "Gender" HorizontalOptions="Start">
+ <Picker.Items>
+ <x:String>Male</x:String>
+ <x:String>Female</x:String>
+ <x:String>N/A</x:String>
+ </Picker.Items>
+ </Picker>
+ </ViewCell>
+
+ <ViewCell >
+ <Label Text="Sample" />
+ </ViewCell>
+
+ <ViewCell >
+ <Picker Title = "Gender" HorizontalOptions="Start">
+ <Picker.Items>
+ <x:String>Male</x:String>
+ <x:String>Female</x:String>
+ <x:String>N/A</x:String>
+ </Picker.Items>
+ </Picker>
+ </ViewCell>
+ <ViewCell >
+ <Label Text="Sample" />
+ </ViewCell>
+
+ <ViewCell >
+ <Picker Title = "Gender" HorizontalOptions="Start">
+ <Picker.Items>
+ <x:String>Male</x:String>
+ <x:String>Female</x:String>
+ <x:String>N/A</x:String>
+ </Picker.Items>
+ </Picker>
+ </ViewCell>
+
+ <ViewCell >
+ <Label Text="Sample" />
+ </ViewCell>
+ </TableSection>
+
+ <TableSection Title="Section 2">
+ <ViewCell >
+ <Picker Title = "Gender" HorizontalOptions="Start">
+ <Picker.Items>
+ <x:String>Male</x:String>
+ <x:String>Female</x:String>
+ <x:String>N/A</x:String>
+ </Picker.Items>
+ </Picker>
+ </ViewCell>
+
+ <ViewCell >
+ <Label Text="Sample" />
+ </ViewCell>
+
+ <ViewCell >
+ <Label Text="Sample" />
+ </ViewCell>
+ <ViewCell >
+ <Picker Title = "Gender" HorizontalOptions="Start">
+ <Picker.Items>
+ <x:String>Male</x:String>
+ <x:String>Female</x:String>
+ <x:String>N/A</x:String>
+ </Picker.Items>
+ </Picker>
+ </ViewCell>
+ <ViewCell >
+ <Picker Title = "Gender" HorizontalOptions="Start">
+ <Picker.Items>
+ <x:String>Male</x:String>
+ <x:String>Female</x:String>
+ <x:String>N/A</x:String>
+ </Picker.Items>
+ </Picker>
+ </ViewCell>
+
+ <ViewCell >
+ <Label Text="Sample" />
+ </ViewCell>
+ <ViewCell >
+ <Label Text="Sample" />
+ </ViewCell>
+ </TableSection>
+
+ </TableRoot>
+ </TableView>
+ </local:TestContentPage.Content>
+</local:TestContentPage>
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32447.xaml.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32447.xaml.cs
new file mode 100644
index 00000000..719b10d0
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32447.xaml.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+
+using Xamarin.Forms;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 32447, "[iOS] App crash when scrolling quickly through a TableView that has Pickers in the cells.", PlatformAffected.iOS)]
+ public partial class Bugzilla32447 : TestContentPage
+ {
+ public Bugzilla32447 ()
+ {
+ #if APP
+
+ InitializeComponent ();
+
+ #endif
+ }
+
+ protected override void Init ()
+ {
+
+ }
+ }
+}
+
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32462.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32462.cs
new file mode 100644
index 00000000..86d75e99
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32462.cs
@@ -0,0 +1,57 @@
+using System;
+using System.Linq;
+
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 32462, "Crash after a page disappeared if a ScrollView is in the HeaderTemplate property of a ListView", PlatformAffected.Android)]
+ public class Bugzilla32462 : TestContentPage // or TestMasterDetailPage, etc ...
+ {
+ [Preserve (AllMembers = true)]
+ public class ListViewPage : ContentPage
+ {
+ public ListViewPage ()
+ {
+ var scrollview = new ScrollView {
+ Orientation = ScrollOrientation.Horizontal,
+ Content = new Label { Text = "some looooooooooooooooooooooooooooooooooooooooooooooooooooooog text" }
+ };
+ var stacklayout = new StackLayout ();
+ stacklayout.Children.Add (scrollview);
+ string[] list = Enumerable.Range (0, 40).Select (c => $"some text {c}").ToArray ();
+ var listview = new ListView { AutomationId = "listview", Header = stacklayout, ItemsSource = list };
+ Content = listview;
+
+ listview.ScrollTo (list[39], ScrollToPosition.Center, false);
+ }
+ }
+
+ protected override void Init ()
+ {
+ var button = new Button {
+ Text = "Click!",
+ };
+ button.Clicked += (object sender, EventArgs e) => Navigation.PushAsync (new ListViewPage ());
+ Content = button;
+ }
+
+#if UITEST
+ [Test]
+ public void Bugzilla36729Test ()
+ {
+ RunningApp.WaitForElement (q => q.Marked ("Click!"));
+ RunningApp.Tap (q => q.Marked ("Click!"));
+ RunningApp.WaitForElement (q => q.Marked ("listview"));
+ RunningApp.WaitForElement (q => q.Marked ("some text 35"));
+ RunningApp.Back ();
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32487.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32487.cs
new file mode 100644
index 00000000..2cccc574
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32487.cs
@@ -0,0 +1,50 @@
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 32487, " webview in tabbedpage has black margin")]
+ public class Bugzilla32487 : TestTabbedPage
+ {
+ protected override void Init ()
+ {
+ var cp = new ContentPage ();
+ cp.Title = "bugzila 30047";
+ Children.Add (cp);
+
+ var cp1 = new ContentPage ();
+ cp1.Title = "bugzila 32487";
+ var sl = new StackLayout ();
+ var wv = new WebView ();
+
+ var htmlSource = new HtmlWebViewSource ();
+ htmlSource.Html = "<h3>Welcome to the real-time HTML editor!</h3>\n<p>Try scroll this page, you will see black margins if it isn't working ok</p>";
+ wv.Source = htmlSource;
+ sl.Children.Add (wv);
+ cp1.Content = wv;
+
+ var btn = new Button { Text = "tap and rotate device after ", Command = new Command (async () => {
+ ContentPage cp2 = new ContentPage ();
+ cp.Title = "rotation";
+ var grd = new Grid ();
+ grd.RowDefinitions.Add (new RowDefinition { Height = GridLength.Auto });
+ grd.RowDefinitions.Add (new RowDefinition ());
+ WebView wv1 = new WebView { Source = "http://xamarin.com" };
+ Grid.SetRow (wv1, 1);
+ grd.Children.Add (wv1);
+ grd.Children.Add (new Button {
+ Text = "Back",
+ BackgroundColor = Color.Red,
+ Command = new Command (() => Navigation.PopModalAsync ())
+ });
+ cp2.Content = grd;
+ await Navigation.PushModalAsync (cp2);
+ })
+ };
+ cp.Content = btn;
+
+ Children.Add (cp);
+ Children.Add (cp1);
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32615.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32615.cs
new file mode 100644
index 00000000..405133e0
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32615.cs
@@ -0,0 +1,70 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+using System.Threading.Tasks;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 32615, "OnAppearing is not called on previous page when modal page is popped")]
+ public class Bugzilla32615 : TestContentPage // or TestMasterDetailPage, etc ...
+ {
+ int _counter;
+ Label _textField;
+ protected override void Init ()
+ {
+ var btnModal = new Button { AutomationId = "btnModal", Text = "open", HorizontalOptions = LayoutOptions.FillAndExpand, VerticalOptions = LayoutOptions.FillAndExpand };
+ btnModal.Clicked += async (sender, e) => await Navigation.PushModalAsync (new Bugzilla32615Page2 ());
+ _textField = new Label { AutomationId = "lblCount"};
+ var layout = new StackLayout ();
+ layout.Children.Add (btnModal);
+ layout.Children.Add (_textField);
+ // Initialize ui here instead of ctor
+ Content = layout;
+ }
+
+ protected override void OnAppearing()
+ {
+ _textField.Text = _counter++.ToString();
+ }
+
+ class Bugzilla32615Page2 : ContentPage
+ {
+ public Bugzilla32615Page2 ()
+ {
+ var btnPop = new Button { AutomationId = "btnPop", Text = "pop", HorizontalOptions = LayoutOptions.FillAndExpand, VerticalOptions = LayoutOptions.FillAndExpand };
+ btnPop.Clicked += async (sender, e) => await Navigation.PopModalAsync ();
+ Content = btnPop;
+ }
+
+ protected override void OnDisappearing ()
+ {
+ System.Diagnostics.Debug.WriteLine ("Disappearing Modal");
+ base.OnDisappearing ();
+ }
+
+ protected override void OnAppearing ()
+ {
+ System.Diagnostics.Debug.WriteLine ("Appearing Modal");
+ base.OnAppearing ();
+ }
+ }
+
+#if UITEST
+ [Test]
+ public async void Bugzilla32615Test ()
+ {
+ RunningApp.Tap (q => q.Marked ("btnModal"));
+ RunningApp.Tap (q => q.Marked ("btnPop"));
+ await Task.Delay (1000);
+ var lbl = RunningApp.WaitForElement (c => c.Marked("lblCount"));
+ Assert.AreEqual ("1", lbl [0].Text);
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32691.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32691.cs
new file mode 100644
index 00000000..7277f606
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32691.cs
@@ -0,0 +1,60 @@
+using System;
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ public interface ICacheService
+ {
+ void ClearImageCache ();
+ }
+
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 32691, "Clearing an image by setting Image.Source to null, while Image.IsLoading is true, doesn't work.")]
+ public class Bugzilla32691 : TestContentPage
+ {
+ const string KSetImageSource = "SET IMAGE SOURCE";
+ const string KClearImageSource = "CLEAR IMAGE SOURCE";
+
+ protected override void Init ()
+ {
+ var label = new Label () { XAlign = TextAlignment.Center };
+ var image = new Image ();
+
+ image.PropertyChanged += (sender, e) => {
+ if (e.PropertyName == "IsLoading")
+ label.Text = image.IsLoading ? "Loading" : "Done";
+ };
+
+ var btnSetOrClear = new Button () { Text = KSetImageSource, AutomationId = "btnLoad" };
+
+ btnSetOrClear.Clicked += delegate {
+ if (btnSetOrClear.Text == KSetImageSource) {
+ ClearImageCache ();
+ image.Source =
+ "http://www.public-domain-image.com/free-images/miscellaneous/big-high-border-fence.jpg";
+ btnSetOrClear.Text = KClearImageSource;
+ } else {
+ image.Source = null;
+ btnSetOrClear.Text = KSetImageSource;
+ }
+ };
+
+ Content = new StackLayout {
+ Orientation = StackOrientation.Vertical,
+ Padding = new Thickness (10),
+ Children = { btnSetOrClear, image, label }
+ };
+ }
+
+ void ClearImageCache ()
+ {
+ var cacheService = DependencyService.Get<ICacheService> ();
+ cacheService?.ClearImageCache ();
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32776.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32776.cs
new file mode 100644
index 00000000..f6d0b4c4
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32776.cs
@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls.Issues
+{
+ [Issue (IssueTracker.Bugzilla, 32776, "MasterDetail page - page title not showing for Windows Phone 8.1 (any orientation) or in Windows 8.1 (portrait orientation).", PlatformAffected.WinRT, NavigationBehavior.PushModalAsync)]
+ public class Bugzilla32776
+ : MasterDetailPage
+ {
+ public Bugzilla32776 ()
+ {
+ Master = new ContentPage { Title = "Content page" };
+ Detail = new NavigationPage (new ContentPage {
+ Title = "Test"
+ });
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32801.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32801.cs
new file mode 100644
index 00000000..c285aeff
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32801.cs
@@ -0,0 +1,92 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+using Xamarin.UITest.iOS;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 32801, "Memory Leak in TabbedPage + NavigationPage")]
+ public class Bugzilla32801 : TestTabbedPage // or TestMasterDetailPage, etc ...
+ {
+ protected override void Init ()
+ {
+ Children.Add (new NavigationPage (new TestDemoPage (1)) { Title = "Tab", Icon = "bank.png" });
+ Children.Add (new NavigationPage (new TestDemoPage (1)) { Title = "Tab 1", Icon = "bank.png" });
+
+ }
+
+ public class TestDemoPage : ContentPage
+ {
+ int _level = 0;
+
+ public TestDemoPage (int level)
+ {
+ _level = level;
+
+ System.Diagnostics.Debug.WriteLine ("Page Level {0} : Created", _level);
+
+ Title = string.Format ("Level {0}", level);
+
+ var lblStack = new Label ();
+
+ var buttonAdd = new Button {
+ Text = "Add Level",
+ AutomationId = "btnAdd",
+ BackgroundColor = Color.Aqua
+ };
+
+ buttonAdd.Clicked += (sender, e) => Navigation.PushAsync (new TestDemoPage (_level + 1));
+
+ var buttonStack = new Button {
+ Text = "Show Navigation Stack",
+ AutomationId = "btnStack",
+ BackgroundColor = Color.Aqua
+ };
+
+ buttonStack.Clicked += (object sender, EventArgs e) => {
+ lblStack.Text = "Stack " + Navigation.NavigationStack.Count.ToString ();
+ System.Diagnostics.Debug.WriteLine ("------------------------------------------------------------");
+ foreach (TestDemoPage page in Navigation.NavigationStack)
+ System.Diagnostics.Debug.WriteLine ("Items On Navigation Stack =====> Level {0}", page._level);
+ System.Diagnostics.Debug.WriteLine ("------------------------------------------------------------");
+ };
+
+ Content = new StackLayout {
+ Padding = new Thickness (20.0),
+ Spacing = 20.0,
+ Children = {
+ buttonAdd, buttonStack, lblStack
+ }
+ };
+ }
+
+ ~TestDemoPage ()
+ {
+ System.Diagnostics.Debug.WriteLine ("Page Level {0} : Destroyed", _level);
+ }
+ }
+
+ #if UITEST
+ [Test]
+ public void Bugzilla32801Test ()
+ {
+ if (RunningApp is iOSApp) {
+ RunningApp.Tap (c => c.Marked ("btnAdd"));
+ RunningApp.Tap (c => c.Marked ("btnAdd"));
+ RunningApp.Tap (c => c.Marked ("btnStack"));
+ RunningApp.WaitForElement (c => c.Marked ("Stack 3"));
+ RunningApp.Tap (c => c.Marked ("Tab"));
+ RunningApp.Tap (c => c.Marked ("btnStack"));
+ RunningApp.WaitForElement (c => c.Marked ("Stack 1"));
+ }
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32842.xaml b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32842.xaml
new file mode 100644
index 00000000..c38aea00
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32842.xaml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+ x:Class="Xamarin.Forms.Controls.Issues.Bugzilla32842">
+
+
+ <StackLayout VerticalOptions="Fill">
+ <Label x:Name="Instructions" Text="Tap on a box in the list below. The Box Taps number should equal 1 and the List Item Selections number should equal 0. If either number is incorrect, this test has failed."></Label>
+
+ <ListView x:Name="MainList" VerticalOptions="Fill">
+ <ListView.ItemTemplate>
+ <DataTemplate>
+ <ViewCell>
+ <StackLayout Orientation="Horizontal" Padding="5" HeightRequest="75" BackgroundColor="Red">
+ <BoxView Color="Teal" WidthRequest="75" HeightRequest="75">
+ <BoxView.GestureRecognizers>
+ <TapGestureRecognizer
+ Tapped="BoxTapped"
+ NumberOfTapsRequired="1"/>
+ </BoxView.GestureRecognizers>
+ </BoxView>
+ </StackLayout>
+ </ViewCell>
+ </DataTemplate>
+ </ListView.ItemTemplate>
+ </ListView>
+
+ <StackLayout Orientation="Horizontal">
+ <Label Text="">List Item Selections: </Label>
+ <Label x:Name="ListResults" Text=""></Label>
+ </StackLayout>
+ <StackLayout Orientation="Horizontal">
+ <Label Text="">Box Taps: </Label>
+ <Label x:Name="BoxResults" Text=""></Label>
+ </StackLayout>
+
+
+
+ </StackLayout>
+
+
+</ContentPage> \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32842.xaml.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32842.xaml.cs
new file mode 100644
index 00000000..ec73ea6a
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32842.xaml.cs
@@ -0,0 +1,46 @@
+using System;
+using System.Collections.Generic;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls.Issues
+{
+#if APP
+ [Preserve(AllMembers = true)]
+ [Issue(IssueTracker.Bugzilla, 32842,
+ "[WinRT] ItemSelected Not Ignored When a ListView Item Contains a TapGestureRecognizer", PlatformAffected.WinRT)]
+ public partial class Bugzilla32842 : ContentPage
+ {
+ public Bugzilla32842 ()
+ {
+
+ List<string> items = new List<string> { "item1", "item2", "item3" };
+
+ InitializeComponent ();
+
+ MainList.ItemsSource = items;
+ MainList.ItemSelected += MainListSelectionChanged;
+ }
+
+ int _boxTaps;
+ int _listSelections;
+
+ void MainListSelectionChanged(object sender, SelectedItemChangedEventArgs e)
+ {
+ if (e.SelectedItem == null) {
+ return;
+ }
+
+ _listSelections += 1;
+
+ ListResults.Text = $"Selections = {_listSelections}";
+ }
+
+ void BoxTapped(object sender, EventArgs args)
+ {
+ _boxTaps += 1;
+
+ BoxResults.Text = $"Box Taps = {_boxTaps}";
+ }
+ }
+#endif
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32847.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32847.cs
new file mode 100644
index 00000000..7014cf35
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32847.cs
@@ -0,0 +1,119 @@
+using System;
+using System.Collections.Generic;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 32847,
+ "Picker text is cleared after selecting an item, whether Picker, DatePicker, or TimePicker (when in a TableView (or ListView))", PlatformAffected.WinRT)]
+ public class Bugzilla32847 : TestContentPage
+ {
+ protected override void Init ()
+ {
+ var instructions =
+ @"In the picker below, select the option labeled 'Two'. If the selection immediately disappears, the test has failed.
+In the TimePicker below, change the time to 5:21 PM. If the selection immediately disappears, the test has failed.
+In the DatePicker below, change the date to May 25, 1977. If the selection immediately disappears, the test has failed.";
+
+ var tableInstructions = new Label {
+ Text = instructions
+ };
+
+ var picker = new Picker ();
+
+ var pickerItems = new List<string> { "One", "Two", "Three" };
+
+ foreach(string item in pickerItems)
+ {
+ picker.Items.Add(item);
+ }
+
+ var datePicker = new DatePicker ();
+ var timePicker = new TimePicker ();
+
+ var tableView = new TableView() { BackgroundColor = Color.Green };
+
+ var tableSection = new TableSection();
+
+ var pickerCell = new ViewCell { View = picker };
+ var datepickerCell = new ViewCell { View = datePicker };
+ var timepickerCell = new ViewCell { View = timePicker };
+
+ tableSection.Add(pickerCell);
+ tableSection.Add(timepickerCell);
+ tableSection.Add(datepickerCell);
+
+ var tableRoot = new TableRoot() {
+ tableSection
+ };
+
+ tableView.Root = tableRoot;
+
+ var listItems = new List<string> { "One" };
+
+ var listView = new ListView
+ {
+ Header = instructions,
+ BackgroundColor = Color.Pink,
+ ItemTemplate = new DataTemplate(typeof(CustomCell)),
+ ItemsSource = listItems
+ };
+
+ var nonListDatePicker = new DatePicker();
+ var nonListTimePicker = new TimePicker();
+ var nonListPicker = new Picker();
+
+ foreach(string item in pickerItems)
+ {
+ nonListPicker.Items.Add(item);
+ }
+
+ Content = new StackLayout {
+ VerticalOptions = LayoutOptions.Fill,
+ HorizontalOptions = LayoutOptions.Fill,
+ Children = {
+ new Label { Text = instructions },
+ nonListPicker,
+ nonListDatePicker,
+ nonListTimePicker,
+ tableInstructions,
+ tableView,
+ listView
+ }
+ };
+ }
+ }
+
+ [Preserve (AllMembers = true)]
+ public class CustomCell : ViewCell
+ {
+ public CustomCell()
+ {
+ StackLayout cellWrapper = new StackLayout();
+ StackLayout stack = new StackLayout();
+
+ var picker = new Picker();
+ var datePicker = new DatePicker ();
+ var timePicker = new TimePicker ();
+
+ var items = new List<string> { "One", "Two", "Three" };
+
+ foreach(string item in items)
+ {
+ picker.Items.Add(item);
+ }
+
+ cellWrapper.BackgroundColor = Color.FromHex("#eee");
+ stack.Orientation = StackOrientation.Vertical;
+
+ stack.Children.Add(picker);
+ stack.Children.Add(timePicker);
+ stack.Children.Add(datePicker);
+
+ cellWrapper.Children.Add(stack);
+ View = cellWrapper;
+ }
+
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32898.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32898.cs
new file mode 100644
index 00000000..ceb91e2b
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32898.cs
@@ -0,0 +1,74 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+using System.Threading.Tasks;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 32898, "Memory leak when TabbedPage is popped out ")]
+ public class Bugzilla32898 : TestContentPage
+ {
+ WeakReference _page2Tracker;
+ WeakReference _tabTracker;
+
+ protected override void Init ()
+ {
+ var stack = new StackLayout () { VerticalOptions = LayoutOptions.Center };
+
+ stack.Children.Add (new Label () {
+ VerticalOptions = LayoutOptions.Center,
+ XAlign = TextAlignment.Center,
+ Text = "Page 1"
+ });
+
+ Content = stack;
+ }
+
+ protected override async void OnAppearing ()
+ {
+ base.OnAppearing ();
+
+ if (_page2Tracker == null) {
+ var page2 = new TabbedPage () { Children = { new ContentPage () { Title = "tab" } } };
+ page2.Appearing += async delegate {
+ await Task.Delay (1000);
+ await page2.Navigation.PopModalAsync ();
+ };
+
+ _page2Tracker = new WeakReference (page2, false);
+ _tabTracker = new WeakReference (page2.Children [0], false);
+
+ await Task.Delay (1000);
+ await Navigation.PushModalAsync (page2);
+
+ StartTrackPage2 ();
+ }
+ }
+
+ async void StartTrackPage2 ()
+ {
+ while (true) {
+ ((Label)((StackLayout)Content).Children [0]).Text =
+ $"Page1. But Page2 IsAlive = {_page2Tracker.IsAlive}, tab IsAlive = {_tabTracker.IsAlive}";
+
+ await Task.Delay (1000);
+ GC.Collect ();
+ }
+ }
+
+ #if UITEST
+ [Test]
+ public async void Issu32898Test ()
+ {
+ await Task.Delay (5000);
+ RunningApp.WaitForElement (q => q.Marked ("Page1. But Page2 IsAlive = False, tab IsAlive = False"));
+ }
+ #endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32902.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32902.cs
new file mode 100644
index 00000000..e3bfccff
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32902.cs
@@ -0,0 +1,131 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+
+
+#if UITEST
+using Xamarin.UITest.iOS;
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 32902, "[iOS | iPad] App Crashes (without debug log) when Master Detail isPresented and navigation being popped")]
+ public class Bugzilla32902 : TestContentPage // or TestMasterDetailPage, etc ...
+ {
+ ContentPage FirstContentPage { get; set; }
+
+ MasterDetailPage HomePage { get; set; }
+
+ NavigationPage DetailPage { get; set; }
+
+ ContentPage MasterPage { get; set; }
+
+ protected override void Init ()
+ {
+ var rootContentPageLayout = new StackLayout();
+ var rootContentPageButton = new Button()
+ {
+ Text = "PushAsync to next page",
+ AutomationId = "btnNext",
+ BackgroundColor = Color.FromHex("#ecf0f1"),
+ TextColor = Color.Black
+ };
+ rootContentPageButton.Clicked += async (sender, args) =>
+ {
+ await Navigation.PushAsync(FirstContentPage);
+ };
+
+ rootContentPageLayout.Children.Add(rootContentPageButton);
+ Content = rootContentPageLayout;
+
+ Title = "RootPage";
+ BackgroundColor = Color.FromHex ("#2c3e50");
+
+ //MASTER PAGE
+ MasterPage = new ContentPage()
+ {
+ Title = "Master",
+ BackgroundColor = Color.FromHex("#1abc9c")
+ };
+ var masterPageLayout = new StackLayout();
+ var masterPageButton = new Button()
+ {
+ Text = "Pop Modal and Pop Root",
+ AutomationId = "btnPop",
+ BackgroundColor = Color.FromHex("#ecf0f1"),
+ TextColor = Color.Black
+ };
+ masterPageButton.Clicked += async (sender, args) =>
+ {
+ await Navigation.PopModalAsync();
+ await Navigation.PopToRootAsync();
+ };
+ masterPageLayout.Children.Add(masterPageButton);
+ MasterPage.Content = masterPageLayout;
+
+
+ //DETAIL PAGE
+ DetailPage = new NavigationPage (new ContentPage () {
+ Title = "RootNavigationDetailPage",
+ BackgroundColor = Color.FromHex ("#2980b9"),
+ Content = new Button {
+ Text = "PopModal",
+ TextColor = Color.White,
+ Command = new Command (async () => {
+ await Navigation.PopModalAsync ();
+ })
+ }
+ });
+
+ //MASTERDETAIL PAGE
+ HomePage = new MasterDetailPage()
+ {
+ Master = MasterPage,
+ Detail = DetailPage
+ };
+
+ //FIRST CONTENT PAGE
+ FirstContentPage = new ContentPage()
+ {
+ Title = "First Content Page",
+ BackgroundColor = Color.FromHex("#e74c3c")
+ };
+ var firstContentPageLayout = new StackLayout();
+ var firstContentPageButton = new Button()
+ {
+ Text = "Push Modal To Master-Detail Page",
+ AutomationId = "btnPushModal",
+ BackgroundColor = Color.FromHex("#ecf0f1"),
+ TextColor = Color.Black
+ };
+ firstContentPageButton.Clicked += async (sender, args) =>
+ {
+ await Navigation.PushModalAsync(HomePage);
+ };
+ firstContentPageLayout.Children.Add(firstContentPageButton);
+ FirstContentPage.Content = firstContentPageLayout;
+
+
+ }
+
+#if UITEST
+ [Test]
+ public void Bugzilla32902Test ()
+ {
+ var appIos = RunningApp as iOSApp;
+ if (appIos != null) {
+ if(appIos.Device.IsTablet)
+ {
+ RunningApp.Tap (q => q.Marked ("btnNext"));
+ RunningApp.Tap (q => q.Marked ("btnPushModal"));
+ RunningApp.Tap (q => q.Marked ("Master"));
+ RunningApp.Tap (q => q.Marked ("btnPop"));
+ }
+ }
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla33268.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla33268.cs
new file mode 100644
index 00000000..96cdc464
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla33268.cs
@@ -0,0 +1,143 @@
+using System.Collections.Generic;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls.Issues
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 33268, "Picker is broken on Windows Phone 8.1", PlatformAffected.WinRT)]
+ public class Bugzilla33268 : TestTabbedPage
+ {
+ protected override void Init ()
+ {
+ Children.Add (new Bugzilla33268ListView ());
+ Children.Add (new Simple ());
+ Children.Add (new Bugzilla33268NoListView ());
+ }
+ }
+
+ [Preserve (AllMembers = true)]
+ public class Simple : TestContentPage
+ {
+ protected override void Init ()
+ {
+ Title = "Simple";
+
+ var fiveItemPicker = new Picker { Title = "Picker With 4 Items" };
+ for (var i = 1; i <= 4; i++) {
+ fiveItemPicker.Items.Add ("Sample Option " + i);
+ }
+
+ Content = new StackLayout {
+ BackgroundColor = Color.Green,
+ VerticalOptions = LayoutOptions.Start,
+ Children = {
+ fiveItemPicker
+ }
+ };
+ }
+ }
+
+ [Preserve (AllMembers = true)]
+ public class Bugzilla33268NoListView : TestContentPage
+ {
+ protected override void Init ()
+ {
+ Title = "No ListView";
+
+ var fiveItemLabel = new Label {
+ Text =
+ "The picker below should display four items when opened. If you open it and all four items are not visible, this test has failed."
+ };
+
+ var fiveItemPicker = new Picker { Title = "Picker With 4 Items" };
+ for (var i = 1; i <= 4; i++) {
+ fiveItemPicker.Items.Add ("Sample Option " + i);
+ }
+
+ var sixItemLabel = new Label {
+ Text =
+ "The picker below should display full screen when opened. If you open it and it's not full screen, this test has failed."
+ };
+
+ var sixItemPicker = new Picker { Title = "Picker With 6 Items" };
+ for (var i = 1; i <= 6; i++) {
+ sixItemPicker.Items.Add ("Sample Option " + i);
+ }
+
+ Content = new StackLayout {
+ Children = {
+ fiveItemLabel,
+ fiveItemPicker,
+ sixItemLabel,
+ sixItemPicker
+ }
+ };
+ }
+ }
+
+ [Preserve (AllMembers = true)]
+ public class Bugzilla33268ListView : TestContentPage
+ {
+ protected override void Init ()
+ {
+ Title = "ListView";
+
+ var listItems = new List<string> { "One" };
+
+ var listView = new ListView {
+ Header = "Pickers in a ListView",
+ ItemTemplate = new DataTemplate (typeof(PickerCell)),
+ ItemsSource = listItems
+ };
+
+ Content = new StackLayout {
+ Children = {
+ listView
+ }
+ };
+ }
+
+ [Preserve (AllMembers = true)]
+ internal class PickerCell : ViewCell
+ {
+ public PickerCell ()
+ {
+ var cellWrapper = new StackLayout ();
+ var stack = new StackLayout ();
+
+ var fiveItemLabel = new Label {
+ Text =
+ "The picker below should display five items when opened. If you open it and all five items are not visible, this test has failed."
+ };
+
+ var fiveItemPicker = new Picker { Title = "Picker With 5 Items" };
+ for (var i = 1; i <= 5; i++) {
+ fiveItemPicker.Items.Add ("Sample Option " + i);
+ }
+
+ var sixItemLabel = new Label {
+ Text =
+ "The picker below should display full screen when opened. If you open it and it's not full screen, this test has failed."
+ };
+
+ var sixItemPicker = new Picker { Title = "Picker With 6 Items" };
+ for (var i = 1; i <= 6; i++) {
+ sixItemPicker.Items.Add ("Sample Option " + i);
+ }
+
+ stack.Orientation = StackOrientation.Vertical;
+
+ stack.Children.Add (fiveItemLabel);
+ stack.Children.Add (fiveItemPicker);
+ stack.Children.Add (sixItemLabel);
+ stack.Children.Add (sixItemPicker);
+
+ cellWrapper.VerticalOptions = LayoutOptions.StartAndExpand;
+
+ cellWrapper.Children.Add (stack);
+
+ View = cellWrapper;
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla33450.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla33450.cs
new file mode 100644
index 00000000..e92a7d9f
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla33450.cs
@@ -0,0 +1,47 @@
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 33450, "[iOS] Cell with ContextAction has a different layout")]
+ public class Bugzilla33450 : TestContentPage // or TestMasterDetailPage, etc ...
+ {
+ protected override void Init ()
+ {
+ var list = new ListView { ItemTemplate = new DataTemplate (typeof(MyImageCell)) };
+
+ list.ItemsSource = new[] {
+ "One",
+ "Two",
+ "Three",
+ "Four",
+ "Five",
+ "Six",
+ "Seven",
+ "Eight",
+ "Nine",
+ "Ten",
+ };
+
+ Content = list;
+ }
+
+ [Preserve (AllMembers = true)]
+ public class MyImageCell : ImageCell
+ {
+ static bool s_addContextAction = false;
+
+ public MyImageCell()
+ {
+ ImageSource = "bank.png";
+ SetBinding(TextProperty, new Binding("."));
+
+ if(s_addContextAction)
+ {
+ ContextActions.Add(new MenuItem() { Text = "Delete" });
+ }
+ s_addContextAction = !s_addContextAction;
+ }
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla33578.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla33578.cs
new file mode 100644
index 00000000..0df73ddb
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla33578.cs
@@ -0,0 +1,99 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using Xamarin.UITest.iOS;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 33578, "TableView EntryCell shows DefaultKeyboard, but after scrolling down and back a NumericKeyboard (")]
+ public class Bugzilla33578 : TestContentPage // or TestMasterDetailPage, etc ...
+ {
+ protected override void Init ()
+ {
+ Content = new TableView {
+ Root = new TableRoot {
+ new TableSection {
+ new EntryCell {
+ Placeholder = "Enter text here 1",
+ AutomationId = "entryNormal"
+ },
+ new EntryCell {
+ Placeholder = "Enter text here 2"
+ },
+ new EntryCell {
+ Placeholder = "Enter text here"
+ },
+ new EntryCell {
+ Placeholder = "Enter text here"
+ },
+ new EntryCell {
+ Placeholder = "Enter text here"
+ },
+ new EntryCell {
+ Placeholder = "Enter text here"
+ },
+ new EntryCell {
+ Placeholder = "Enter text here"
+ },
+ new EntryCell {
+ Placeholder = "Enter text here"
+ },
+ new EntryCell {
+ Placeholder = "Enter text here"
+ },
+ new EntryCell {
+ Placeholder = "Enter text here"
+ },
+ new EntryCell {
+ Placeholder = "Enter text here"
+ },
+ new EntryCell {
+ Placeholder = "Enter text here"
+ },
+ new EntryCell {
+ Placeholder = "Enter text here"
+ },
+ new EntryCell {
+ Placeholder = "Enter text here",
+ AutomationId = "entryPreviousNumeric"
+ },
+ new EntryCell {
+ Keyboard = Keyboard.Numeric,
+ Placeholder = "0",
+ AutomationId = "entryNumeric"
+ }
+ }
+ }
+ };
+ }
+
+#if UITEST
+ [Test]
+ [Ignore("Needs Xamarin.UITest 0.18")]
+ public void Bugzilla33578Test ()
+ {
+ if (RunningApp is iOSApp) {
+ RunningApp.ScrollDown ();
+ RunningApp.ScrollDown ();
+ RunningApp.Tap (x => x.Marked ("0"));
+ var e = RunningApp.Query (c => c.Marked ("0").Parent ("UITextField").Index (0).Invoke ("keyboardType")) [0];
+ //8 DecimalPad
+ Assert.AreEqual (8, e);
+ RunningApp.DismissKeyboard ();
+ RunningApp.Tap (x => x.Marked ("Enter text here").Index (0).Parent ());
+ RunningApp.ScrollUp ();
+ RunningApp.Tap (x => x.Marked ("Enter text here 1"));
+ RunningApp.Tap (x => x.Marked ("Enter text here 2").Index (0).Parent ());
+ var e1 = RunningApp.Query (c => c.Marked ("Enter text here 2").Parent ("UITextField").Index (0).Invoke ("keyboardType")) [0];
+ Assert.AreEqual (0, e1);
+ }
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla33612.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla33612.cs
new file mode 100644
index 00000000..95c0b30c
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla33612.cs
@@ -0,0 +1,159 @@
+using System;
+using System.Linq;
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using NUnit.Framework;
+using Xamarin.UITest;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 33612,
+ "(A) Removing a page from the navigation stack causes an 'Object reference' exception in Android only",
+ PlatformAffected.Android)]
+ public class Bugzilla33612 : TestNavigationPage
+ {
+ class Page1 : ContentPage
+ {
+ public Page1()
+ {
+ var button = new Button { Text = "Go To Page 2" };
+ button.Clicked += (sender, args) => Navigation.PushAsync(new Page2());
+
+ Content = new StackLayout()
+ {
+ Children = {
+ new Label { Text = "This is Page 1 - the root page" },
+ button
+ }
+ };
+ }
+ }
+
+ class FakePage : ContentPage
+ {
+ public FakePage()
+ {
+ Content = new StackLayout()
+ {
+ Children = {
+ new Label { Text = "This is a fake page. It will never show up." }
+ }
+ };
+ }
+ }
+
+ class Page2 : ContentPage
+ {
+ public Page2()
+ {
+ var button = new Button { Text = "Go to Page 3" };
+ button.Clicked += async (sender, args) =>
+ {
+ int numPagesToRemove = Navigation.NavigationStack.Count;
+
+ Page3 page3 = new Page3();
+ await Navigation.PushAsync(page3);
+
+ var fake = new FakePage();
+ Navigation.InsertPageBefore(fake, page3);
+
+ // Remove all the previous pages on the stack (i.e., Page 1)
+ // This should work fine
+ for (int i = 0; i < numPagesToRemove; i++)
+ {
+ Page p = Navigation.NavigationStack.ElementAt(0);
+ Navigation.RemovePage(p);
+ }
+ };
+
+ Content = new StackLayout()
+ {
+ Children = {
+ new Label { Text = "This is Page 2" },
+ button
+ }
+ };
+ }
+ }
+
+ class SuccessPage : ContentPage
+ {
+ public SuccessPage()
+ {
+ Content = new StackLayout()
+ {
+ Children = {
+ new Label { Text = "If you're seeing this, nothing crashed. Yay!" }
+ }
+ };
+ }
+ }
+
+ class Page3 : ContentPage
+ {
+ public Page3()
+ {
+ var button = new Button { AutomationId = "btn", Text = "Return To Page 2" };
+ button.Clicked += (sender, args) =>
+ {
+ int numPagesToRemove = Navigation.NavigationStack.Count;
+
+ // Remove all the previous pages on the stack
+ // Originally this would fail (and crash the app), because FakePage
+ // was never actually run through SwitchContentAsync
+ // which means that it never had its renderer set.
+ // But now it should work just fine
+ for (int i = 0; i < numPagesToRemove - 1; i++)
+ {
+ Page p = Navigation.NavigationStack.ElementAt(0);
+ Navigation.RemovePage(p);
+ }
+
+ var success = new SuccessPage();
+ Navigation.PushAsync(success);
+ };
+
+ Content = new StackLayout()
+ {
+ Children = {
+ new Label { Text = "This is Page 3" },
+ button
+ }
+ };
+ }
+ }
+
+ protected override void Init ()
+ {
+ var page1 = new Page1 ();
+
+ PushAsync (page1);
+ }
+
+#if UITEST
+ [Test]
+ [UiTest (typeof(NavigationPage))]
+ public void Issue33612RemovePagesWithoutRenderers ()
+ {
+ RunningApp.WaitForElement (q => q.Marked ("Go To Page 2"));
+ RunningApp.Tap (q => q.Marked("Go To Page 2"));
+
+ RunningApp.WaitForElement (q => q.Marked("This is Page 2"));
+ RunningApp.Screenshot ("At Page 2");
+ RunningApp.Tap (q => q.Marked("Go to Page 3"));
+
+ RunningApp.WaitForElement ("This is Page 3");
+ RunningApp.WaitForElement (q => q.Marked ("Return To Page 2"),
+ timeout: TimeSpan.FromSeconds (15));
+ RunningApp.Screenshot("At Page 3");
+ RunningApp.Tap (q => q.Marked("Return To Page 2"));
+
+ RunningApp.WaitForElement ("If you're seeing this, nothing crashed. Yay!");
+ RunningApp.Screenshot ("Success Page");
+ }
+#endif
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla33714.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla33714.cs
new file mode 100644
index 00000000..6fce942d
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla33714.cs
@@ -0,0 +1,86 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls.Issues
+{
+
+ [Issue (IssueTracker.Bugzilla, 33714, "[WP] Navigating Back Within MasterDetailPage.Detail Causes Crash", NavigationBehavior.PushModalAsync)]
+ public class Bugzilla33714 : MasterDetailPage
+ {
+ public Bugzilla33714 ()
+ {
+ Master = new MasterPage (this);
+ Detail = new NavigationPage (new ContentPage
+ {
+ Title = "Home",
+ Content = new StackLayout
+ {
+ Children = {
+ new Label { Text = "This is the home detail page"}
+ }
+ }
+ });
+ }
+
+ public class MoreDetail : ContentPage
+ {
+ public MoreDetail ()
+ {
+ Content = new StackLayout {
+ Children = {
+ new Label { Text = "More details" },
+ new Button { Text = "Go to more detail page", Command = new Command(async () => await Navigation.PushAsync(new MoreDetail()))},
+ new Button { Text = "Go back", Command = new Command(async () => await Navigation.PopAsync())}
+ }
+ };
+ }
+ }
+
+ public class DetailPage : ContentPage
+ {
+ public DetailPage ()
+ {
+ Title = "Detail";
+ Content = new StackLayout {
+ Children = {
+ new Label { Text = "This is a Detail ContentPage" },
+ new Button { Text = "Go to more detail page", Command = new Command(async () => await Navigation.PushAsync(new MoreDetail()))}
+ }
+ };
+ }
+ }
+
+ public class MasterPage : ContentPage
+ {
+ readonly MasterDetailPage _masterPage;
+ List<string> _items;
+
+ public MasterPage (MasterDetailPage masterPage)
+ {
+ _masterPage = masterPage;
+ Title = "Menu";
+
+ for (int i = 0; i < 5; i++ )
+ {
+ if (i == 0) _items = new List<string>();
+
+ _items.Add("Menu Items");
+ }
+
+ var list = new ListView { ItemsSource = _items, RowHeight = 100, HasUnevenRows = true };
+ list.ItemSelected += list_ItemSelected;
+
+ Content = list;
+ }
+
+ void list_ItemSelected(object sender, SelectedItemChangedEventArgs e)
+ {
+ var listView = (ListView) sender;
+
+ _masterPage.Detail = new NavigationPage(new DetailPage());
+ }
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla33870.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla33870.cs
new file mode 100644
index 00000000..d0d9bbc6
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla33870.cs
@@ -0,0 +1,71 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel;
+using System.Runtime.CompilerServices;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 33870, "[W] Crash when the ListView Selection is set to null", PlatformAffected.WinRT)]
+ public class Bugzilla33870 : TestContentPage
+ {
+ public class Section : ObservableCollection<string>
+ {
+ public Section (string title, IEnumerable<string> items = null)
+ : this (items ?? new List<string> ())
+ {
+ Title = title;
+ }
+
+ public Section (IEnumerable<string> items)
+ : base (items)
+ { }
+
+ public string Title { get; set; }
+ }
+
+ protected override void Init ()
+ {
+ var source = new ObservableCollection<Section> {
+ new Section("SECTION 1") {
+ "ITEM 1",
+ "ITEM 2",
+ },
+ new Section("SECTION 2") {
+ "ITEM 3",
+ "CLEAR SELECTION",
+ }
+ };
+
+ var listview = new ListView {
+ ItemsSource = source,
+ IsGroupingEnabled = true,
+ GroupDisplayBinding = Binding.Create<Section> (x => x.Title),
+ };
+
+ var label = new Label { Text = "Tap CLEAR SELECTION. If the app does not crash and no item is selected, the test has passed." };
+
+ listview.ItemSelected += (sender, args) =>
+ {
+ string selecteditem = args.SelectedItem?.ToString ();
+ label.Text = selecteditem;
+ if (selecteditem == "CLEAR SELECTION") {
+ label.Text = "cleared";
+ ((ListView) sender).SelectedItem = null;
+ }
+ };
+
+ var stack = new StackLayout {
+ Children = {
+ label,
+ listview
+ }
+ };
+
+ Content = stack;
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla33890.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla33890.cs
new file mode 100644
index 00000000..bb3a3765
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla33890.cs
@@ -0,0 +1,38 @@
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls.Issues
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 33890, "Setting CancelButtonColor does not have any effect", PlatformAffected.iOS)]
+ public class Bugzilla33890 : TestContentPage
+ {
+ protected override void Init ()
+ {
+ Label header = new Label {
+ Text = "Search Bar",
+ FontAttributes = FontAttributes.Bold,
+ FontSize = 50,
+ HorizontalOptions = LayoutOptions.Center
+ };
+
+ SearchBar searchBar = new SearchBar {
+ Placeholder = "Enter anything",
+ CancelButtonColor = Color.Red
+ };
+
+ Label reproSteps = new Label {
+ Text =
+ "Tap on the search bar and enter some text. The 'Cancel' button should appear. If the 'Cancel' button is not red, this is broken.",
+ HorizontalOptions = LayoutOptions.Center
+ };
+
+ Content = new StackLayout {
+ Children = {
+ header,
+ searchBar,
+ reproSteps
+ }
+ };
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla34007.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla34007.cs
new file mode 100644
index 00000000..cc490e4c
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla34007.cs
@@ -0,0 +1,91 @@
+using System;
+using System.Xml.Linq;
+using Xamarin.Forms.CustomAttributes;
+#if UITEST
+using NUnit.Framework;
+using Xamarin.UITest;
+
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 34007, "Z order drawing of children views are different on Android, iOS, Win", PlatformAffected.Android | PlatformAffected.iOS)]
+ public class Bugzilla34007 : TestContentPage
+ {
+ protected override void Init ()
+ {
+ var grid = new Grid ();
+
+ var button0 = new Button {
+ Text = "Button 0",
+ HorizontalOptions = LayoutOptions.Fill,
+ VerticalOptions = LayoutOptions.Fill
+ };
+
+ var button1 = new Button {
+ Text = "Button 1",
+ HorizontalOptions = LayoutOptions.Fill,
+ VerticalOptions = LayoutOptions.Fill
+ };
+
+ var lastButtonTappedLabel = new Label ();
+
+ Action reorder = () => {
+ // Get the last item in the grid
+ var item = grid.Children[1];
+
+ // Remove it
+ grid.Children.RemoveAt(1);
+
+ // And put it back as the 0th item
+ grid.Children.Insert(0, item);
+ };
+
+ button0.Clicked += (sender, args) => {
+ lastButtonTappedLabel.Text = "Button 0 was tapped last";
+ };
+
+ button1.Clicked += (sender, args) => {
+ lastButtonTappedLabel.Text = "Button 1 was tapped last";
+
+ reorder ();
+ };
+
+ grid.Children.Add(button0, 0, 0);
+ grid.Children.Add(button1, 0, 0);
+
+ Content = new StackLayout {
+ Children = { grid, lastButtonTappedLabel }
+ };
+ }
+
+#if UITEST
+ [Test]
+ [UiTest (typeof (Grid))]
+ public void Issue34007TestFirstElementHasLowestZOrder ()
+ {
+ var buttonLocations = RunningApp.WaitForElement (q => q.Marked ("Button 0"));
+
+ var x = buttonLocations [0].Rect.CenterX;
+ var y = buttonLocations [0].Rect.CenterY;
+
+ // Button 1 was the last item added to the grid; it should be tappable
+ RunningApp.Tap (q => q.Button ("Button 1"));
+
+ // The label should indicate that Button 1 was the last button tapped
+ RunningApp.WaitForElement(q => q.Marked("Button 1 was tapped last"));
+
+ RunningApp.Screenshot("Buttons Reordered");
+
+ // Tapping Button1 1 reordered the buttons in the grid; Button 0 should
+ // now be on top. Tapping at the Button 1 location should actually tap
+ // Button 0, and the label should indicate that
+ RunningApp.TapCoordinates(x, y);
+ RunningApp.WaitForElement(q => q.Marked("Button 0 was tapped last"));
+
+ RunningApp.Screenshot("Button 0 Tapped");
+ }
+#endif
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla34061.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla34061.cs
new file mode 100644
index 00000000..6af8fb6f
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla34061.cs
@@ -0,0 +1,76 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 34061, "RelativeLayout - First child added after page display does not appear")]
+ public class Bugzilla34061 : TestContentPage
+ {
+ readonly RelativeLayout _layout = new RelativeLayout ();
+
+ protected override void Init ()
+ {
+ var label = new Label { Text = "Some content goes here", HorizontalOptions = LayoutOptions.Center };
+
+ var addButton = new Button{ Text = "Add Popover", AutomationId = "btnAdd" };
+ addButton.Clicked += (s, ea) => AddPopover ();
+
+ var stack = new StackLayout {
+ Orientation = StackOrientation.Vertical,
+ Children = {
+ label,
+ addButton
+ },
+ };
+
+ _layout.Children.Add (stack,
+ Forms.Constraint.Constant (0),
+ Forms.Constraint.Constant (0),
+ Forms.Constraint.RelativeToParent (p => p.Width),
+ Forms.Constraint.RelativeToParent (p => p.Height));
+
+ Content = _layout;
+ }
+
+ void AddPopover ()
+ {
+ var newView = new Button {
+ BackgroundColor = Color.FromRgba (64, 64, 64, 64),
+ Text = "Remove Me",
+ AutomationId = "btnRemoveMe"
+ };
+ newView.Clicked += (s, ea) => RemovePopover (newView);
+
+ _layout.Children.Add (
+ newView,
+ Forms.Constraint.Constant (0),
+ Forms.Constraint.RelativeToParent (p => p.Height / 2),
+ Forms.Constraint.RelativeToParent (p => p.Width),
+ Forms.Constraint.RelativeToParent (p => p.Height / 2));
+ }
+
+ void RemovePopover (View view)
+ {
+ _layout.Children.Remove (view);
+ }
+
+ #if UITEST
+ [Test]
+ public void Bugzilla34061Test ()
+ {
+ RunningApp.Screenshot ("I am at Bugzilla34061 ");
+ RunningApp.WaitForElement (q => q.Marked ("btnAdd"));
+ RunningApp.Tap (q => q.Marked ("btnAdd"));
+ RunningApp.WaitForElement (q => q.Marked ("Remove Me"));
+ RunningApp.Screenshot ("I see the button");
+ }
+ #endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla34072.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla34072.cs
new file mode 100644
index 00000000..d08b2f36
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla34072.cs
@@ -0,0 +1,54 @@
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls.TestCasesPages
+{
+ [Preserve (AllMembers = true)]
+ [Issue(IssueTracker.Bugzilla, 34072, "Inconsistent Disabled Button behavior between Forms for Android & iOS")]
+ public class Bugzilla34072 : TestContentPage
+ {
+ Button _testButton;
+ Label _reproStepsLabel;
+
+ protected override void Init ()
+ {
+ _testButton = new Button () {
+ Text = "Enabled",
+ TextColor = Color.Yellow,
+ IsEnabled = true
+ };
+
+ var switchStateButton = new Button {
+ Text = "Switch Enabled State",
+ Command = new Command (SwitchState),
+ };
+
+ _reproStepsLabel = new Label () {
+ Text = "Tap the 'Switch Enabled State' button. The top button text should be grayed out when the button is Disabled. If the text remains the same color in both states, this is broken."
+ };
+
+ Content = new StackLayout {
+ Padding = 10,
+ HorizontalOptions = LayoutOptions.FillAndExpand,
+ VerticalOptions = LayoutOptions.FillAndExpand,
+ Orientation = StackOrientation.Vertical,
+ Children = {
+ _testButton,
+ switchStateButton,
+ _reproStepsLabel
+ }
+ };
+ }
+
+ public void SwitchState ()
+ {
+ if (_testButton.IsEnabled) {
+ _testButton.IsEnabled = false;
+ _testButton.Text = "Disabled";
+ return;
+ }
+
+ _testButton.IsEnabled = true;
+ _testButton.Text = "Enabled";
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla34561.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla34561.cs
new file mode 100644
index 00000000..3bce1e75
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla34561.cs
@@ -0,0 +1,89 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+using Xamarin.UITest.iOS;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 34561, "[A] Navigation.PushAsync crashes when used in Context Actions (legacy)", PlatformAffected.Android)]
+ public class Bugzilla34561 : TestContentPage
+ {
+ protected override void Init ()
+ {
+ var listView = new ListView () {
+ ItemsSource = new List<string> { "item" },
+ ItemTemplate = new DataTemplate (typeof(ContextActionTemplate))
+ };
+
+ Content = listView;
+ }
+
+ [Preserve (AllMembers = true)]
+ public class NextPage : TestContentPage
+ {
+ protected override void Init ()
+ {
+ Content = new Label {
+ AutomationId = "NextPageLabel",
+ Text = "See if I'm here"
+ };
+ }
+ }
+
+ [Preserve (AllMembers = true)]
+ public class ContextActionTemplate : ViewCell
+ {
+ public ContextActionTemplate ()
+ {
+ MenuItem newMenuItem = new MenuItem { Text = "Click" };
+ newMenuItem.Clicked += NewMenuItem_Clicked;
+ ContextActions.Add (newMenuItem);
+
+ View = new StackLayout {
+ Children = {
+ new Label {
+ Text = "Click and hold",
+ AutomationId = "ListViewItem",
+ VerticalOptions = LayoutOptions.Center,
+ HorizontalOptions = LayoutOptions.Center
+ }
+ }
+ };
+ }
+
+ void NewMenuItem_Clicked (object sender, EventArgs e)
+ {
+ ParentView.Navigation.PushAsync (new NextPage (), false);
+ }
+ }
+
+#if UITEST
+ [Test]
+ public void Bugzilla34561Test ()
+ {
+ RunningApp.WaitForElement (q => q.Marked ("ListViewItem"));
+
+ if(RunningApp is iOSApp) {
+ var listItem = RunningApp.Query (q => q.Marked ("ListViewItem"))[0].Rect;
+ RunningApp.DragCoordinates(listItem.CenterX, listItem.CenterY, 0, listItem.CenterY);
+ } else {
+ RunningApp.TouchAndHold (q => q.Marked ("ListViewItem"));
+ }
+
+ RunningApp.WaitForElement (q => q.Marked ("Click"));
+ RunningApp.Tap (q => q.Marked ("Click"));
+ RunningApp.WaitForElement (q => q.Marked ("NextPageLabel"));
+ RunningApp.Screenshot ("I see the next page");
+ }
+#endif
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla34632.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla34632.cs
new file mode 100644
index 00000000..d75f4792
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla34632.cs
@@ -0,0 +1,79 @@
+using System;
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+using Xamarin.UITest.iOS;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 34632, "Can't change IsPresented when setting SplitOnLandscape ")]
+ public class Bugzilla34632 : TestMasterDetailPage
+ {
+ protected override void Init ()
+ {
+ if (Device.OS == TargetPlatform.Windows)
+ MasterBehavior = MasterBehavior.Split;
+ else
+ MasterBehavior = MasterBehavior.SplitOnLandscape;
+
+ Master = new ContentPage { Title = "Main Page",
+ Content = new Button { Text = "Master", AutomationId = "btnMaster",
+ Command = new Command (() => {
+ //If we're in potrait toggle hide the menu on click
+ if (Width < Height || Device.Idiom == TargetIdiom.Phone) {
+ IsPresented = false;
+ }
+ })
+ }
+ };
+
+ Detail = new NavigationPage (new ModalRotationIssue ());
+ NavigationPage.SetHasBackButton (Detail, false);
+ }
+
+ [Preserve (AllMembers = true)]
+ public class ModalRotationIssue : ContentPage
+ {
+ public ModalRotationIssue ()
+ {
+ var btn = new Button { Text = "Open Modal", AutomationId = "btnModal" };
+ btn.Clicked += OnButtonClicked;
+ Content = btn;
+ }
+
+ async void OnButtonClicked (object sender, EventArgs e)
+ {
+ var testButton = new Button { Text = "Rotate Before Clicking", AutomationId = "btnDismissModal" };
+ testButton.Clicked += (async (snd, args) => await Navigation.PopModalAsync ());
+
+ var testModal = new ContentPage () {
+ Content = testButton
+ };
+
+ await Navigation.PushModalAsync (testModal);
+ }
+ }
+
+ #if UITEST
+ [Test]
+ public void Bugzilla34632Test ()
+ {
+ var app = RunningApp as iOSApp;
+ if (app != null && app.Device.IsTablet) {
+ RunningApp.SetOrientationPortrait ();
+ RunningApp.Tap (q => q.Marked ("btnModal"));
+ RunningApp.SetOrientationLandscape ();
+ RunningApp.Tap (q => q.Marked ("btnDismissModal"));
+ RunningApp.Tap (q => q.Marked ("btnModal"));
+ RunningApp.SetOrientationPortrait ();
+ RunningApp.Tap (q => q.Marked ("btnDismissModal"));
+ RunningApp.Tap (q => q.Marked ("btnMaster"));
+ }
+ }
+ #endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla34720.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla34720.cs
new file mode 100644
index 00000000..9d74e8e4
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla34720.cs
@@ -0,0 +1,352 @@
+using Xamarin.Forms.CustomAttributes;
+using System.Collections.ObjectModel;
+using System.ComponentModel;
+using System.Threading.Tasks;
+using System;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 34720, "Incorrect iOS button IsEnabled when scrolling ListView with command binding ")]
+ public class Bugzilla34720 : TestContentPage // or TestMasterDetailPage, etc ...
+ {
+ protected override void Init ()
+ {
+ Title = "Test Command Binding";
+ _list = new ListView () {
+ ClassId = "SampleList",
+ // Note: Turning on and off row height does not effect the issue,
+ // but with row heights on there is a visual glitch with the recyclyed row spacing
+ //RowHeight = SampleViewCell.RowHeight,
+ HasUnevenRows = true,
+ ItemTemplate = new DataTemplate (typeof(SampleViewCell)),
+ BackgroundColor = Color.FromHex ("E0E0E0"),
+ VerticalOptions = LayoutOptions.FillAndExpand,
+ HorizontalOptions = LayoutOptions.FillAndExpand,
+ };
+ _list.SetBinding (ListView.ItemsSourceProperty, Binding.Create<TestListViewModel> (r => r.Items));
+ _list.SetBinding (ListView.RefreshCommandProperty, Binding.Create<TestListViewModel> (r => r.RefreshCommand));
+ _list.SetBinding (ListView.IsRefreshingProperty, Binding.Create<TestListViewModel> (r => r.IsRefreshing));
+
+ var listViewModel = new TestListViewModel ();
+ listViewModel.AddTestData ();
+ BindingContext = listViewModel;
+
+
+ _list.ItemTapped += (sender, e) =>
+ {
+ DisplayAlert("hello", "You tapped " + e.Item.ToString(), "OK", "Cancel");
+ };
+
+ var btnDisable = new Button () {
+ Text = "Disable ListView",
+ };
+
+ btnDisable.Clicked += (object sender, EventArgs e) => {
+ if (_list.IsEnabled == true){
+ _list.IsEnabled = false;
+ btnDisable.Text = "Enable ListView";
+ }
+ else {
+ _list.IsEnabled = true;
+ btnDisable.Text = "Disable ListView";
+ }
+ };
+
+ Content = new StackLayout
+ {
+ VerticalOptions = LayoutOptions.FillAndExpand,
+ Children = { btnDisable, _list }
+ };
+ }
+
+ ListView _list;
+
+ [Preserve (AllMembers = true)]
+ public class SampleViewCell : ViewCell
+ {
+ public static int RowHeight = 120;
+ static int s_idSeed;
+ int id;
+
+ public SampleViewCell ()
+ {
+ id = s_idSeed++;
+ var grid = new Grid {
+ ClassId = "SampleCard",
+ Padding = new Thickness (7, 10),
+ RowSpacing = 0,
+ ColumnSpacing = 0,
+ RowDefinitions = {
+ new RowDefinition{ Height = new GridLength (80, GridUnitType.Absolute) },
+ new RowDefinition{ Height = new GridLength (40, GridUnitType.Absolute) },
+ },
+
+ };
+
+ var head = new SampleHeaderView ();
+ grid.Children.Add (head);
+
+ var foot = new SampleListActionView ();
+ Grid.SetRow (foot, 1);
+ grid.Children.Add (foot);
+
+ View = grid;
+ }
+
+ #region Testing Code
+
+ // Note this block can be removed it is just used to observing the ViewCell creation.
+ int _counter;
+
+
+ protected override void OnAppearing ()
+ {
+
+ base.OnAppearing ();
+ _counter++;
+ System.Diagnostics.Debug.WriteLine ("OnAppearing {0}, {1}", id, _counter);
+ }
+
+ protected override void OnDisappearing ()
+ {
+ base.OnDisappearing ();
+ _counter--;
+ System.Diagnostics.Debug.WriteLine ("OnDisappearing {0}, {1}", id, _counter);
+ }
+
+ #endregion
+
+ public class SampleHeaderView : ContentView
+ {
+
+ public SampleHeaderView ()
+ {
+ //+-----------+----------------+
+ //| 1 | |
+ //+-----------+----------------+
+ //| 2 | |
+ //+-----------+----------------+
+
+
+ var grid = new Grid {
+ Padding = new Thickness (5, 5, 5, 1),
+ RowSpacing = 1,
+ ColumnSpacing = 1,
+ BackgroundColor = Color.FromHex ("FAFAFA"),
+ RowDefinitions = {
+ new RowDefinition{ Height = new GridLength (1.25, GridUnitType.Star) },
+ new RowDefinition{ Height = new GridLength (0.8, GridUnitType.Star) },
+ },
+ ColumnDefinitions = {
+ new ColumnDefinition{ Width = new GridLength (1, GridUnitType.Star) },
+ new ColumnDefinition{ Width = new GridLength (1, GridUnitType.Star) },
+ }
+ };
+ //1 number
+ var materialNumber = new Label () {
+ VerticalOptions = LayoutOptions.StartAndExpand,
+ HorizontalOptions = LayoutOptions.StartAndExpand
+ };
+ Grid.SetColumnSpan (materialNumber, 2);
+ materialNumber.SetBinding (Label.TextProperty, Binding.Create<TestViewModel> (vm => vm.Number));
+ grid.Children.Add (materialNumber);
+
+ //2 Description
+ var materialDescription = new Label () {
+ VerticalOptions = LayoutOptions.StartAndExpand,
+ HorizontalOptions = LayoutOptions.StartAndExpand
+ };
+ Grid.SetColumnSpan (materialDescription, 2);
+ Grid.SetRow (materialDescription, 1);
+ materialDescription.SetBinding (Label.TextProperty, Binding.Create<TestViewModel> (vm => vm.Description));
+ //grid.Children.Add (materialDescription);
+
+ //3 Approve Label
+ var canApprove = new Label () {
+ VerticalOptions = LayoutOptions.StartAndExpand,
+ HorizontalOptions = LayoutOptions.StartAndExpand
+ };
+ Grid.SetColumn (canApprove, 1);
+ Grid.SetRow (canApprove, 1);
+ canApprove.SetBinding (Label.TextProperty, Binding.Create<TestViewModel> (vm => vm.CanApprove, stringFormat: "Can Approve: {0}"));
+ grid.Children.Add (canApprove);
+
+ //3 Approve Label
+ var canDeny = new Label () {
+ VerticalOptions = LayoutOptions.StartAndExpand,
+ HorizontalOptions = LayoutOptions.StartAndExpand
+ };
+ Grid.SetColumn (canDeny, 0);
+ Grid.SetRow (canDeny, 1);
+ canDeny.SetBinding (Label.TextProperty, Binding.Create<TestViewModel> (vm => vm.CanDeny, stringFormat: "Can Deny: {0}"));
+ grid.Children.Add (canDeny);
+
+ Content = grid;
+
+ }
+ }
+
+ public class SampleListActionView : ContentView
+ {
+ public SampleListActionView ()
+ {
+ var overallGrid = new Grid {
+ BackgroundColor = Color.FromHex ("FAFAFA"),
+ HorizontalOptions = LayoutOptions.FillAndExpand,
+ VerticalOptions = LayoutOptions.CenterAndExpand,
+ ColumnDefinitions = {
+ new ColumnDefinition{ Width = new GridLength (1, GridUnitType.Star) },
+ new ColumnDefinition{ Width = new GridLength (1, GridUnitType.Star) },
+ }
+ };
+
+ var grid = new Grid {
+ VerticalOptions = LayoutOptions.FillAndExpand,
+ HorizontalOptions = LayoutOptions.FillAndExpand,
+ ColumnDefinitions = {
+ new ColumnDefinition{ Width = new GridLength (1, GridUnitType.Star) },
+ new ColumnDefinition{ Width = new GridLength (1, GridUnitType.Star) },
+ }
+ };
+ // 1 Deny
+ var denyBtn = new Button {
+ ClassId = "btnReject",
+ Text = "DENY",
+ HorizontalOptions = LayoutOptions.FillAndExpand,
+ VerticalOptions = LayoutOptions.FillAndExpand
+ };
+
+ denyBtn.SetBinding (Button.CommandProperty, Binding.Create<TestViewModel> (r => r.DenyCommand));
+
+ grid.Children.Add (denyBtn);
+
+ // 2 Approve
+ var approveBtn = new Button {
+ ClassId = "btnApprove",
+ Text = "Approve",
+ HorizontalOptions = LayoutOptions.FillAndExpand,
+ VerticalOptions = LayoutOptions.FillAndExpand,
+
+ };
+ Grid.SetColumn (approveBtn, 1);
+ approveBtn.SetBinding (Button.CommandProperty, Binding.Create<TestViewModel> (r => r.ApproveCommand));
+ grid.Children.Add (approveBtn);
+
+
+ Grid.SetColumn (grid, 1);
+ overallGrid.Children.Add (grid);
+ Content = overallGrid;
+ }
+
+ }
+
+
+ }
+
+ [Preserve (AllMembers = true)]
+ public class TestListViewModel : INotifyPropertyChanged
+ {
+ Collection<TestViewModel> _items = new ObservableCollection<TestViewModel> ();
+
+ public void AddTestData ()
+ {
+ for (int i = 0; i < 20; i++) {
+ _items.Add (new TestViewModel () {
+ Description = string.Format ("Sample Description {0}", i),
+ Number = (i + 1).ToString (),
+ CanApprove = i % 2 == 0,
+ CanDeny = i % 2 == 0
+ });
+ }
+ RaisePropertyChanged ("Items");
+ }
+
+ public Collection<TestViewModel> Items { get { return _items; } set { _items = value; } }
+
+ public Command RefreshCommand {
+ get {
+ return new Command (OnRefresh);
+ }
+ }
+
+ public bool IsRefreshing { get; set; }
+
+ async void OnRefresh ()
+ {
+ IsRefreshing = true;
+ RaisePropertyChanged ("IsRefreshing");
+ _items.Clear ();
+ await Task.Delay (1000);
+ AddTestData ();
+ IsRefreshing = false;
+ RaisePropertyChanged ("IsRefreshing");
+ }
+
+ #region INotifyPropertyChanged implementation
+
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ #endregion
+
+ protected virtual void RaisePropertyChanged (string propertyName)
+ {
+ PropertyChangedEventHandler propertyChanged = PropertyChanged;
+ if (propertyChanged != null) {
+ propertyChanged (this, new PropertyChangedEventArgs (propertyName));
+ }
+ }
+ }
+
+ [Preserve (AllMembers = true)]
+ public class TestViewModel
+ {
+
+ public string Number { get; set; }
+
+ public string Description { get; set; }
+
+ bool _canApprove;
+
+ public bool CanApprove {
+ get{ return _canApprove; }
+ set {
+ _canApprove = value;
+ ApproveCommand.ChangeCanExecute ();
+ }
+ }
+
+ bool _canDeny;
+
+ public bool CanDeny {
+ get { return _canDeny; }
+ set {
+ _canDeny = value;
+ DenyCommand.ChangeCanExecute ();
+ }
+ }
+
+ public Command ApproveCommand {
+ get {
+ return new Command (OnApprove, () => CanApprove);
+ }
+ }
+
+ public Command DenyCommand {
+ get {
+ return new Command (OnDeny, () => CanDeny);
+ }
+ }
+
+ async void OnApprove ()
+ {
+ await Application.Current.MainPage.DisplayAlert ("Approve", string.Format ("Can Approve {0} {1}", Number, CanApprove), "Ok");
+ }
+
+ async void OnDeny ()
+ {
+ await Application.Current.MainPage.DisplayAlert ("Deny", string.Format ("Can Deny {0} {1}", Number, CanDeny), "Ok");
+ }
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla34727.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla34727.cs
new file mode 100644
index 00000000..fa17a728
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla34727.cs
@@ -0,0 +1,30 @@
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 34727, "(A) Cannot browse files from WebView on Android", PlatformAffected.Android)]
+ public class Bugzilla34727 : TestContentPage
+ {
+ protected override void Init ()
+ {
+ var webView = new WebView ();
+
+ var htmlSource = new HtmlWebViewSource { Html = @"
+<h3>Test Web View File Chooser</h3>
+<ol>
+ <li>Open the camera app.</li>
+ <li>Take a picture.</li>
+ <li>Return to this page.</li>
+ <li>Tap the 'Choose File' button; a file picker should appear.</li>
+ <li>Select the picture you just took.</li>
+ <li>The text 'No file chosen' should change to the name of your image file.</li>
+</ol>
+<br/>
+<input type='file' name='file' id='chooser' accept='image/*'>" };
+
+ webView.Source = htmlSource;
+ Content = webView;
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla34912.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla34912.cs
new file mode 100644
index 00000000..5042bc58
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla34912.cs
@@ -0,0 +1,106 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+using System.Collections.ObjectModel;
+using System.Linq;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 34912, "ListView.IsEnabled has no effect on iOS")]
+ public class Bugzilla34912 : TestContentPage // or TestMasterDetailPage, etc ...
+ {
+ protected override void Init ()
+ {
+ Padding = new Thickness (0, 20, 0, 0);
+
+ var source = SetupList ();
+
+ var list = new ListView
+ {
+ ItemTemplate = new DataTemplate(typeof(TextCell))
+ {
+ Bindings = {
+ { TextCell.TextProperty, new Binding ("Name") }
+ }
+ },
+
+ GroupDisplayBinding = new Binding("LongTitle"),
+ GroupShortNameBinding = new Binding("Title"),
+ Header = "HEADER",
+ Footer = "FOOTER",
+ IsGroupingEnabled = true,
+ ItemsSource = SetupList(),
+ };
+
+ list.ItemTapped += (sender, e) =>
+ {
+ var listItem = (Issue2777.ListItemValue)e.Item;
+ DisplayAlert(listItem.Name, "You tapped " + listItem.Name, "OK", "Cancel");
+ };
+
+ var btnDisable = new Button () {
+ Text = "Disable ListView",
+ AutomationId = "btnDisable"
+ };
+ btnDisable.Clicked += (object sender, EventArgs e) => {
+ if (list.IsEnabled == true){
+ list.IsEnabled = false;
+ btnDisable.Text = "Enable ListView";
+ }
+ else {
+ list.IsEnabled = true;
+ btnDisable.Text = "Disable ListView";
+ }
+ };
+
+ Content = new StackLayout
+ {
+ VerticalOptions = LayoutOptions.FillAndExpand,
+ Children = { btnDisable, list }
+ };
+ }
+
+ ObservableCollection<Issue2777.ListItemCollection> SetupList()
+ {
+ var allListItemGroups = new ObservableCollection<Issue2777.ListItemCollection>();
+
+ foreach (var item in Issue2777.ListItemCollection.GetSortedData())
+ {
+ // Attempt to find any existing groups where theg group title matches the first char of our ListItem's name.
+ var listItemGroup = allListItemGroups.FirstOrDefault(g => g.Title == item.Label);
+
+ // If the list group does not exist, we create it.
+ if (listItemGroup == null)
+ {
+ listItemGroup = new Issue2777.ListItemCollection(item.Label);
+ listItemGroup.Add(item);
+ allListItemGroups.Add(listItemGroup);
+ }
+ else
+ { // If the group does exist, we simply add the demo to the existing group.
+ listItemGroup.Add(item);
+ }
+ }
+ return allListItemGroups;
+ }
+
+#if UITEST
+ [Test]
+ public void Bugzilla34912Test ()
+ {
+ RunningApp.Tap (q => q.Marked ("Allen"));
+ RunningApp.WaitForElement (q => q.Marked ("You tapped Allen"));
+ RunningApp.Tap (q => q.Marked ("OK"));
+ RunningApp.Tap (q => q.Marked ("btnDisable"));
+ RunningApp.Tap (q => q.Marked ("Allen"));
+ RunningApp.WaitForNoElement (q => q.Marked ("You tapped Allen"));
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35078.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35078.cs
new file mode 100644
index 00000000..054aca0f
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35078.cs
@@ -0,0 +1,34 @@
+using System.Threading.Tasks;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Issue (IssueTracker.Bugzilla, 35078,
+ "Checking IsInvokeRequired on WinRT when off the dispatcher thread causes a null reference exception",
+ PlatformAffected.WinRT)]
+ public class Bugzilla35078 : TestContentPage
+ {
+ protected override void Init ()
+ {
+ var button = new Button { Text = "Go" };
+
+ var instructions = new Label {
+ Text =
+ "Click the 'Go' button. If the application crashes or a label with the text 'Sucess' does not appear, the test has failed."
+ };
+
+ var success = new Label ();
+
+ button.Clicked += (sender, args) => {
+ Task.Run (() => {
+ bool invokeRequired = Device.IsInvokeRequired;
+ if (invokeRequired) {
+ Device.BeginInvokeOnMainThread (() => success.Text = "Success");
+ }
+ });
+ };
+
+ Content = new StackLayout { Children = { instructions, button, success } };
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35127.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35127.cs
new file mode 100644
index 00000000..f5c338ab
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35127.cs
@@ -0,0 +1,22 @@
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 35127, "It is possible to craft a page such that it will never display on Windows")]
+ public class Bugzilla35127 : TestContentPage
+ {
+ protected override void Init ()
+ {
+ Content = new StackLayout {
+ Children = {
+ new Label { Text = "See me?" },
+ new ScrollView {
+ IsVisible = false,
+ Content = new Button { Text = "Click Me?" }
+ }
+ }
+ };
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35157.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35157.cs
new file mode 100644
index 00000000..cd4721e3
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35157.cs
@@ -0,0 +1,58 @@
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 35157, "CarouselPage inside NavPage inside TabbedPage gets laid out incorrectly", NavigationBehavior.PushModalAsync)]
+ public class Bugzilla35157 : TestTabbedPage
+ {
+ protected override void Init ()
+ {
+ var button = new Button {
+ Text = "Go",
+ AutomationId = "firstButton"
+ };
+
+
+ button.Clicked += (sender, args) => {
+ Button button2 = null;
+ button.Navigation.PushAsync (new CarouselPage {
+ Children = {
+ new ContentPage {
+ Content = button2 = new Button {
+ AutomationId = "secondButton",
+ VerticalOptions = LayoutOptions.EndAndExpand,
+ Text = "Click Me"
+ }
+ }
+ }
+ });
+
+ button2.Clicked += (s, a) => button2.Text = "Button Clicked!";
+ };
+
+ var tab = new NavigationPage(new ContentPage {Content = button});
+ tab.Title = "Tab";
+ Children.Add (tab);
+
+
+ }
+
+#if UITEST
+ [Test]
+ public void ButtonCanBeClicked ()
+ {
+ RunningApp.WaitForElement (q => q.Marked ("firstButton"));
+ RunningApp.Tap (q => q.Marked ("firstButton"));
+ RunningApp.WaitForElement (q => q.Marked ("secondButton"));
+ RunningApp.Tap (q => q.Marked ("secondButton"));
+ RunningApp.WaitForElement (q => q.Button ("Button Clicked!"));
+ }
+#endif
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35294.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35294.cs
new file mode 100644
index 00000000..036b7a91
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35294.cs
@@ -0,0 +1,45 @@
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 35294, "Certain pages do not align properly in RT Desktop")]
+ public class Bugzilla35294 : TestContentPage
+ {
+ public static Label LblMsg = new Label
+ {
+ FontSize = 16,
+ Text = "This is an example.... what is wrong with this? ",
+ HorizontalOptions = LayoutOptions.Center,
+ TextColor = Color.Black,
+ };
+
+ protected override void Init ()
+ {
+ Label header = new Label
+ {
+ Text = "Should not see blue",
+ Font = Font.BoldSystemFontOfSize(40),
+ HorizontalOptions = LayoutOptions.Center,
+ TextColor = Color.Black
+ };
+
+ StackLayout stack = new StackLayout
+ {
+ BackgroundColor = Color.White,
+ VerticalOptions = LayoutOptions.FillAndExpand,
+ Spacing = 10,
+
+ Children = { header, LblMsg, }
+ };
+
+ Content = new ScrollView
+ {
+ BackgroundColor = Color.Blue,
+ VerticalOptions = LayoutOptions.FillAndExpand,
+ Orientation = ScrollOrientation.Vertical,
+ Content = stack
+ };
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35472.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35472.cs
new file mode 100644
index 00000000..1513463c
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35472.cs
@@ -0,0 +1,88 @@
+using System;
+using System.Diagnostics;
+using Xamarin.Forms.CustomAttributes;
+#if UITEST
+using Xamarin.Forms.Core.UITests;
+using NUnit.Framework;
+using Xamarin.UITest;
+
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 35472, "PopAsync during ScrollToAsync throws NullReferenceException")]
+ public class Bugzilla35472 : TestNavigationPage
+ {
+ protected override void Init ()
+ {
+ // Set up the scroll viewer page
+ var scrollToButton = new Button () { Text = "Now push this button" };
+
+ var stackLayout = new StackLayout ();
+
+ stackLayout.Children.Add (scrollToButton);
+
+ for (int n = 0; n < 100; n++) {
+ stackLayout.Children.Add (new Label () { Text = n.ToString () });
+ }
+
+ var scrollView = new ScrollView () {
+ Content = stackLayout
+ };
+
+ var pageWithScrollView = new ContentPage () {
+ Content = scrollView
+ };
+
+ // Set up the start page
+ var goButton = new Button () {
+ Text = "Push this button"
+ };
+
+ var successLabel = new Label () { Text = "The test has passed", IsVisible = false };
+
+ var startPage = new ContentPage () {
+ Content = new StackLayout {
+ VerticalOptions = LayoutOptions.Center,
+ Children = {
+ goButton,
+ successLabel
+ }
+ }
+ };
+
+ PushAsync (startPage);
+
+ goButton.Clicked += (sender, args) => Navigation.PushAsync (pageWithScrollView);
+
+ scrollToButton.Clicked += async (sender, args) => {
+ try {
+ // Deliberately not awaited so we can simulate a user navigating back
+ scrollView.ScrollToAsync (0, 1500, true);
+ await Navigation.PopAsync ();
+ successLabel.IsVisible = true;
+ } catch (Exception ex) {
+ Debug.WriteLine (ex);
+ }
+ };
+ }
+
+#if UITEST
+ [Test]
+ [UiTest (typeof(NavigationPage))]
+ public void Issue35472PopAsyncDuringAnimatedScrollToAsync ()
+ {
+ RunningApp.WaitForElement (q => q.Marked ("Push this button"));
+ RunningApp.Tap (q => q.Marked ("Push this button"));
+
+ RunningApp.WaitForElement (q => q.Marked ("Now push this button"));
+ RunningApp.Screenshot ("On Page With ScrollView");
+ RunningApp.Tap (q => q.Marked ("Now push this button"));
+
+ RunningApp.WaitForElement ("The test has passed");
+ RunningApp.Screenshot ("Success");
+ }
+#endif
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35477.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35477.cs
new file mode 100644
index 00000000..8c1e7a69
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35477.cs
@@ -0,0 +1,49 @@
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using NUnit.Framework;
+using Xamarin.UITest.Queries;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 35477, "Tapped event does not fire when added to Frame in Android AppCompat",
+ PlatformAffected.Android)]
+ public class Bugzilla35477 : TestContentPage
+ {
+ protected override void Init ()
+ {
+ var instructions = new Label {
+ Text = "Tap the frame below. The label with the text 'No taps yet' should change its text to 'Frame was tapped'."
+ };
+ var frame = new Frame () {};
+ var frameLabel = new Label() {Text = "Tap here" };
+
+ frame.Content = new StackLayout() {Children = { frameLabel }};
+
+ var label = new Label { Text = "No taps yet" };
+
+ var rec = new TapGestureRecognizer { NumberOfTapsRequired = 1 };
+ rec.Tapped += (s, e) => { label.Text = "Frame was tapped"; };
+ frame.GestureRecognizers.Add (rec);
+
+ Content = new StackLayout {
+ Children = { instructions, frame, label }
+ };
+ }
+
+#if UITEST
+ [Test]
+ public void TapGestureFiresOnFrame ()
+ {
+ RunningApp.WaitForElement ("No taps yet");
+ RunningApp.WaitForElement ("Tap here");
+
+ RunningApp.Tap ("Tap here");
+
+ RunningApp.WaitForElement ("Frame was tapped");
+ }
+#endif
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35490.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35490.cs
new file mode 100644
index 00000000..119d297f
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35490.cs
@@ -0,0 +1,39 @@
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 35490, "Label Text Misaligned in Windows Phone 8.1 and WinRT",
+ PlatformAffected.WinPhone | PlatformAffected.WinRT)]
+ public class Bugzilla35490 : TestContentPage
+ {
+ protected override void Init ()
+ {
+ var instructions = new Label {
+ Text =
+ "The label in the red box below should be centered horizontally and vertically. If it's not, this test has failed."
+ };
+
+
+ var label = new Label {
+ BackgroundColor = Color.Red,
+ TextColor = Color.White,
+ HorizontalTextAlignment = TextAlignment.Center,
+ VerticalTextAlignment = TextAlignment.Center,
+ HeightRequest = 200,
+ HorizontalOptions = LayoutOptions.Fill,
+ Text = "Should be centered horizontally and vertically"
+ };
+
+
+ Content = new StackLayout {
+ HorizontalOptions = LayoutOptions.Fill,
+ VerticalOptions = LayoutOptions.Fill,
+ Children = {
+ instructions,
+ label
+ }
+ };
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35733.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35733.cs
new file mode 100644
index 00000000..5e6c39ca
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35733.cs
@@ -0,0 +1,58 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+using System.Threading.Tasks;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 35733, "iOS WebView crashes when loading an URL with encoded parameters", PlatformAffected.iOS)]
+ public class Bugzilla35733 : TestContentPage // or TestMasterDetailPage, etc ...
+ {
+ protected override void Init ()
+ {
+ var thisDoesNotWorkButton = new Button {
+ Text = "This will crash",
+ AutomationId = "btnGo"
+
+ };
+ thisDoesNotWorkButton.Clicked += async (object sender, EventArgs e) => await ShowLocation ("KÃ…RA");
+
+ Content = new StackLayout {
+ VerticalOptions = LayoutOptions.Center,
+ Children = {
+ thisDoesNotWorkButton
+ }
+ };
+ }
+
+ async Task ShowLocation(string locationString)
+ {
+ var stringUri = string.Format("http://m.liu.se/karta/karta?l=en&px_location={0}", Uri.EscapeDataString(locationString));
+ var uri = new Uri(stringUri);
+ var webPage = new ContentPage {
+ Title = "WebViewTest",
+ Content = new WebView {
+ Source = uri
+ }
+ };
+ await Navigation.PushAsync(webPage);
+ }
+
+#if UITEST
+ [Test]
+ public void Bugzilla35733Test ()
+ {
+ RunningApp.WaitForElement (q => q.Marked ("btnGo"));
+ RunningApp.Tap (q => q.Marked ("btnGo"));
+ RunningApp.WaitForElement (q => q.Marked ("WebViewTest"));
+ RunningApp.Screenshot ("I didn't crash");
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35738.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35738.cs
new file mode 100644
index 00000000..e79343b3
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35738.cs
@@ -0,0 +1,41 @@
+using System;
+using System.Diagnostics;
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ public class CustomButton : Button
+ {
+ // In the Android project, there's a custom renderer set up for this type
+ }
+
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 35738, "ButtonRenderer UpdateTextColor function crash", PlatformAffected.Android)]
+ public class Bugzilla35738 : TestContentPage
+ {
+ protected override void Init ()
+ {
+ var label = new Label () { Text = "If you can see the button, this test has passed" };
+ var customButton = new CustomButton () { Text = "This is a custom button", TextColor = Color.Fuchsia };
+
+ Content = new StackLayout () {
+ Children = { label, customButton }
+ };
+ }
+
+#if UITEST
+ [Test]
+ [UiTest (typeof(TestContentPage))]
+ public void CallingOnElementChangedOnCustomButtonShouldNotCrash ()
+ {
+ RunningApp.WaitForElement (q => q.Marked ("This is a custom button"));
+ }
+#endif
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36009.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36009.cs
new file mode 100644
index 00000000..0e0e470d
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36009.cs
@@ -0,0 +1,56 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 36009, "Children of Layouts with data bound IsVisible are not displayed")]
+ public class Bugzilla36009 : TestContentPage // or TestMasterDetailPage, etc ...
+ {
+ [Preserve (AllMembers = true)]
+ public class SampleViewModel: ViewModelBase
+ {
+ public bool IsContentVisible {
+ get{ return GetProperty<bool> (); }
+ set{ SetProperty (value); }
+ }
+ }
+
+ protected override void Init ()
+ {
+ var boxview = new BoxView{ BackgroundColor = Color.Aqua, AutomationId = "Victory" };
+
+ var contentView = new ContentView {
+ Content = boxview
+ };
+
+ contentView.SetBinding (IsVisibleProperty, Binding.Create<SampleViewModel> (t => t.IsContentVisible));
+
+ var layout = new AbsoluteLayout {
+ Children = { contentView }
+ };
+
+ Content = layout;
+
+ var vm = new SampleViewModel ();
+
+ BindingContext = vm;
+
+ vm.IsContentVisible = true;
+ }
+
+#if UITEST
+ [Test]
+ public void Bugzilla36009Test ()
+ {
+ RunningApp.WaitForElement(q => q.Marked("Victory"));
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36014.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36014.cs
new file mode 100644
index 00000000..7e6cd390
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36014.cs
@@ -0,0 +1,16 @@
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Issue (IssueTracker.Bugzilla, 36014, "Picker Control Is Not Rendered Correctly", PlatformAffected.WinPhone)]
+ public class Bugzilla36014 : TestContentPage
+ {
+ protected override void Init ()
+ {
+ var picker = new Picker () { Items = {"Leonardo", "Donatello", "Raphael", "Michaelangelo" } };
+ var label = new Label () {Text = "This test is successful if the picker below spans the width of the screen. If the picker is just a sliver on the left edge of the screen, this test has failed." };
+
+ Content = new StackLayout () { Children = {label, picker}};
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36171.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36171.cs
new file mode 100644
index 00000000..6395e28b
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36171.cs
@@ -0,0 +1,107 @@
+using System;
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using NUnit.Framework;
+using Xamarin.UITest.Queries;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 36171, "WinRT Entry UI not updating on TextChanged",
+ PlatformAffected.WinPhone | PlatformAffected.WinRT)]
+ public class Bugzilla36171 : TestContentPage // or TestMasterDetailPage, etc ...
+ {
+ protected override void Init ()
+ {
+ var entry = new Entry ();
+ var editor = new Editor();
+ var focuseEntryButton = new Button { Text = "Start Entry" };
+ var focuseEditorButton = new Button { Text = "Start Editor" };
+
+ focuseEntryButton.Clicked += (sender, args) => { entry.Focus (); };
+ focuseEditorButton.Clicked += (sender, args) => { editor.Focus (); };
+
+ var entryLabel = new Label { Text = "Type 123A into the Entry below; the entry should display '123'. If the 'A' is displayed, the test has failed. If the cursor resets to the beginning of the Entry after typing 'A', the test has failed." };
+ var editorLabel = new Label { Text = "Type 123A into the Editor below; the entry should display '123'. If the 'A' is displayed, the test has failed. If the cursor resets to the beginning of the Editor after typing 'A', the test has failed." };
+
+ entry.TextChanged += (sender, args) => {
+ var e = sender as Entry;
+
+ int val;
+
+ if(string.IsNullOrEmpty (args.NewTextValue?.Trim ())) {
+ return;
+ }
+
+ // check if this is numeric
+ if(!int.TryParse (args.NewTextValue, out val)) {
+ // put the old value back.
+ e.Text = args.OldTextValue;
+ }
+ };
+
+ editor.TextChanged += (sender, args) => {
+ var e = sender as Editor;
+
+ int val;
+
+ if(string.IsNullOrEmpty (args.NewTextValue?.Trim ())) {
+ return;
+ }
+
+ // check if this is numeric
+ if(!int.TryParse (args.NewTextValue, out val)) {
+ // put the old value back.
+ e.Text = args.OldTextValue;
+ }
+ };
+
+ // Initialize ui here instead of ctor
+ Content = new StackLayout {
+ Children = { focuseEntryButton, entryLabel, entry, focuseEditorButton, editorLabel, editor }
+ };
+ }
+
+#if UITEST
+ [Test]
+ public void EntryTextDoesNotDisplayNonnumericInput ()
+ {
+ RunningApp.WaitForElement ("Start Entry");
+ RunningApp.Tap ("Start Entry");
+
+ RunningApp.EnterText ("123A");
+
+ var entry = RunningApp.Query (q => q.Text("123"));
+ Assert.That(entry.Length >= 1);
+
+ var failedEntry = RunningApp.Query (q => q.Text("123A"));
+ Assert.That(failedEntry.Length == 0);
+
+ RunningApp.EnterText ("4");
+
+ var entry2 = RunningApp.Query (q => q.Text("1234"));
+ Assert.That(entry2.Length >= 1);
+
+ RunningApp.ClearText();
+
+ RunningApp.WaitForElement ("Start Editor");
+ RunningApp.Tap ("Start Editor");
+
+ RunningApp.EnterText ("123A");
+
+ var editor = RunningApp.Query (q => q.Text("123"));
+ Assert.That(editor.Length >= 1);
+
+ var failedEditor = RunningApp.Query (q => q.Text("123A"));
+ Assert.That(failedEditor.Length == 0);
+
+ RunningApp.EnterText ("4");
+
+ var editor2 = RunningApp.Query (q => q.Text("1234"));
+ Assert.That(editor2.Length >= 1);
+ }
+#endif
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36393.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36393.cs
new file mode 100644
index 00000000..6aecc1a8
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36393.cs
@@ -0,0 +1,43 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve(AllMembers = true)]
+ [Issue(IssueTracker.Bugzilla, 36393, "[A] Default Entry/Editor/SearchBar Font Size is 14 instead of 18")]
+ public class Bugzilla36393 : TestContentPage // or TestMasterDetailPage, etc ...
+ {
+ protected override void Init()
+ {
+ var label = new Label { FontSize = 18 };
+ var entry = new Entry { };
+ var editor = new Editor { };
+ var searchBar = new SearchBar { };
+
+ label.Text = $"I am label. FontSize:{label.FontSize}";
+ entry.Text = $"I am entry. FontSize:{entry.FontSize}";
+ editor.Text = $"I am editor. FontSize:{editor.FontSize}";
+ searchBar.Text = $"I am search bar. FontSize:{searchBar.FontSize}";
+
+ // Initialize ui here instead of ctor
+ Content = new StackLayout
+ {
+ Children = { label, entry, editor, searchBar }
+ };
+ }
+
+#if UITEST
+ [Test]
+ public void Issue1Test()
+ {
+ RunningApp.Screenshot("If all of the font sizes are visibly the same size, this test has passed.");
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36479.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36479.cs
new file mode 100644
index 00000000..bf28ff25
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36479.cs
@@ -0,0 +1,43 @@
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve(AllMembers = true)]
+ [Issue(IssueTracker.Bugzilla, 36479, "[WP8] Picker is not disabled when IsEnabled is set to false", PlatformAffected.WinPhone)]
+ public class Bugzilla36479 : TestContentPage
+ {
+ protected override void Init()
+ {
+ var picker = new Picker
+ {
+ IsEnabled = false
+ };
+ picker.Items.Add("item");
+ picker.Items.Add("item 2");
+
+ Content = new StackLayout
+ {
+ Children =
+ {
+ picker,
+ new Button
+ {
+ Command = new Command(() =>
+ {
+ if (picker.IsEnabled)
+ picker.IsEnabled = false;
+ else
+ picker.IsEnabled = true;
+ }),
+ Text = "Enable/Disable Picker"
+ }
+ }
+ };
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36559.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36559.cs
new file mode 100644
index 00000000..660ad880
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36559.cs
@@ -0,0 +1,54 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve(AllMembers = true)]
+ [Issue(IssueTracker.Bugzilla, 36559, "[WP] Navigating to a ContentPage with a Grid inside a TableView affects Entry heights")]
+ public class Bugzilla36559 : TestContentPage
+ {
+ protected override void Init()
+ {
+ var label = new Label { Text = "Label" };
+ var entry = new Entry { AutomationId = "entry" };
+ var grid = new Grid();
+
+ grid.Children.Add(label, 0, 0);
+ grid.Children.Add(entry, 1, 0);
+ var tableView = new TableView
+ {
+ Root = new TableRoot
+ {
+ new TableSection
+ {
+ new ViewCell
+ {
+ View = grid
+ }
+ }
+ }
+ };
+
+ Content = new StackLayout
+ {
+ Children = { tableView }
+ };
+ }
+
+#if UITEST
+ [Test]
+ public void Bugzilla36559Test()
+ {
+ RunningApp.WaitForElement(q => q.Marked("entry"));
+ var results = RunningApp.Query(q => q.Marked("entry"));
+ Assert.AreNotEqual(results[0].Rect.Height, -1);
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36649.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36649.cs
new file mode 100644
index 00000000..06bca7b0
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36649.cs
@@ -0,0 +1,29 @@
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Issue (IssueTracker.Bugzilla, 36649, "LineBreakMode.NoWrap is handled incorrectly on Windows Phone 8.1 RT",
+ PlatformAffected.WinRT)]
+ public class Bugzilla36649 : TestContentPage
+ {
+ protected override void Init ()
+ {
+ var label = new Label {
+ Style = Device.Styles.BodyStyle,
+ FontSize = 20,
+ Text =
+ "This test is successful if the line below does not wrap and does not have an ellipsis at the end of the visible text."
+ };
+ var testLabel = new Label {
+ TextColor = Color.Red,
+ Style = Device.Styles.BodyStyle,
+ FontSize = 20,
+ LineBreakMode = LineBreakMode.NoWrap,
+ Text =
+ "This text should be long enough that it won't fit on the screen, and since the LineBreakMode is set to NoWrap, there should not be an ellipsis at the end of the visible text."
+ };
+
+ Content = new StackLayout { Children = { label, testLabel } };
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36681.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36681.cs
new file mode 100644
index 00000000..d72b82c7
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36681.cs
@@ -0,0 +1,88 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+using System.Collections.Generic;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 36681, "[A] NRE when Picker Replaces Page Content (pre-AppCompat only)", PlatformAffected.Android)]
+ public class Bugzilla36681 : TestTabbedPage // or TestMasterDetailPage, etc ...
+ {
+ public class PickerPage : ContentPage
+ {
+ public Picker Picker { get; private set; }
+ public Label Label { get; private set; }
+ public PickerPage ()
+ {
+ Picker = new Picker { Title = "Select Item", AutomationId = "picker" };
+
+ var items = new List<string> { "item", "item2", "item3", "item4" };
+ foreach (var i in items)
+ Picker.Items.Add (i);
+
+ Picker.FocusChangeRequested += Picker_FocusChangeRequested;
+ Picker.SelectedIndexChanged += Picker_SelectedIndexChanged;
+
+ StackLayout stack = new StackLayout { Padding = 20 };
+ stack.Children.Add (Picker);
+
+ Content = stack;
+ }
+
+ void Picker_FocusChangeRequested (object sender, FocusRequestArgs e)
+ {
+ SwitchContent ();
+ }
+
+ void Picker_SelectedIndexChanged (object sender, EventArgs e)
+ {
+ SwitchContent ();
+ }
+
+ void SwitchContent ()
+ {
+ var x = Parent as TabbedPage;
+ var y = x.CurrentPage as ContentPage;
+ y.Content = new Label {
+ Text = "Success!"
+ };
+ y.Padding = new Thickness (0, 20, 0, 0);
+ }
+ }
+
+ protected override void Init ()
+ {
+ PickerPage pickerPage = new PickerPage { Title = "Picker Page" };
+ Children.Add (pickerPage);
+ Children.Add (new ContentPage { BackgroundColor = Color.Blue, Title = "Page 2" });
+ }
+
+#if UITEST
+ [Test]
+ public void Bugzilla36681Test ()
+ {
+ if (RunningApp is Xamarin.UITest.Android.AndroidApp) {
+ RunningApp.WaitForElement (q => q.Marked ("picker"));
+ RunningApp.Tap ("picker");
+ var ok = RunningApp.Query ("OK");
+ if (ok.Length > 0 && ok[0].Id == "button1" ) { //only in pre-AppCompat; this is the culprit!
+ // We check that the query has any results and that the first
+ // result matched the id "button1" because the query reports a phantom OK button
+ // on Android >= 6.0
+ RunningApp.Tap ("OK");
+ } else {
+ RunningApp.WaitForElement (q => q.Marked ("item2"));
+ RunningApp.Tap ("item2");
+ }
+ RunningApp.WaitForElement (q => q.Marked ("Success!"));
+ }
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36788.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36788.cs
new file mode 100644
index 00000000..76dbbda7
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36788.cs
@@ -0,0 +1,122 @@
+using System;
+using System.Threading.Tasks;
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 36788, "Truncation Issues with Relative Layouts")]
+ public class Bugzilla36788 : TestContentPage // or TestMasterDetailPage, etc ...
+ {
+ Label _resultLabel;
+ Label _testLabel;
+ View _container;
+
+ protected override void Init ()
+ {
+ // Initialize ui here instead of ctor
+ var stackLayout = new StackLayout {
+ Spacing = 8
+ };
+
+ var longString = "Very long text in single line to be truncated at tail. Adding extra text to make sure it gets truncated.";
+
+ var contentView = new ContentView {
+ Padding = 16,
+ BackgroundColor = Color.Gray,
+ Content = new Label {
+ BackgroundColor = Color.Aqua,
+ Text = longString,
+ LineBreakMode = LineBreakMode.TailTruncation
+ }
+ };
+
+ stackLayout.Children.Add (contentView);
+
+ contentView = new ContentView {
+ Padding = 16,
+ BackgroundColor = Color.Gray,
+ Content = new RelativeLayout {
+ BackgroundColor = Color.Navy,
+ Children = {
+ {new Label {
+ BackgroundColor = Color.Blue,
+ Text = longString,
+ LineBreakMode = LineBreakMode.TailTruncation
+ }, Forms.Constraint.Constant (0)},
+ {new Label {
+ BackgroundColor = Color.Fuchsia,
+ Text = longString,
+ LineBreakMode = LineBreakMode.TailTruncation
+ }, Forms.Constraint.Constant (0), Forms.Constraint.Constant (40)},
+ {new Label {
+ BackgroundColor = Color.Fuchsia,
+ Text = longString,
+ LineBreakMode = LineBreakMode.TailTruncation
+ }, Forms.Constraint.Constant (10), Forms.Constraint.Constant (80)},
+ }
+ }
+ };
+
+ stackLayout.Children.Add (contentView);
+
+ contentView = new ContentView {
+ Padding = 16,
+ BackgroundColor = Color.Gray,
+ IsClippedToBounds = true,
+ Content = _container = new RelativeLayout {
+ IsClippedToBounds = true,
+ BackgroundColor = Color.Navy,
+ Children = {
+ {_testLabel = new Label {
+ BackgroundColor = Color.Blue,
+ Text = longString,
+ LineBreakMode = LineBreakMode.TailTruncation
+ }, Forms.Constraint.Constant (0)},
+ {new Label {
+ BackgroundColor = Color.Fuchsia,
+ Text = longString,
+ LineBreakMode = LineBreakMode.TailTruncation
+ }, Forms.Constraint.Constant (0), Forms.Constraint.Constant (40)},
+ {new Label {
+ BackgroundColor = Color.Fuchsia,
+ Text = longString,
+ LineBreakMode = LineBreakMode.TailTruncation
+ }, Forms.Constraint.Constant (10), Forms.Constraint.Constant (80)},
+ }
+ }
+ };
+
+ stackLayout.Children.Add (contentView);
+
+ _resultLabel = new Label ();
+ stackLayout.Children.Add (_resultLabel);
+
+ Content = stackLayout;
+ }
+
+ protected override async void OnAppearing ()
+ {
+ base.OnAppearing ();
+ await Task.Delay (200);
+
+ double fuzzFactor = 15; // labels sometimes overflow slightly, thanks hinting
+
+ if (Math.Abs (_testLabel.Width - _container.Width) < fuzzFactor)
+ _resultLabel.Text = "Passed";
+ }
+
+#if UITEST
+ [Test]
+ public void Bugzilla36788Test ()
+ {
+ RunningApp.WaitForElement (q => q.Marked ("Passed"));
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla37462.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla37462.cs
new file mode 100644
index 00000000..9eebae8b
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla37462.cs
@@ -0,0 +1,88 @@
+using System.Collections.Generic;
+using System.Linq;
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 37462, "Using App Compat/App Compat theme breaks Navigation.RemovePage on Android ",PlatformAffected.Android )]
+ public class Bugzilla37462 : TestNavigationPage
+ {
+ protected override void Init ()
+ {
+ var page1 = new ContentPage { Title = "Page 1" };
+ var button1 = new Button { Text = "Go To 2" };
+ var label1 = new Label { Text = "This is a label on page 1" };
+ page1.Content = new StackLayout { Children = { button1, label1 } };
+ page1.Appearing += (sender, args) => {
+ page1.InvalidateMeasure (InvalidationTrigger.MeasureChanged);
+ };
+
+ var page2 = new ContentPage { Title = "Page 2" };
+ var button2 = new Button { Text = "Go To 3" };
+ var label2 = new Label { Text = "This is a label on page 2" };
+ page2.Content = new StackLayout { Children = { button2, label2 } };
+
+ var page3 = new ContentPage { Title = "Page 3" };
+ var button3 = new Button { Text = "Go To 4" };
+ var label3 = new Label { Text = "This is a label on page 3" };
+ page3.Content = new StackLayout { Children = { button3, label3 } };
+
+ var page4 = new ContentPage { Title = "Page 4" };
+ var button4 = new Button { Text = "Back to 1" };
+ var label4 = new Label { Text = "This is a label on page 4" };
+ page4.Content = new StackLayout { Children = { button4, label4 } };
+
+ button1.Clicked += async (sender, args) => { await Navigation.PushAsync (page2); };
+ button2.Clicked += async (sender, args) => { await Navigation.PushAsync (page3); };
+ button3.Clicked += async (sender, args) => { await Navigation.PushAsync (page4); };
+
+ button4.Clicked += async (sender, args) => {
+ List<Page> existingPages = Navigation.NavigationStack.ToList ();
+
+ // Clear all pages except current and home
+ foreach (Page page in existingPages) {
+ if (page.Title != "Page 1" && page.Title != "Page 4") {
+ Navigation.RemovePage (page);
+ }
+ }
+
+ await Navigation.PopAsync ();
+ };
+
+ Navigation.PushAsync (page1);
+ }
+
+#if UITEST
+ [Test]
+ public void CanRemoveIntermediatePagesAndPopToFirstPage ()
+ {
+ // Start at page 1
+ RunningApp.WaitForElement ("Go To 2");
+ RunningApp.WaitForElement ("This is a label on page 1");
+ RunningApp.Tap ("Go To 2");
+
+ RunningApp.WaitForElement ("Go To 3");
+ RunningApp.Tap ("Go To 3");
+
+ RunningApp.WaitForElement ("Go To 4");
+ RunningApp.Tap ("Go To 4");
+
+ RunningApp.WaitForElement ("Back to 1");
+ RunningApp.Tap ("Back to 1");
+
+ // Clicking "Back to 1" should remove pages 2 and 3 from the stack
+ // Then call PopAsync, which should return to page 1
+ RunningApp.WaitForElement ("Go To 2");
+ RunningApp.WaitForElement ("This is a label on page 1");
+ }
+#endif
+
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla37601.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla37601.cs
new file mode 100644
index 00000000..4d40bd26
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla37601.cs
@@ -0,0 +1,50 @@
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 37601, "ToolbarItem throws error when navigating to TabbedPage ",
+ PlatformAffected.WinPhone)]
+ public class Bugzilla37601 : TestNavigationPage
+ {
+ protected override void Init ()
+ {
+ Navigation.PushAsync (new SelectPage ());
+ }
+ }
+
+ internal class SelectPage : ContentPage
+ {
+ public SelectPage ()
+ {
+ var button = new Button { Text = "Move" };
+
+ var label = new Label {
+ Text =
+ "Click the Move button. If the next page is displayed, the test has passed. If the app crashes, the test has failed."
+ };
+
+ Content = new StackLayout {
+ Children = { label, button }
+ };
+
+ button.Clicked += (sender, args) => { Navigation.PushAsync (new TabbedMain (), true); };
+
+ ToolbarItems.Add (new ToolbarItem { Text = "Log Out" });
+ }
+ }
+
+ internal class TabbedMain : TabbedPage
+ {
+ public TabbedMain ()
+ {
+ var page1 = new ContentPage { Title = "Page1" };
+ page1.Content = new StackLayout {
+ Children = { new Label { Text = "If you can see this, we haven't crashed. Yay!" } }
+ };
+
+ Children.Add (page1);
+ Children.Add (new ContentPage { Title = "Page2" });
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla37625.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla37625.cs
new file mode 100644
index 00000000..dd5f9819
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla37625.cs
@@ -0,0 +1,36 @@
+using System;
+using System.Threading.Tasks;
+
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 37625, "App crashes when quickly adding/removing Image views (Windows UWP)")]
+ public class Bugzilla37625 : TestContentPage // or TestMasterDetailPage, etc ...
+ {
+ protected override async void Init ()
+ {
+ int retry = 5;
+ while (retry-- >= 0) {
+ var imageUri = new Uri ("https://xamarin.com/content/images/pages/products/platform.png");
+ Content = new Image () { Source = new UriImageSource () { Uri = imageUri }, BackgroundColor = Color.Black, AutomationId = "success" };
+
+ await Task.Delay (50);
+ }
+ }
+
+#if UITEST
+ [Test]
+ public void Bugzilla37625Test ()
+ {
+ RunningApp.WaitForElement (q => q.Marked ("success"));
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla37841.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla37841.cs
new file mode 100644
index 00000000..2a8e236a
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla37841.cs
@@ -0,0 +1,153 @@
+using System.Collections;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Runtime.CompilerServices;
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve(AllMembers = true)]
+ [Issue(IssueTracker.Bugzilla, 37841, "TableView EntryCells and TextCells cease to update after focus change", PlatformAffected.Android)]
+ public class Bugzilla37841 : TestContentPage
+ {
+ _37841ViewModel _viewModel;
+
+ protected override void Init ()
+ {
+ _viewModel = new _37841ViewModel ();
+
+ var instructions = new Label { FontSize = 16, Text = @"Click on the Generate button.
+The EntryCell should display '12345' and the TextCell should display '6789'.
+Click on the Generate button a second time.
+The EntryCell should display '112358' and the TextCell should display '48151623'." };
+
+ var button = new Button { Text = "Generate" };
+ button.SetBinding (Button.CommandProperty, nameof (_37841ViewModel.GetNextNumbersCommand));
+
+ var random1 = new EntryCell { IsEnabled = false, Label = "Entry Cell" };
+ random1.SetBinding (EntryCell.TextProperty, nameof (_37841ViewModel.Value1));
+
+ var textCell = new TextCell { IsEnabled = false, Detail = "TextCell" };
+ textCell.SetBinding (TextCell.TextProperty, nameof (_37841ViewModel.Value2));
+
+ var buttonViewCell = new ViewCell { View = button };
+
+ var section = new TableSection ("") {
+ random1,
+ textCell,
+ buttonViewCell
+ };
+
+ var root = new TableRoot { section };
+ var tv = new TableView { Root = root };
+
+ Content = new StackLayout {
+ Children = { instructions, tv }
+ };
+
+ BindingContext = _viewModel;
+ }
+
+ [Preserve (AllMembers = true)]
+ public class _37841ViewModel : INotifyPropertyChanged
+ {
+ public int Value1
+ {
+ get { return _value1; }
+ set
+ {
+ if (value != _value1) {
+ _value1 = value;
+ RaisePropertyChanged ();
+ }
+ }
+ }
+
+ public int Value2
+ {
+ get { return _value2; }
+ set
+ {
+ if (value != _value2) {
+ _value2 = value;
+ RaisePropertyChanged ();
+ }
+ }
+ }
+
+ public Command GetNextNumbersCommand
+ => _getNextNumbersCommand ?? (_getNextNumbersCommand = new Command (ExecuteGenerateRandomCommand));
+
+ class SomeNumbers : IEnumerable<int>
+ {
+ public IEnumerator<int> GetEnumerator ()
+ {
+ while (true) {
+ yield return 12345;
+ yield return 6789;
+ yield return 112358;
+ yield return 48151623;
+ }
+ }
+
+ IEnumerator IEnumerable.GetEnumerator ()
+ {
+ return GetEnumerator ();
+ }
+ }
+
+ readonly IEnumerator<int> _numberList = new SomeNumbers ().GetEnumerator ();
+
+ void ExecuteGenerateRandomCommand ()
+ {
+ _numberList.MoveNext ();
+ Value1 = _numberList.Current;
+ _numberList.MoveNext ();
+ Value2 = _numberList.Current;
+ }
+
+ void RaisePropertyChanged ([CallerMemberName] string propertyName = null)
+ {
+ PropertyChangedEventHandler handler = PropertyChanged;
+
+ handler?.Invoke (this, new PropertyChangedEventArgs (propertyName));
+ }
+
+ #region INotifyPropertyChanged implementation
+
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ #endregion
+
+ Command _getNextNumbersCommand;
+ int _value1;
+ int _value2;
+ }
+
+#if UITEST
+ [Test]
+ public void TextAndEntryCellsDataBindInTableView()
+ {
+ RunningApp.WaitForElement ("Generate");
+ RunningApp.Tap("Generate");
+
+ RunningApp.Screenshot ("First Generate Tap");
+
+ RunningApp.WaitForElement("12345");
+ RunningApp.WaitForElement("6789");
+
+ RunningApp.Tap("Generate");
+
+ RunningApp.Screenshot("Second Generate Tap");
+
+ RunningApp.WaitForElement("112358");
+ RunningApp.WaitForElement("48151623");
+ }
+#endif
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla37863.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla37863.cs
new file mode 100644
index 00000000..4dd635c4
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla37863.cs
@@ -0,0 +1,26 @@
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 37863, "Password is readable when Entry.IsEnabled is false ",
+ PlatformAffected.WinPhone)]
+ public class Bugzilla37863 : TestContentPage
+ {
+ protected override void Init ()
+ {
+ var label = new Label {
+ Text =
+ "Click the button to toggle IsEnabled on the password entry below. The actual password text should never show. If the text shows, the test has failed."
+ };
+ var entry = new Entry { IsPassword = true, Text = "swordfish" };
+ var button = new Button { Text = "Toggle IsEnabled" };
+
+ button.Clicked += (sender, args) => { entry.IsEnabled = !entry.IsEnabled; };
+
+ Content = new StackLayout {
+ Children = { label, entry, button }
+ };
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla38105.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla38105.cs
new file mode 100644
index 00000000..ebb353f6
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla38105.cs
@@ -0,0 +1,59 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 38105, "RemovePage does not cause back arrow to go away on Android",
+ NavigationBehavior.PushModalAsync)]
+ internal class Bugzilla38105 : TestMasterDetailPage
+ {
+ protected override void Init ()
+ {
+ Detail = new NavigationPage (new ViewA ());
+
+ var button = new Button () { Text = "Click me" };
+ button.Clicked += (o, e) => {
+ var navPage = (NavigationPage)Detail;
+
+ var rootPage = navPage.CurrentPage;
+
+ navPage.PopToRootAsync (false);
+
+ navPage.Navigation.PushAsync (new ViewB ());
+
+ navPage.Navigation.RemovePage (rootPage);
+
+ IsPresented = false;
+ };
+
+ Master = new ContentPage () {
+ Title = "test",
+ Content = button
+ };
+ }
+
+ public class ViewA : ContentPage
+ {
+ public ViewA ()
+ {
+ Title = "View A";
+ }
+ }
+
+ public class ViewB : ContentPage
+ {
+ public ViewB ()
+ {
+ Title = "View B";
+ }
+ }
+ }
+}
+
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla38112.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla38112.cs
new file mode 100644
index 00000000..bab6f2d9
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla38112.cs
@@ -0,0 +1,98 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 38112, "Switch becomes reenabled when previous ViewCell is removed from TableView", PlatformAffected.Android)]
+ public class Bugzilla38112 : TestContentPage
+ {
+ bool _removed;
+ protected override void Init ()
+ {
+ var layout = new StackLayout ();
+ var button = new Button { Text = "Click" };
+ var tablesection = new TableSection { Title = "Switches" };
+ var tableview = new TableView { Intent = TableIntent.Form, Root = new TableRoot { tablesection } };
+ var viewcell1 = new ViewCell {
+ View = new StackLayout {
+ HorizontalOptions = LayoutOptions.FillAndExpand,
+ Orientation = StackOrientation.Horizontal,
+ Children = {
+ new Label { Text = "Switch 1", HorizontalOptions = LayoutOptions.StartAndExpand },
+ new Switch { AutomationId = "switch1", HorizontalOptions = LayoutOptions.End, IsToggled = true }
+ }
+ }
+ };
+ var viewcell2 = new ViewCell {
+ View = new StackLayout {
+ HorizontalOptions = LayoutOptions.FillAndExpand,
+ Orientation = StackOrientation.Horizontal,
+ Children = {
+ new Label { Text = "Switch 2", HorizontalOptions = LayoutOptions.StartAndExpand },
+ new Switch { AutomationId = "switch2", HorizontalOptions = LayoutOptions.End, IsToggled = true }
+ }
+ }
+ };
+ Label label = new Label { Text = "Switch 3", HorizontalOptions = LayoutOptions.StartAndExpand };
+ Switch switchie = new Switch { AutomationId = "switch3", HorizontalOptions = LayoutOptions.End, IsToggled = true, IsEnabled = false };
+ switchie.Toggled += (sender, e) => {
+ label.Text = "FAIL";
+ };
+ var viewcell3 = new ViewCell {
+ View = new StackLayout {
+ HorizontalOptions = LayoutOptions.FillAndExpand,
+ Orientation = StackOrientation.Horizontal,
+ Children = {
+ label,
+ switchie,
+ }
+ }
+ };
+
+ tablesection.Add (viewcell1);
+ tablesection.Add (viewcell2);
+ tablesection.Add (viewcell3);
+
+ button.Clicked += (sender, e) => {
+ if (_removed)
+ tablesection.Insert (1, viewcell2);
+ else
+ tablesection.Remove (viewcell2);
+
+ _removed = !_removed;
+ };
+
+ layout.Children.Add (button);
+ layout.Children.Add (tableview);
+
+ Content = layout;
+ }
+
+#if UITEST
+ [Test]
+ public void Bugzilla38112_SwitchIsStillOnScreen ()
+ {
+ RunningApp.WaitForElement (q => q.Marked ("Click"));
+ RunningApp.Tap (q => q.Marked ("Click"));
+ RunningApp.WaitForElement (q => q.Marked ("switch3"));
+ }
+
+ [Test]
+ public void Bugzilla38112_SwitchIsStillDisabled ()
+ {
+ RunningApp.WaitForElement (q => q.Marked ("Click"));
+ RunningApp.Tap (q => q.Marked ("Click"));
+ RunningApp.WaitForElement (q => q.Marked ("switch3"));
+ RunningApp.Tap (q => q.Marked ("switch3"));
+ RunningApp.WaitForNoElement (q => q.Marked ("FAIL"));
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla38416.xaml b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla38416.xaml
new file mode 100644
index 00000000..4815563a
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla38416.xaml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<local:TestContentPage xmlns="http://xamarin.com/schemas/2014/forms"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+ xmlns:local="clr-namespace:Xamarin.Forms.Controls"
+ x:Class="Xamarin.Forms.Controls.Bugzilla38416">
+ <local:TestContentPage.Content>
+ <StackLayout>
+ <Button Text="Swap Visibility" Clicked="SwapVisibilityClicked" HorizontalOptions="FillAndExpand" />
+ <BoxView x:Name="Box" BackgroundColor="Red" WidthRequest="50" HorizontalOptions="Center" />
+
+ <StackLayout x:Name="FirstLayout" VerticalOptions="FillAndExpand">
+ <ListView x:Name="FirstListView"
+ HasUnevenRows="True"
+ VerticalOptions="FillAndExpand">
+ <ListView.ItemTemplate>
+ <DataTemplate>
+ <!--<ViewCell>
+ <Label Text="{Binding Name}" FontSize="19"/>
+ </ViewCell>-->
+ <TextCell Text="{Binding Name}"/>
+ </DataTemplate>
+ </ListView.ItemTemplate>
+ </ListView>
+ </StackLayout>
+ </StackLayout>
+ </local:TestContentPage.Content>
+</local:TestContentPage> \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla38416.xaml.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla38416.xaml.cs
new file mode 100644
index 00000000..98012901
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla38416.xaml.cs
@@ -0,0 +1,48 @@
+using System;
+using System.Collections.ObjectModel;
+
+using Xamarin.Forms;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 38416, "ListView Sized Incorrectly After Containing Layout's Visibility is Toggled")]
+ public partial class Bugzilla38416 : TestContentPage
+ {
+ [Preserve (AllMembers = true)]
+ public class ListItem
+ {
+ public string Name { get; set; }
+ }
+
+#if !UITEST
+ void SwapVisibilityClicked(object sender, EventArgs e)
+ {
+ Box.IsVisible = !Box.IsVisible;
+ FirstLayout.IsVisible = !FirstLayout.IsVisible;
+ //FirstListView.IsVisible = !FirstListView.IsVisible; //Workaround. Has to be called after the layout's visibility
+ }
+#endif
+
+ protected override void Init ()
+ {
+#if !UITEST
+ InitializeComponent();
+
+ var items = new ObservableCollection<ListItem>();
+ FirstListView.ItemsSource = items;
+
+ for(int i=0; i<70; i++)
+ {
+ items.Add(new ListItem { Name = string.Format("List Item {0}", i+1) });
+ }
+
+ Box.IsVisible = true;
+ //FirstListView.IsVisible = false; //Workaround
+ FirstLayout.IsVisible = false;
+#endif
+ }
+
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla38658.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla38658.cs
new file mode 100644
index 00000000..b907a658
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla38658.cs
@@ -0,0 +1,74 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 38658, "Rotation causes app containing CarouselPage to freeze", PlatformAffected.iOS)]
+ public class Bugzilla38658 : TestTabbedPage // or TestMasterDetailPage, etc ...
+ {
+ public class TestCarouselPage : CarouselPage
+ {
+ public TestCarouselPage ()
+ {
+ Children.Add (new ContentPage () {
+ Content = new StackLayout {
+ Children = {
+ new Label { Text = "Rotate the device to Landscape and back to Portrait. If the app hangs, this test has failed." },
+ new BoxView { Color = Color.Red, HeightRequest = 200, WidthRequest = 200 }
+ }
+ }
+ });
+ Children.Add (new ContentPage () {
+ Content = new StackLayout {
+ Children = {
+ new Label { Text = "Rotate the device to Landscape and back to Portrait. If the app hangs, this test has failed." },
+ new BoxView { Color = Color.Green, HeightRequest = 200, WidthRequest = 200 }
+ }
+ }
+ });
+ }
+ }
+ public class StartPage : ContentPage
+ {
+ public StartPage ()
+ {
+ Button button = new Button {
+ AutomationId = "btn",
+ Text = "Click"
+ };
+ button.Clicked += button_Clicked;
+ Content = button;
+ }
+
+ async void button_Clicked (object sender, EventArgs e)
+ {
+ await Navigation.PushAsync (new TestCarouselPage ());
+ }
+ }
+
+ protected override void Init ()
+ {
+ Children.Add (new NavigationPage (new StartPage () { Title = "Page" }));
+ }
+
+#if UITEST
+ [Test]
+ public void Bugzilla38658Test ()
+ {
+ RunningApp.WaitForElement (q => q.Marked ("btn"));
+ RunningApp.Tap (q => q.Marked ("btn"));
+ RunningApp.SetOrientationLandscape ();
+ RunningApp.SetOrientationPortrait ();
+ RunningApp.Back ();
+ RunningApp.WaitForElement (q => q.Marked ("btn"));
+ }
+#endif
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla38827.xaml b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla38827.xaml
new file mode 100644
index 00000000..2c0cd86d
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla38827.xaml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+ x:Class="Xamarin.Forms.Controls.Issues.Bugzilla38827">
+ <ScrollView>
+ <Grid RowSpacing="5"
+ ColumnSpacing="5">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto"/>
+ <RowDefinition Height="*"/>
+ <RowDefinition Height="Auto"/>
+ </Grid.RowDefinitions>
+
+ <StackLayout>
+ <Label HorizontalTextAlignment="Center"
+ HorizontalOptions="FillAndExpand"
+ AutomationId="LoginPageIdentifier"
+ FontSize="Large"
+ Text="Sign in with your Xamarin account to save and sync favorites and session feedback. Sign in with your Xamarin account to save and sync favorites and session feedback. Sign in with your Xamarin account to save and sync favorites and session feedback. Sign in with your Xamarin account to save and sync favorites and session feedback."/>
+
+ </StackLayout>
+ </Grid>
+ </ScrollView>
+</ContentPage> \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla38827.xaml.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla38827.xaml.cs
new file mode 100644
index 00000000..c686c2bf
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla38827.xaml.cs
@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+using Xamarin.Forms;
+
+namespace Xamarin.Forms.Controls.Issues
+{
+ public partial class Bugzilla38827 : ContentPage
+ {
+ public Bugzilla38827 ()
+ {
+#if !UITEST
+ InitializeComponent ();
+#endif
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla38978.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla38978.cs
new file mode 100644
index 00000000..9d8ce68b
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla38978.cs
@@ -0,0 +1,90 @@
+using System;
+using System.Linq;
+
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 38978, "Cell.ForceUpdateSize issues with row selection/deselection (ViewCell)", PlatformAffected.Android)]
+ public class Bugzilla38978 : TestContentPage // or TestMasterDetailPage, etc ...
+ {
+ [Preserve (AllMembers = true)]
+ public class MyViewCell : ViewCell
+ {
+ Image _image;
+ public MyViewCell ()
+ {
+ _image = new Image {
+ Source = ImageSource.FromFile ("oasis.jpg"),
+ HeightRequest = 50
+ };
+
+ Label label = new Label { Text = "Click the image to resize", VerticalOptions = LayoutOptions.Center };
+
+ var tapGestureRecognizer = new TapGestureRecognizer ();
+ tapGestureRecognizer.Tapped += (object sender, EventArgs e) => {
+ if (_image.HeightRequest < 250) {
+ _image.HeightRequest = _image.Height + 100;
+ ForceUpdateSize ();
+ label.Text = "If the tapped image is not larger, this test has failed.";
+ }
+ };
+ _image.GestureRecognizers.Add (tapGestureRecognizer);
+
+ var stackLayout = new StackLayout {
+ Padding = new Thickness (20, 5, 5, 5),
+ Orientation = StackOrientation.Horizontal,
+ Children = {
+ _image,
+ label
+ }
+ };
+
+ View = stackLayout;
+ }
+
+ protected override void OnBindingContextChanged ()
+ {
+ base.OnBindingContextChanged ();
+ var item = BindingContext?.ToString();
+ if (string.IsNullOrWhiteSpace (item))
+ return;
+
+ _image.AutomationId = item;
+ }
+ }
+
+ protected override void Init ()
+ {
+ var listView = new ListView {
+ HasUnevenRows = true,
+ ItemTemplate = new DataTemplate (typeof (MyViewCell)),
+ ItemsSource = Enumerable.Range (0, 10)
+ };
+
+ Content = new StackLayout {
+ Padding = new Thickness (0, 20, 0, 0),
+ Children = {
+ listView
+ }
+ };
+ }
+
+#if UITEST
+ [Test]
+ [Category("ManualReview")]
+ public void Bugzilla38978Test ()
+ {
+ RunningApp.WaitForElement (q => q.Marked ("2"));
+ RunningApp.Tap (q => q.Marked ("2"));
+ RunningApp.Screenshot("If the tapped image is not larger, this test has failed.");
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39331.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39331.cs
new file mode 100644
index 00000000..d58c752b
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39331.cs
@@ -0,0 +1,71 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 39331, "[Android] BoxView Is InputTransparent Even When Set to False")]
+ public class Bugzilla39331 : TestContentPage
+ {
+ View _busyBackground;
+ Button _btnLogin;
+
+ protected override void Init ()
+ {
+ AbsoluteLayout layout = new AbsoluteLayout {
+ HorizontalOptions = LayoutOptions.FillAndExpand,
+ VerticalOptions = LayoutOptions.FillAndExpand,
+ };
+
+ BackgroundColor = Color.FromUint (0xFFDBDBDB);
+
+ _btnLogin = new Button {
+ HorizontalOptions = LayoutOptions.FillAndExpand,
+
+ Text = "Press me",
+ BackgroundColor = Color.FromUint (0xFF6E932D),
+ TextColor = Color.White,
+ };
+ _btnLogin.Clicked += BtnLogin_Clicked;
+ layout.Children.Add (_btnLogin, new Rectangle (0.5f, 0.5f, 0.25f, 0.25f), AbsoluteLayoutFlags.All);
+
+ _busyBackground = new BoxView {
+ BackgroundColor = new Color (0, 0, 0, 0.5f),
+ IsVisible = false,
+ InputTransparent = false
+ };
+ layout.Children.Add (_busyBackground, new Rectangle (0, 0, 1, 1), AbsoluteLayoutFlags.SizeProportional);
+
+ Content = layout;
+ }
+
+ void BtnLogin_Clicked (object sender, EventArgs e)
+ {
+
+ if (!_busyBackground.IsVisible) {
+ _btnLogin.Text = "Blocked?";
+ _busyBackground.IsVisible = true;
+ } else {
+ _btnLogin.Text = "Guess Not";
+ _busyBackground.IsVisible = false;
+ }
+ }
+
+#if UITEST
+ [Test]
+ public void Bugzilla34912Test ()
+ {
+ RunningApp.Tap (q => q.Marked ("Press me"));
+ RunningApp.WaitForElement (q => q.Marked ("Blocked?"));
+ RunningApp.Tap (q => q.Marked ("Blocked?"));
+ RunningApp.WaitForNoElement (q => q.Marked ("Guess Not"));
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39395.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39395.cs
new file mode 100644
index 00000000..8abb0445
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39395.cs
@@ -0,0 +1,30 @@
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 39395, "SwitchCell does not take all available place inside ListView",
+ PlatformAffected.WinRT)]
+ public class Bugzilla39395 : TestContentPage
+ {
+ protected override void Init ()
+ {
+ var instructions = new Label {
+ FontSize = 18,
+ Text =
+ "The switch cells below should be aligned with the right edge of the screen. If they are not, this test has failed."
+ };
+
+ Content = new StackLayout {
+ BackgroundColor = Color.Gray,
+ Children = {
+ instructions,
+ new ListView {
+ ItemTemplate = new DataTemplate (typeof(SwitchCell)),
+ ItemsSource = new[] { "Text", "Text" }
+ }
+ }
+ };
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39461.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39461.cs
new file mode 100644
index 00000000..fe896c54
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39461.cs
@@ -0,0 +1,36 @@
+using Xamarin.Forms.CustomAttributes;
+using System.Text;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve(AllMembers = true)]
+ [Issue(IssueTracker.Bugzilla, 39461, "[UWP] Labels within a ScrollView are blurred", PlatformAffected.WinRT)]
+ public class Bugzilla39461 : TestContentPage
+ {
+ protected override void Init()
+ {
+ StringBuilder text = new StringBuilder();
+ for (int i = 0; i < 10000; i++)
+ {
+ text.Append("text ");
+ }
+
+ var top = new ScrollView { Content = new Label { FontSize = 12, TextColor = Color.Red, Text = text.ToString() } };
+ AbsoluteLayout.SetLayoutFlags(top, AbsoluteLayoutFlags.All);
+ AbsoluteLayout.SetLayoutBounds(top, new Rectangle(0, 0, 1, 0.5));
+
+ var bottom = new Label { FontSize = 12, TextColor = Color.Red, Text = text.ToString() };
+ AbsoluteLayout.SetLayoutFlags(bottom, AbsoluteLayoutFlags.All);
+ AbsoluteLayout.SetLayoutBounds(bottom, new Rectangle(0, 1, 1, 0.5));
+
+ var layout = new AbsoluteLayout { Children = { top, bottom } };
+
+ Content = layout;
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39463.xaml b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39463.xaml
new file mode 100644
index 00000000..b1932867
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39463.xaml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+ x:Class="Xamarin.Forms.Controls.Issues.Bugzilla39463">
+ <ListView x:Name="lvView" RowHeight="100" >
+ <ListView.ItemTemplate>
+ <DataTemplate>
+ <ViewCell>
+ <ViewCell.View>
+ <ContentView BackgroundColor="Yellow">
+ <Label Text="{Binding }" TextColor="Black" />
+ </ContentView>
+ </ViewCell.View>
+ </ViewCell>
+ </DataTemplate>
+ </ListView.ItemTemplate>
+ </ListView>
+</ContentPage> \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39463.xaml.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39463.xaml.cs
new file mode 100644
index 00000000..05fb4c1d
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39463.xaml.cs
@@ -0,0 +1,33 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+using Xamarin.Forms;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls.Issues
+{
+ [Preserve(AllMembers = true)]
+ [Issue(IssueTracker.Bugzilla, 39463, "Items not showing in ListView using DataTemplate when there are more items than can fit on screen", PlatformAffected.WinPhone)]
+ public partial class Bugzilla39463 : ContentPage
+ {
+ public Bugzilla39463 ()
+ {
+ #if !UITEST
+ InitializeComponent ();
+
+ var n = 16;
+
+ var listStr = new List<string>();
+ for (int i = 0; i < n; i++)
+ {
+ listStr.Add("Test : " + i);
+ }
+
+ lvView.ItemsSource = listStr;
+#endif
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39483.xaml b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39483.xaml
new file mode 100644
index 00000000..1e81a65e
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39483.xaml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+ x:Class="Xamarin.Forms.Controls.Issues.Bugzilla39483">
+
+
+<ListView ItemsSource="{Binding DataList}">
+ <ListView.ItemTemplate>
+ <DataTemplate>
+ <ViewCell >
+ <ViewCell.ContextActions>
+ <MenuItem Text="Menü 1" />
+ <MenuItem Text="Menü 2" />
+ <MenuItem Text="Menü 3" />
+ <MenuItem Text="Menü 4" />
+ </ViewCell.ContextActions>
+ <ViewCell.View>
+ <Label Text="{Binding .}" />
+ </ViewCell.View>
+ </ViewCell>
+ </DataTemplate>
+ </ListView.ItemTemplate>
+</ListView>
+</ContentPage> \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39483.xaml.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39483.xaml.cs
new file mode 100644
index 00000000..2b910b7c
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39483.xaml.cs
@@ -0,0 +1,50 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+using Xamarin.Forms;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls.Issues
+{
+ [Issue(IssueTracker.Bugzilla, 39483, "ListView Context Menu localization", PlatformAffected.iOS)]
+ public partial class Bugzilla39483 : ContentPage
+ {
+ public Bugzilla39483 ()
+ {
+#if APP
+
+ InitializeComponent ();
+
+ BindingContext = new DemoViewModel();
+
+#endif
+ }
+ }
+
+ public class DemoViewModel : ViewModelBase
+ {
+ public DemoViewModel()
+ {
+ DataList = new List<string>();
+ DataList.Add("Listenelement 1");
+ DataList.Add("Listenelement 2");
+ DataList.Add("Listenelement 3");
+ DataList.Add("Listenelement 4");
+ }
+
+ List<string> _dataList;
+ public List<string> DataList
+ {
+ get
+ {
+ return _dataList;
+ }
+ set { _dataList = value;
+ OnPropertyChanged();
+ }
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39499.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39499.cs
new file mode 100644
index 00000000..44fa2899
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39499.cs
@@ -0,0 +1,134 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+using System.Collections;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Collections.ObjectModel;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 39499, "CarouselViewTest")]
+ public sealed class CarouselViewContentPage : TestContentPage // or TestMasterDetailPage, etc ...
+ {
+ [Preserve (AllMembers = true)]
+ public sealed class Item
+ {
+ static int s_id = 0;
+
+ int id;
+
+ internal Item()
+ {
+ id = s_id++;
+ }
+
+ public int Id => id;
+ }
+
+ [Preserve (AllMembers = true)]
+ public sealed class ItemView : ContentView
+ {
+ public ItemView ()
+ {
+ var idLabel = new Label () { StyleId = "id", TextColor = Color.White };
+ idLabel.SetBinding (Label.TextProperty, nameof(Item.Id));
+
+ var stackLayout = new StackLayout {
+ Children = {
+ new Label { Text = "Target" },
+ new Label { Text = "Stack" }
+ },
+ BackgroundColor = Color.Red
+ };
+
+ var button = CreateButton ("Hide Target Stack", () => {
+ stackLayout.IsVisible = false;
+ });
+
+ Content = new StackLayout {
+ Children = {
+ idLabel,
+ button,
+ stackLayout,
+ }
+ };
+ }
+
+ Button CreateButton(string text, Action clicked)
+ {
+ var button = new Button ();
+ button.Text = text;
+ button.Clicked += (s, e) => {
+ clicked ();
+ };
+ return button;
+ }
+ }
+
+ static readonly IList<Item> Items = new ObservableCollection<Item> () {
+ new Item(),
+ new Item(),
+ };
+
+ Button CreateButton(string text, Action onClicked = null)
+ {
+ var button = new Button {
+ Text = text
+ };
+
+ if (onClicked != null)
+ button.Clicked += (s, e) => onClicked();
+
+ return button;
+ }
+
+ protected override void Init ()
+ {
+ BackgroundColor = Color.Blue;
+
+ var carouselView = new CarouselView {
+ BackgroundColor = Color.Purple,
+ ItemsSource = Items,
+ ItemTemplate = new DataTemplate(typeof(ItemView)),
+ Position = 0
+ };
+
+ var moveBar = new StackLayout {
+ Orientation = StackOrientation.Horizontal,
+ HorizontalOptions = LayoutOptions.FillAndExpand,
+ Children = {
+ CreateButton ("<<", () => carouselView.Position = 0),
+ CreateButton ("<", () => { try { carouselView.Position--; } catch { } }),
+ CreateButton (">", () => { try { carouselView.Position++; } catch { } }),
+ CreateButton (">>", () => carouselView.Position = Items.Count - 1)
+ }
+ };
+
+ Content = new StackLayout {
+ Children = {
+ carouselView,
+ moveBar,
+ }
+ };
+ }
+
+#if UITEST
+ //[Test]
+ public void CarouselViewTest ()
+ {
+ var app = RunningApp;
+ app.Screenshot ("I am at Issue 1");
+ app.WaitForElement (q => q.Marked ("Remove"));
+
+ app.Screenshot ("I see the Label");
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39530.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39530.cs
new file mode 100644
index 00000000..7f510ab6
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39530.cs
@@ -0,0 +1,85 @@
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using NUnit.Framework;
+using Xamarin.UITest.Queries;
+using Xamarin.Forms.Core.UITests;
+#endif
+
+namespace Xamarin.Forms.Controls.Issues
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 39530, "Frames do not handle pan or pinch gestures under AppCompat", PlatformAffected.Android)]
+ public class Bugzilla39530 : TestContentPage
+ {
+ protected override void Init ()
+ {
+ var taps = new Label { Text = "Taps: 0" };
+ var pans = new Label ();
+ var pinches = new Label ();
+
+ var pangr = new PanGestureRecognizer ();
+ var tapgr = new TapGestureRecognizer ();
+ var pinchgr = new PinchGestureRecognizer ();
+
+ var frame = new Frame {
+ HasShadow = false,
+ HorizontalOptions = LayoutOptions.Fill,
+ VerticalOptions = LayoutOptions.Fill,
+ BackgroundColor = Color.White,
+ Padding = new Thickness (5),
+ HeightRequest = 300,
+ WidthRequest = 300,
+ AutomationId = "frame"
+ };
+
+ var tapCount = 0;
+
+ tapgr.Command = new Command (() => {
+ tapCount += 1;
+ taps.Text = $"Taps: {tapCount}";
+ });
+
+ pangr.PanUpdated += (sender, args) => pans.Text = $"Panning: {args.StatusType}";
+
+ pinchgr.PinchUpdated += (sender, args) => pinches.Text = $"Pinching: {args.Status}";
+
+ frame.GestureRecognizers.Add (tapgr);
+ frame.GestureRecognizers.Add (pangr);
+ frame.GestureRecognizers.Add(pinchgr);
+
+ Content = new StackLayout {
+ BackgroundColor = Color.Olive,
+ Children = { taps, pans, pinches, frame }
+ };
+ }
+
+#if UITEST
+ [Test]
+ public void Bugzilla39530PanTest()
+ {
+ AppRect frameBounds = RunningApp.Query (q => q.Marked ("frame"))[0].Rect;
+ RunningApp.Pan (new Drag (frameBounds, frameBounds.X + 10, frameBounds.Y + 10, frameBounds.X + 100, frameBounds.Y + 100, Drag.Direction.LeftToRight));
+
+ RunningApp.WaitForElement (q => q.Marked ("Panning: Completed"));
+ }
+
+ [Test]
+ public void Bugzilla39530PinchTest()
+ {
+ RunningApp.PinchToZoomIn ("frame");
+ RunningApp.WaitForElement(q => q.Marked("Pinching: Completed"));
+ }
+
+ [Test]
+ public void Bugzilla39530TapTest()
+ {
+ RunningApp.WaitForElement (q => q.Marked ("frame"));
+ RunningApp.Tap ("frame");
+ RunningApp.WaitForElement (q => q.Marked ("Taps: 1"));
+ RunningApp.Tap ("frame");
+ RunningApp.WaitForElement (q => q.Marked ("Taps: 2"));
+ }
+#endif
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39624.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39624.cs
new file mode 100644
index 00000000..eddd1b06
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39624.cs
@@ -0,0 +1,40 @@
+using System.Diagnostics;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 39624, "CarouselPage.Children Appear Out of Order", PlatformAffected.WinRT)]
+ public class Bugzilla39624 : TestCarouselPage
+ {
+ protected override void Init ()
+ {
+ var instructions =
+ "Flip through each page of the carousel from 1 to 5; the pages should display in order. Then flip backward to page 1; if any of the pages display out of order, the test has failed.";
+
+ Children.Add (GeneratePage ("Page 1", Color.Red, instructions));
+ Children.Add (GeneratePage ("Page 2", Color.Green, instructions));
+ Children.Add (GeneratePage ("Page 3", Color.Blue, instructions));
+ Children.Add (GeneratePage ("Page 4", Color.Purple, instructions));
+ Children.Add (GeneratePage ("Page 5", Color.Black, instructions));
+
+ CurrentPageChanged += (sender, args) => Debug.WriteLine (CurrentPage.Title);
+ }
+
+ ContentPage GeneratePage (string title, Color color, string instructions)
+ {
+ var page = new ContentPage {
+ Content = new StackLayout {
+ Children = {
+ new Label { Text = title, FontSize = 24, TextColor = Color.White },
+ new Label { Text = instructions, TextColor = Color.White }
+ }
+ },
+ BackgroundColor = color,
+ Title = title
+ };
+
+ return page;
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39668.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39668.cs
new file mode 100644
index 00000000..547e39aa
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39668.cs
@@ -0,0 +1,51 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+using System.Linq;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 39668, "Overriding ListView.CreateDefault Does Not Work on Windows", PlatformAffected.WinRT)]
+ public class Bugzilla39668 : TestContentPage
+ {
+ [Preserve (AllMembers = true)]
+ public class CustomListView : ListView
+ {
+ protected override Cell CreateDefault (object item)
+ {
+ var cell = new ViewCell ();
+
+ cell.View = new StackLayout {
+ BackgroundColor = Color.Green,
+ Children = {
+ new Label { Text = "Success" }
+ }
+ };
+
+ return cell;
+ }
+ }
+
+ protected override void Init ()
+ {
+ CustomListView lv = new CustomListView () {
+ ItemsSource = Enumerable.Range (0, 10)
+ };
+ Content = new StackLayout { Children = { new Label { Text = "If the ListView does not have green Cells, this test has failed." }, lv } };
+ }
+
+#if UITEST
+ [Test]
+ public void Bugzilla39668Test ()
+ {
+ RunningApp.WaitForElement (q => q.Marked ("Success"));
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/CarouselAsync.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/CarouselAsync.cs
new file mode 100644
index 00000000..d6e9b19a
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/CarouselAsync.cs
@@ -0,0 +1,114 @@
+using System;
+using System.Diagnostics;
+using System.Linq;
+using System.Threading.Tasks;
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using NUnit.Framework;
+using Xamarin.UITest;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.None, 0, "Carousel Async Add Page Issue", PlatformAffected.All, NavigationBehavior.PushModalAsync)]
+ public class CarouselAsync : TestCarouselPage
+ {
+ protected override void Init ()
+ {
+ Children.Add (new ContentPage {
+ BackgroundColor = Color.Red,
+ Content = new Label {
+ Text = "Page One"
+ }
+ });
+ Children.Add (new ContentPage {
+ BackgroundColor = Color.Green,
+ Content = new Label {
+ Text = "Page Two"
+ }
+ });
+ Update (this);
+ }
+
+ static void Update (CarouselPage page)
+ {
+ Device.StartTimer (TimeSpan.FromSeconds (1), () => {
+ page.Children.Remove (page.Children.Skip (1).First () as ContentPage);
+ Device.StartTimer (TimeSpan.FromSeconds (1), () => {
+ page.Children.Add (new ContentPage {
+ BackgroundColor = Color.Blue,
+ Content = new Label {
+ Text = "Page Two - Added"
+ }
+ });
+ page.Children.Add (new ContentPage {
+ BackgroundColor = Color.Gray,
+ Content = new Label {
+ Text = "Page Three - Added"
+ }
+ });
+ return false;
+ });
+ return false;
+ });
+ }
+
+#if UITEST
+ [Test]
+ [Description ("All elements renderered")]
+ public void CarouselAsycTestsAllElementsPresent ()
+ {
+ RunningApp.WaitForElement (q => q.Marked ("Page One"));
+ RunningApp.Screenshot ("All elements present");
+ }
+
+ [Test]
+ [Description ("Async Pages inserted into a CarouselPage")]
+ public void CarouselAsycTestsAllPagesExistAfterAsyncAdding ()
+ {
+ RunningApp.WaitForElement (q => q.Marked ("Page One"));
+
+ var window = RunningApp.Query (q => q.Raw ("*").Index (0));
+ var width = window [0].Rect.Width;
+ var height = window [0].Rect.Height;
+
+ System.Threading.Thread.Sleep (3000);
+
+ // TODO Implement swipe left and swipe right
+ //App.DragFromTo (width - 10.0f, height / 2.0f, 10.0f, height / 2.0f);
+ //App.WaitForElement (q => q.Marked ("Page Two - Added"));
+ //App.Screenshot ("At Page 2");
+
+ //Thread.Sleep (3000);
+
+ //App.DragFromTo (width - 10.0f, height / 2.0f, 10.0f, height / 2.0f);
+ //App.WaitForElement (q => q.Marked ("Page Three - Added"));
+ //App.Screenshot ("At Page 3");
+ }
+
+/*******************************************************/
+/**************** Landscape tests **********************/
+/*******************************************************/
+
+ [Test]
+ [Description ("All elements renderered - landscape")]
+ public void CarouselAsycTestsAllElementsPresentLandscape ()
+ {
+ RunningApp.SetOrientationLandscape ();
+ CarouselAsycTestsAllElementsPresent ();
+ RunningApp.SetOrientationPortrait ();
+ }
+
+ [Test]
+ [Description ("Async Pages inserted into a CarouselPage - landscape")]
+ public void CarouselAsycTestsAllPagesExistAfterAsyncAddingLandscape ()
+ {
+ RunningApp.SetOrientationLandscape ();
+ CarouselAsycTestsAllPagesExistAfterAsyncAdding ();
+ RunningApp.SetOrientationPortrait ();
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/ComplexListView.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/ComplexListView.cs
new file mode 100644
index 00000000..2e2fa690
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/ComplexListView.cs
@@ -0,0 +1,111 @@
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.None, 0, "Complex ListView", PlatformAffected.All)]
+ public class ComplexListView
+ : ContentPage
+ {
+ public ComplexListView()
+ {
+ Performance.Clear();
+
+ var showPerf = new Button { Text = "Performance" };
+ showPerf.Clicked += (sender, args) => {
+ Performance.DumpStats();
+ Performance.Clear();
+ };
+
+ Content = new StackLayout {
+ Orientation = StackOrientation.Vertical,
+ Children = {
+ showPerf,
+ new ListView {
+ ItemTemplate = new DataTemplate (typeof (ComplexViewCell)),
+ ItemsSource =
+ new[] {
+ "a", "b", "c", "a", "b", "c", "a", "b", "c", "a", "b", "c", "a", "b", "c", "a", "b", "c", "a", "b", "c", "a",
+ "b", "c", "a", "b", "c", "a", "b", "c", "a", "b", "c", "a", "b", "c"
+ }
+ }
+ }
+ };
+ }
+ }
+
+ internal class ComplexViewCell
+ : ViewCell
+ {
+ static ImageSource s_mImgProdCount;
+ static ImageSource s_mImgEndTime;
+ static ImageSource s_mImgRenewal;
+
+ public ComplexViewCell()
+ {
+ if (s_mImgProdCount == null)
+ s_mImgProdCount = ImageSource.FromFile ("bank.png");
+ if (s_mImgEndTime == null)
+ s_mImgEndTime = ImageSource.FromFile ("bank.png");
+ if (s_mImgRenewal == null)
+ s_mImgRenewal = ImageSource.FromFile ("bank.png");
+
+ var label1 = new Label { Text = "Label 1", Font = Font.SystemFontOfSize (NamedSize.Small, FontAttributes.Bold) };
+ label1.SetBinding (Label.TextProperty, new Binding ("."));
+
+ var label2 = new Label { Text = "Label 2", Font = Font.SystemFontOfSize (NamedSize.Small) };
+
+ // was ListButton?
+ var button = new Button {
+ Text = "X",
+ BackgroundColor = Color.Gray,
+ HorizontalOptions = LayoutOptions.EndAndExpand
+ };
+ button.SetBinding (Button.CommandParameterProperty, new Binding ("."));
+ button.Clicked += (sender, e) => {
+ var b = (Button) sender;
+ var t = b.CommandParameter;
+ ((ContentPage) ((ListView) ((StackLayout) b.ParentView).ParentView).ParentView).DisplayAlert ("Clicked",
+ t + " button was clicked", "OK");
+ Debug.WriteLine ("clicked" + t);
+ };
+
+ Image imgProdCount = new Image {
+ Aspect = Aspect.AspectFit,
+ Source = s_mImgProdCount,
+ };
+
+ Image imgEndTime = new Image {
+ Aspect = Aspect.AspectFit,
+ Source = s_mImgEndTime,
+ };
+
+ Image imgRenewal = new Image {
+ Aspect = Aspect.AspectFit,
+ Source = s_mImgRenewal,
+ };
+
+ View = new StackLayout {
+ Orientation = StackOrientation.Horizontal,
+ HorizontalOptions = LayoutOptions.StartAndExpand,
+ Padding = new Thickness (15, 5, 5, 15),
+ Children = {
+ new StackLayout {
+ Orientation = StackOrientation.Vertical,
+ Children = { label1, label2 }
+ },
+ button,
+ imgProdCount,
+ imgEndTime,
+ imgRenewal
+ }
+ };
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/DataTemplateGridImageTest.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/DataTemplateGridImageTest.cs
new file mode 100644
index 00000000..75de0ed7
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/DataTemplateGridImageTest.cs
@@ -0,0 +1,55 @@
+using System;
+using System.Collections.Generic;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.None, 0, "Images in DataTemplates with Grids don't show until resize on UWP",
+ PlatformAffected.WinRT)]
+ public class DataTemplateGridImageTest : TestContentPage
+ {
+ protected override void Init ()
+ {
+ var instructions = new Label { FontSize = 24, Text = "The first ListView below should have a Xamarin logo visible in it. The second should have a pink image with white writing. If either image is not displayed, this test has failed." };
+
+ ImageSource remoteSource =
+ ImageSource.FromUri (new Uri ("https://xamarin.com/content/images/pages/branding/assets/xamagon.png"));
+ ImageSource localSource = ImageSource.FromFile ("oasis.jpg");
+
+ var remoteImage = new Image { Source = remoteSource, BackgroundColor = Color.Red };
+ var localImage = new Image { Source = localSource, BackgroundColor = Color.Red };
+
+ var listViewRemoteImage = new ListView {
+ BackgroundColor = Color.Green,
+ ItemTemplate = new DataTemplate (() => new TestCellGridImage (remoteImage)),
+ ItemsSource = new List<string> { "1" }
+ };
+
+ var listViewLocalImage = new ListView {
+ BackgroundColor = Color.Green,
+ ItemTemplate = new DataTemplate (() => new TestCellGridImage (localImage)),
+ ItemsSource = new List<string> { "1" }
+ };
+
+ Content = new StackLayout {
+ Children = {
+ instructions,
+ listViewRemoteImage,
+ listViewLocalImage
+ }
+ };
+ }
+
+ [Preserve (AllMembers = true)]
+ public class TestCellGridImage : ViewCell
+ {
+ public TestCellGridImage (View image)
+ {
+ var grid = new Grid { BackgroundColor = Color.Yellow, WidthRequest = 200, HeightRequest = 200 };
+ grid.Children.Add (image);
+ View = grid;
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/DefaultColorToggleTest.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/DefaultColorToggleTest.cs
new file mode 100644
index 00000000..6f6cec09
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/DefaultColorToggleTest.cs
@@ -0,0 +1,146 @@
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.None, 0, "Default colors toggle test", PlatformAffected.All)]
+ public class DefaultColorToggleTest : ContentPage
+ {
+ Button _buttonColorDefaultToggle;
+ Button _buttonColorInitted;
+ Label _labelColorDefaultToggle;
+ Label _labelColorInitted;
+
+ public DefaultColorToggleTest ()
+ {
+ _buttonColorDefaultToggle = new Button {
+ Text = "Default Button Color"
+ };
+
+ _buttonColorInitted = new Button {
+ Text = "I should be red",
+ TextColor = Color.Red
+ };
+
+ _labelColorDefaultToggle = new Label {
+ Text = "Default Label Color"
+ };
+
+ _labelColorInitted = new Label {
+ Text = "I should be blue",
+ TextColor = Color.Blue
+ };
+
+ _buttonColorDefaultToggle.Clicked += (s, e) => {
+ if (_buttonColorDefaultToggle.TextColor == Color.Default) {
+ _buttonColorDefaultToggle.TextColor = Color.Red;
+ _buttonColorDefaultToggle.Text = "Custom Button Color";
+ } else {
+ _buttonColorDefaultToggle.TextColor = Color.Default;
+ _buttonColorDefaultToggle.Text = "Default Button Color";
+ }
+
+ };
+
+ _labelColorDefaultToggle.GestureRecognizers.Add (new TapGestureRecognizer{Command = new Command (o=>{
+ if (_labelColorDefaultToggle.TextColor == Color.Default) {
+ _labelColorDefaultToggle.TextColor = Color.Green;
+ _labelColorDefaultToggle.Text = "Custom Label Color";
+ } else {
+ _labelColorDefaultToggle.TextColor = Color.Default;
+ _labelColorDefaultToggle.Text = "Default Label Color";
+ }
+ })});
+
+ var entryTextColorDefaultToggle = new Entry () { Text = "Default Entry Text Color" };
+ var entryTextColorInit = new Entry () { Text = "Should Be Red", TextColor = Color.Red };
+ var entryToggleButton = new Button () { Text = "Toggle Entry Color" };
+ entryToggleButton.Clicked += (sender, args) => {
+ if (entryTextColorDefaultToggle.TextColor.IsDefault) {
+ entryTextColorDefaultToggle.TextColor = Color.Fuchsia;
+ entryTextColorDefaultToggle.Text = "Should Be Fuchsia";
+ } else {
+ entryTextColorDefaultToggle.TextColor = Color.Default;
+ entryTextColorDefaultToggle.Text = "Default Entry Text Color";
+ }
+ };
+
+ var entryPlaceholderColorDefaultToggle = new Entry () { Placeholder = "Default Placeholder Color" };
+ var entryPlaceholderColorInit = new Entry () { Placeholder = "Should Be Lime", PlaceholderColor = Color.Lime };
+ var entryPlaceholderToggleButton = new Button () { Text = "Toggle Placeholder Color" };
+ entryPlaceholderToggleButton.Clicked += (sender, args) => {
+ if (entryPlaceholderColorDefaultToggle.PlaceholderColor.IsDefault) {
+ entryPlaceholderColorDefaultToggle.PlaceholderColor = Color.Lime;
+ entryPlaceholderColorDefaultToggle.Placeholder = "Should Be Lime";
+ } else {
+ entryPlaceholderColorDefaultToggle.PlaceholderColor = Color.Default;
+ entryPlaceholderColorDefaultToggle.Placeholder = "Default Placeholder Color";
+ }
+ };
+
+ var passwordColorDefaultToggle = new Entry () { IsPassword = true, Text = "Default Password Color" };
+ var passwordColorInit = new Entry () { IsPassword = true, Text = "Should Be Red", TextColor = Color.Red };
+ var passwordToggleButton = new Button () { Text = "Toggle Password Box (Default)" };
+ passwordToggleButton.Clicked += (sender, args) => {
+ if (passwordColorDefaultToggle.TextColor.IsDefault) {
+ passwordColorDefaultToggle.TextColor = Color.Red;
+ passwordToggleButton.Text = "Toggle Password Box (Red)";
+ } else {
+ passwordColorDefaultToggle.TextColor = Color.Default;
+ passwordToggleButton.Text = "Toggle Password Box (Default)";
+ }
+ };
+
+ var searchbarTextColorDefaultToggle = new Entry () { Text = "Default SearchBar Text Color" };
+ var searchbarTextColorToggleButton = new Button () { Text = "Toggle SearchBar Color" };
+ searchbarTextColorToggleButton.Clicked += (sender, args) => {
+ if (searchbarTextColorDefaultToggle.TextColor.IsDefault) {
+ searchbarTextColorDefaultToggle.TextColor = Color.Fuchsia;
+ searchbarTextColorDefaultToggle.Text = "Should Be Fuchsia";
+ } else {
+ searchbarTextColorDefaultToggle.TextColor = Color.Default;
+ searchbarTextColorDefaultToggle.Text = "Default SearchBar Text Color";
+ }
+ };
+
+ var searchbarPlaceholderColorDefaultToggle = new Entry () { Placeholder = "Default Placeholder Color" };
+ var searchbarPlaceholderToggleButton = new Button () { Text = "Toggle Placeholder Color" };
+ searchbarPlaceholderToggleButton .Clicked += (sender, args) => {
+ if (searchbarPlaceholderColorDefaultToggle.PlaceholderColor.IsDefault) {
+ searchbarPlaceholderColorDefaultToggle.PlaceholderColor = Color.Lime;
+ searchbarPlaceholderColorDefaultToggle.Placeholder = "Should Be Lime";
+ } else {
+ searchbarPlaceholderColorDefaultToggle.PlaceholderColor = Color.Default;
+ searchbarPlaceholderColorDefaultToggle.Placeholder = "Default Placeholder Color";
+ }
+ };
+
+ Title = "Test Color Toggle Page";
+
+ Content = new ScrollView () {
+ Content = new StackLayout {
+ Children = {
+ _buttonColorDefaultToggle,
+ _buttonColorInitted,
+ _labelColorDefaultToggle,
+ _labelColorInitted,
+ entryTextColorDefaultToggle,
+ entryToggleButton,
+ entryTextColorInit,
+ entryPlaceholderColorDefaultToggle,
+ entryPlaceholderToggleButton,
+ entryPlaceholderColorInit,
+ passwordColorDefaultToggle,
+ passwordToggleButton,
+ passwordColorInit,
+ searchbarTextColorDefaultToggle,
+ searchbarTextColorToggleButton,
+ searchbarPlaceholderColorDefaultToggle,
+ searchbarPlaceholderToggleButton
+ }
+ }
+ };
+ }
+
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/DisposedSharedPages.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/DisposedSharedPages.cs
new file mode 100644
index 00000000..ae996383
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/DisposedSharedPages.cs
@@ -0,0 +1,70 @@
+using System;
+
+using Xamarin.Forms;
+
+namespace Xamarin.Forms.Controls
+{
+ public class DisposePage : ContentPage
+ {
+ public event EventHandler RendererDisposed;
+
+ public void SendRendererDisposed ()
+ {
+ var handler = RendererDisposed;
+ if (handler != null)
+ handler (this, EventArgs.Empty);
+ }
+
+ public int DisposedLabelCount { get; private set; }
+
+ public Action PopAction { get; set; }
+ public DisposePage ()
+ {
+ var popButton = new Button {Text = "Pop"};
+ popButton.Clicked += (sender, args) => PopAction ();
+
+ var disposeLabel1 = new DisposeLabel {Text = "Label 1"};
+ var disposeLabel2 = new DisposeLabel {Text = "Label 2"};
+ var disposeLabel3 = new DisposeLabel {Text = "Label 3"};
+ var disposeLabel4 = new DisposeLabel {Text = "Label 4"};
+ var disposeLabel5 = new DisposeLabel {Text = "Label 5"};
+
+ EventHandler disposeHandler = (sender, args) => DisposedLabelCount++;
+ disposeLabel1.RendererDisposed += disposeHandler;
+ disposeLabel2.RendererDisposed += disposeHandler;
+ disposeLabel3.RendererDisposed += disposeHandler;
+ disposeLabel4.RendererDisposed += disposeHandler;
+ disposeLabel5.RendererDisposed += disposeHandler;
+
+ Content = new StackLayout {
+ Children = {
+ popButton,
+ disposeLabel1,
+ disposeLabel2,
+ disposeLabel3,
+ disposeLabel4,
+ new StackLayout {
+ Children = {
+ disposeLabel5,
+ }
+ }
+ }
+ };
+ }
+ }
+
+ public class DisposeLabel : Label
+ {
+ public event EventHandler RendererDisposed;
+
+ public void SendRendererDisposed ()
+ {
+ var handler = RendererDisposed;
+ if (handler != null)
+ handler (this, EventArgs.Empty);
+ }
+ }
+
+}
+
+
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/InputTransparentIssue.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/InputTransparentIssue.cs
new file mode 100644
index 00000000..c6c12a70
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/InputTransparentIssue.cs
@@ -0,0 +1,37 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls.Issues
+{
+
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 30000, "InputTransparentIssue")]
+ public class InputTransparentIssue : TestContentPage
+ {
+ protected override void Init ()
+ {
+ var abs = new AbsoluteLayout();
+ var box = new BoxView { Color = Color.Red };
+ var label = new Label { BackgroundColor = Color.Green , InputTransparent = true };
+ abs.Children.Add(box, new Rectangle(0, 0, 1, 1), AbsoluteLayoutFlags.All);
+ abs.Children.Add(label, new Rectangle(0, 0, AbsoluteLayout.AutoSize, AbsoluteLayout.AutoSize), AbsoluteLayoutFlags.PositionProportional);
+ label.Text = DateTime.Now.ToString();
+ box.GestureRecognizers.Add(new TapGestureRecognizer
+ {
+ Command = new Command(() =>
+ {
+ label.Text = DateTime.Now.ToString();
+ })
+ });
+ Image img = new Image { Source = ImageSource.FromFile("oasis.jpg"), InputTransparent = true };
+ abs.Children.Add(img, new Rectangle(.5, .5, .5, .5), AbsoluteLayoutFlags.All);
+ Content = abs ;
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/IsPasswordToggleTest.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/IsPasswordToggleTest.cs
new file mode 100644
index 00000000..e3bcfb2d
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/IsPasswordToggleTest.cs
@@ -0,0 +1,38 @@
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.None, 0, "IsPassword toggle test", PlatformAffected.All)]
+ public class IsPasswordToggleTest : TestContentPage
+ {
+ protected override void Init ()
+ {
+ var entry = new Entry {
+ Text = "Setec Astronomy",
+ FontFamily = "Comic Sans MS",
+ HorizontalTextAlignment = TextAlignment.Center,
+ Keyboard = Keyboard.Chat
+ };
+
+ var label = new Label ();
+ var binding = new Binding ("Text") { Source = entry };
+
+ var otherEntry = new Entry ();
+ var otherBinding = new Binding ("Text") { Source = entry, Mode = BindingMode.TwoWay };
+ otherEntry.SetBinding (Entry.TextProperty, otherBinding);
+
+ label.SetBinding (Label.TextProperty, binding);
+
+ var explanation = new Label() {Text = @"The Text value of the entry at the top should appear in the label and entry below, regardless of whether 'IsPassword' is on.
+Changes to the value in the entry below should be reflected in the entry at the top."};
+
+ var button = new Button { Text = "Toggle IsPassword" };
+ button.Clicked += (sender, args) => { entry.IsPassword = !entry.IsPassword; };
+
+ Content = new StackLayout {
+ Children = { entry, button, explanation, label, otherEntry }
+ };
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/IsShowingUserIssue.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/IsShowingUserIssue.cs
new file mode 100644
index 00000000..6c0be388
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/IsShowingUserIssue.cs
@@ -0,0 +1,35 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+using Xamarin.Forms.Maps;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.None, 0, "IsShowingUser renderes as pin instead of dot")]
+ public class IsShowingUserIssue : TestContentPage
+ {
+ protected override void Init ()
+ {
+ var map = new Map (MapSpan.FromCenterAndRadius (new Position(37.79, -122.4), Distance.FromMiles(2))) {
+ AutomationId = "FormsMap",
+ IsShowingUser = true
+ };
+
+ Content = map;
+ }
+
+#if UITEST
+ public void IsShowingUserIssueTest ()
+ {
+ RunningApp.Screenshot ("I should see a map");
+ Assert.Inconclusive ("Verify that user location is visible and a dot");
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1025.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1025.cs
new file mode 100644
index 00000000..65b17e5d
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1025.cs
@@ -0,0 +1,24 @@
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 1025, "StackLayout broken when image missing", PlatformAffected.iOS, NavigationBehavior.PushModalAsync)]
+ public class Issue1025 : ContentPage
+ {
+ public Issue1025 ()
+ {
+ BackgroundColor = Color.FromHex("#dae1eb");
+ Content = new StackLayout {
+ Orientation = StackOrientation.Vertical,
+ Children = {
+ new Image {},
+ new Label {Text = "Lorem ipsum dolor" },
+ new Label {Text = "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."},
+ new Button {BackgroundColor = Color.FromHex ("#fec240"), Text = "Create an account" },
+ new Button {BackgroundColor = Color.FromHex ("#04acdb"), Text = "Login" },
+ }
+ };
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1026.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1026.cs
new file mode 100644
index 00000000..58c2b646
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1026.cs
@@ -0,0 +1,91 @@
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 1026, "Label cropping", PlatformAffected.iOS | PlatformAffected.WinPhone, NavigationBehavior.PushModalAsync)]
+ public class Issue1026 : ContentPage
+ {
+ public Issue1026 ()
+ {
+ BackgroundColor = Color.FromHex("#dae1eb");
+ Content =
+ new ScrollView {
+ Content =
+ new StackLayout {
+ Padding = new Thickness (0, 18),
+ Spacing = 10,
+ Orientation = StackOrientation.Vertical,
+ Children = {
+ new Button {
+ BackgroundColor = Color.FromHex ("#006599"),
+ TextColor = Color.White,
+ Text = "Subscribe with LinkedIn",
+ WidthRequest = 262,
+ HorizontalOptions = LayoutOptions.Center,
+ BorderRadius = 0,
+ },
+// new Label {
+// Text = "or by email",
+// TextColor = Color.FromHex ("#666"),
+// XAlign = TextAlignment.Center,
+// Font = Font.SystemFontOfSize (NamedSize.Small),
+// WidthRequest = 262,
+// HorizontalOptions = LayoutOptions.Center,
+// },
+ new Entry {
+ Placeholder = "Professional email",
+ WidthRequest = 262,
+ HorizontalOptions = LayoutOptions.Center,
+ Keyboard = Keyboard.Email,
+ },
+ new Entry {
+ Placeholder = "Firstname",
+ WidthRequest = 262,
+ HorizontalOptions = LayoutOptions.Center,
+ },
+ new Entry {
+ Placeholder = "Lastname",
+ WidthRequest = 262,
+ HorizontalOptions = LayoutOptions.Center,
+ },
+ new Entry {
+ Placeholder = "Company",
+ WidthRequest = 262,
+ HorizontalOptions = LayoutOptions.Center,
+ },
+ new Entry {
+ Placeholder = "Password",
+ WidthRequest = 262,
+ IsPassword = true,
+ HorizontalOptions = LayoutOptions.Center,
+ },
+ new Entry {
+ Placeholder = "Confirm password",
+ WidthRequest = 262,
+ IsPassword = true,
+ HorizontalOptions = LayoutOptions.Center,
+ },
+ new Button {
+ BackgroundColor = Color.FromHex ("#05addc"),
+ TextColor = Color.White,
+ Text = "Create an account",
+ WidthRequest = 262,
+ HorizontalOptions = LayoutOptions.Center,
+ BorderRadius = 0,
+ },
+ new Label {
+ Text = "by subscribing, you accept the general conditions.",
+ TextColor = Color.White,
+ XAlign = TextAlignment.Center,
+ Font = Font.SystemFontOfSize (NamedSize.Micro),
+ WidthRequest = 262,
+ HorizontalOptions = LayoutOptions.Center,
+ },
+ },
+ },
+
+ };
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1028.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1028.cs
new file mode 100644
index 00000000..4ef26e78
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1028.cs
@@ -0,0 +1,31 @@
+using System.Diagnostics;
+
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 1028, "ViewCell in TableView raises exception - root page is ContentPage, Content is TableView" ,PlatformAffected.WinPhone, NavigationBehavior.PushModalAsync)]
+ public class Issue1028 : ContentPage
+ {
+ // Issue1028, ViewCell with StackLayout causes exception when nested in a table section. This occurs when the app's root page is a ContentPage with a TableView.
+ public Issue1028 ()
+ {
+ Content = new TableView {
+ Root = new TableRoot ("Table Title") {
+ new TableSection ("Section 1 Title") {
+ new ViewCell {
+ View = new StackLayout {
+ Children = {
+ new Label {
+ Text = "Custom Slider View:"
+ },
+ }
+ }
+ }
+ }
+ }
+ };
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1075.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1075.cs
new file mode 100644
index 00000000..54a8eb9a
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1075.cs
@@ -0,0 +1,85 @@
+using System.Diagnostics;
+using System.Reflection;
+
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 1075, "Does not update Color", PlatformAffected.Android | PlatformAffected.WinPhone)]
+ public class Issue1075 : ContentPage
+ {
+ // Issue1075
+ // BoxView doesn't update color
+ public Issue1075 ()
+ {
+ Label header = new Label
+ {
+ Text = "Picker",
+ Font = Font.BoldSystemFontOfSize(50),
+ HorizontalOptions = LayoutOptions.Center
+ };
+
+ Picker picker = new Picker
+ {
+ Title = "Color",
+ VerticalOptions = LayoutOptions.CenterAndExpand
+ };
+
+ foreach (string color in new string[]
+ {
+ "Aqua", "Black", "Blue", "Fuschia",
+ "Gray", "Green", "Lime", "Maroon",
+ "Navy", "Olive", "Purple", "Red",
+ "Silver", "Teal", "White", "Yellow"
+ })
+ {
+ picker.Items.Add(color);
+ }
+
+ // Create BoxView for displaying pickedColor
+ BoxView boxView = new BoxView
+ {
+ WidthRequest = 150,
+ HeightRequest = 150,
+ HorizontalOptions = LayoutOptions.Center,
+ VerticalOptions = LayoutOptions.CenterAndExpand
+ };
+
+ var button = new Button {
+ Text = "Change to blue",
+ Command = new Command (() => boxView.BackgroundColor = Color.Aqua)
+ };
+
+ picker.SelectedIndexChanged += (sender, args) =>
+ {
+ if (picker.SelectedIndex == -1)
+ {
+ boxView.Color = Color.Default;
+ }
+ else
+ {
+ string selectedItem = picker.Items[picker.SelectedIndex];
+ FieldInfo colorField = typeof(Color).GetTypeInfo().GetDeclaredField(selectedItem);
+ boxView.Color = (Color)colorField.GetValue(null);
+ }
+ };
+
+ // Accomodate iPhone status bar.
+ Padding = new Thickness(10, Device.OnPlatform(20, 0, 0), 10, 0);
+
+ // Build the page.
+ Content = new StackLayout
+ {
+ Children =
+ {
+ header,
+ picker,
+ boxView,
+ button
+ }
+ };
+ }
+ }
+
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1097.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1097.cs
new file mode 100644
index 00000000..7b67e1e2
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1097.cs
@@ -0,0 +1,60 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 1097, "Not resizing elements on rotation", PlatformAffected.iOS)]
+ public class Issue1097 : ContentPage
+ {
+ public Issue1097 ()
+ {
+ Grid grid = new Grid {
+ RowSpacing = 0,
+ ColumnSpacing = 0,
+ };
+
+ grid.AddRowDef(count: 2);
+ grid.AddColumnDef(count : 2);
+
+ grid.Children.Add(new BoxView() { Color = Color.Red });
+
+ var v2 = new BoxView { Color = Color.Blue };
+ Grid.SetColumn(v2, 1);
+ grid.Children.Add(v2);
+
+ var v3 = new BoxView { Color = Color.Green };
+ Grid.SetRow(v3, 1);
+ grid.Children.Add(v3);
+
+ var v4 = new BoxView { Color = Color.Purple };
+ Grid.SetRow(v4, 1);
+ Grid.SetColumn(v4, 1);
+ grid.Children.Add(v4);
+
+ Content = grid;
+ }
+ }
+ public static class GridExtensions
+ {
+ public static void AddRowDef(this Grid grid, double size = 1, GridUnitType type = GridUnitType.Star, int count = 1)
+ {
+ for (int i = 0; i < count; i++) {
+ grid.RowDefinitions.Add(new RowDefinition() {
+ Height = new GridLength(size, type)
+ });
+ }
+ }
+
+ public static void AddColumnDef(this Grid grid, double size = 1, GridUnitType type = GridUnitType.Star, int count = 1)
+ {
+ for (int i = 0; i < count; i++) {
+ grid.ColumnDefinitions.Add(new ColumnDefinition() {
+ Width = new GridLength(size, type)
+ });
+ }
+ }
+ }
+}
+
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1146.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1146.cs
new file mode 100644
index 00000000..a3466229
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1146.cs
@@ -0,0 +1,48 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using NUnit.Framework;
+using Xamarin.UITest;
+#endif
+
+namespace Xamarin.Forms.Controls.TestCasesPages
+{
+ [Preserve (AllMembers=true)]
+ [Issue(IssueTracker.Github, 1146, "Disabled Switch in Button Gallery not rendering on all devices", PlatformAffected.Android)]
+ public class Issue1146 : TestContentPage
+ {
+ protected override void Init ()
+ {
+ Content = new ScrollView
+ {
+ Content = new StackLayout
+ {
+ Padding = new Size(20, 20),
+ Children = {
+ new StackLayout {
+ Orientation = StackOrientation.Horizontal,
+ Children= {
+ new Switch() { IsEnabled = false , AutomationId="switch"},
+ },
+ },
+ }
+ }
+ };
+ }
+
+#if UITEST
+ [Test]
+ public void TestSwitchDisable()
+ {
+ RunningApp.WaitForElement (c => c.Marked ("switch"));
+ RunningApp.Screenshot("Is the button here?");
+ }
+#endif
+
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1219.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1219.cs
new file mode 100644
index 00000000..078682a8
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1219.cs
@@ -0,0 +1,19 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 1219, "Setting ToolbarItems in ContentPage constructor crashes app", PlatformAffected.iOS)]
+ public class Issue1219 : ContentPage
+ {
+ public Issue1219 ()
+ {
+ ToolbarItems.Add(new ToolbarItem ("MenuItem", "", () => {
+
+ }));
+ }
+ }
+}
+
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1228.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1228.cs
new file mode 100644
index 00000000..70ba1a74
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1228.cs
@@ -0,0 +1,67 @@
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 1228, "ScrollView not auto scrolling with Editor", PlatformAffected.iOS)]
+ public class Issue1228 : ContentPage
+ {
+ public Issue1228 ()
+ {
+ var grd = new Grid ();
+
+ var layout = new StackLayout ();
+
+ var picker = new Picker { BackgroundColor = Color.Pink };
+ picker.Items.Add ("A");
+ picker.Items.Add ("B");
+ picker.Items.Add ("C");
+ picker.Items.Add ("D");
+ picker.Items.Add ("E");
+ layout.Children.Add (picker);
+
+ layout.Children.Add (new Editor { BackgroundColor = Color.Red, VerticalOptions = LayoutOptions.End });
+ layout.Children.Add (new Editor { BackgroundColor = Color.Red, VerticalOptions = LayoutOptions.End });
+ layout.Children.Add (new Editor { BackgroundColor = Color.Red, VerticalOptions = LayoutOptions.End });
+ layout.Children.Add (new Editor { BackgroundColor = Color.Red, VerticalOptions = LayoutOptions.End });
+ layout.Children.Add (new Editor { BackgroundColor = Color.Red, VerticalOptions = LayoutOptions.End });
+ layout.Children.Add (new Editor { BackgroundColor = Color.Red, VerticalOptions = LayoutOptions.End });
+
+ layout.Children.Add (new SearchBar {
+ BackgroundColor = Color.Gray,
+ CancelButtonColor = Color.Red
+ });
+
+ layout.Children.Add (new Editor { BackgroundColor = Color.Red, VerticalOptions = LayoutOptions.End });
+ layout.Children.Add (new Editor { BackgroundColor = Color.Red, VerticalOptions = LayoutOptions.End });
+ layout.Children.Add (new Editor { BackgroundColor = Color.Red, VerticalOptions = LayoutOptions.End });
+ layout.Children.Add (new Editor { BackgroundColor = Color.Red, VerticalOptions = LayoutOptions.End });
+ layout.Children.Add (new Editor { BackgroundColor = Color.Red, VerticalOptions = LayoutOptions.End });
+ layout.Children.Add (new Editor { BackgroundColor = Color.Red, VerticalOptions = LayoutOptions.End });
+ layout.Children.Add (new Editor { BackgroundColor = Color.Red, VerticalOptions = LayoutOptions.End });
+ layout.Children.Add (new Editor { BackgroundColor = Color.Red, VerticalOptions = LayoutOptions.End });
+
+ layout.Children.Add (new Entry { BackgroundColor = Color.Blue });
+ layout.Children.Add (new SearchBar {
+ BackgroundColor = Color.Gray,
+ CancelButtonColor = Color.Red
+ });
+ grd.Children.Add (layout);
+
+
+ Content = new ContentView {
+ Content = new ScrollView {
+ Padding = new Thickness (0, 20, 0, 0),
+ Orientation = ScrollOrientation.Vertical,
+ Content = grd,
+ HeightRequest = 400,
+ VerticalOptions = LayoutOptions.Start
+ },
+ BackgroundColor = Color.Lime,
+ HeightRequest = 400
+
+ };
+ }
+ }
+}
+
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1236.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1236.cs
new file mode 100644
index 00000000..9737fdd6
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1236.cs
@@ -0,0 +1,26 @@
+using System;
+using System.Threading.Tasks;
+
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 1236, "Label binding", PlatformAffected.iOS)]
+ public class Issue1236 : ContentPage
+ {
+ public Issue1236 ()
+ {
+ Content = new Label { HeightRequest = 30, WidthRequest = 200, BackgroundColor = Color.Purple.WithLuminosity (.7) };
+ Content.SetBinding (Label.TextProperty, ".");
+
+ DelayUpdatingBindingContext ();
+ }
+
+ async void DelayUpdatingBindingContext ()
+ {
+ await Task.Delay (2000);
+ BindingContext = "Lorem Ipsum Dolor Sit Amet";
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1259.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1259.cs
new file mode 100644
index 00000000..681308ff
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1259.cs
@@ -0,0 +1,112 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 1259, "Layout issue with SwitchCell", PlatformAffected.Android)]
+ public class Issue1259
+ : ContentPage
+ {
+ TableView _table;
+ public Issue1259()
+ {
+ StackLayout st = new StackLayout();
+ st.HorizontalOptions = LayoutOptions.FillAndExpand;
+ st.VerticalOptions = LayoutOptions.FillAndExpand;
+
+ _table = new TableView
+ {
+ Intent = TableIntent.Form,
+ Root = new TableRoot("") {
+ new TableSection
+ {
+ new TextCell(),
+ new TextCell(),
+ new TextCell(),
+ new TextCell(),
+ new TextCell(),
+ new TextCell(),
+ new TextCell(),
+ new TextCell(),
+ new TextCell(),
+ new TextCell(),
+ new TextCell(),
+ new TextCell(),
+ new TextCell(),
+ new TextCell(),
+ new TextCell(),
+ new SwitchCell
+ {
+ Text = "SwitchCell:"
+ },
+ new TextCell(),
+ new TextCell(),
+ new TextCell(),
+ new TextCell(),
+ new TextCell(),
+ new SwitchCell
+ {
+ Text = "SwitchCell:"
+ },
+ new TextCell(),
+ new TextCell(),
+ new TextCell(),
+ new TextCell(),
+ new TextCell(),
+ new TextCell(),
+ new TextCell(),
+ new TextCell(),
+ new TextCell(),
+ new TextCell(),
+ new TextCell(),
+ new TextCell(),
+ new TextCell(),
+ new TextCell(),
+ new TextCell(),
+ new TextCell(),
+ new TextCell(),
+ new TextCell(),
+ new TextCell(),
+ new TextCell(),
+ new TextCell(),
+ new TextCell(),
+ new TextCell(),
+ new TextCell(),
+ new TextCell(),
+ new TextCell(),
+ new TextCell(),
+ new TextCell(),
+ new SwitchCell
+ {
+ Text = "SwitchCell:"
+ }
+ }
+ }
+ };
+
+ st.Children.Add(_table);
+
+ Button next = new Button
+ {
+ Text = "Ok",
+ };
+ next.Clicked +=next_Clicked;
+
+ st.Children.Add(next);
+
+ Content = st;
+ }
+
+ void next_Clicked(object sender, EventArgs e)
+ {
+ var sw = _table.Root[0].OfType<SwitchCell>().First();
+ sw.On = !sw.On;
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1267.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1267.cs
new file mode 100644
index 00000000..f194670d
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1267.cs
@@ -0,0 +1,65 @@
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ public class PersonCell:ViewCell
+ {
+ public PersonCell ()
+ {
+ var grid = new Grid{
+ RowDefinitions = new RowDefinitionCollection {
+ new RowDefinition {Height = new GridLength (1, GridUnitType.Star)},
+ new RowDefinition {Height = GridLength.Auto},
+ },
+ ColumnDefinitions = new ColumnDefinitionCollection {
+ new ColumnDefinition {Width = new GridLength (1, GridUnitType.Star)},
+ new ColumnDefinition {Width = GridLength.Auto},
+ }
+ };
+ Label label;
+ grid.Children.Add (label = new Label {BackgroundColor = Color.Lime});
+ label.SetBinding (Label.TextProperty, "FirstName");
+
+ grid.Children.Add (label = new Label (),0,1);
+ label.SetBinding (Label.TextProperty, "LastName");
+
+ grid.Children.Add (label = new Label {XAlign = TextAlignment.End},1,0);
+ label.SetBinding (Label.TextProperty, "Zip");
+
+ grid.Children.Add (label = new Label {XAlign = TextAlignment.End},1,1);
+ label.SetBinding (Label.TextProperty, "City");
+ View = grid;
+
+
+ }
+ }
+
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 1267, "Star '*' in Grid layout throws exception", PlatformAffected.WinPhone)]
+ public class Issue1267 : ContentPage
+ {
+ public Issue1267 ()
+ {
+ var lv = new ListView {
+ ItemsSource = new []{
+ new {FirstName = "foo", LastName="bar", Zip="1234", City="Gotham City"},
+ new {FirstName = "foo", LastName="bar", Zip="1234", City="Gotham City"},
+ new {FirstName = "foo", LastName="bar", Zip="1234", City="Gotham City"},
+ new {FirstName = "foo", LastName="bar", Zip="1234", City="Gotham City"},
+ new {FirstName = "foo", LastName="bar", Zip="1234", City="Gotham City"},
+ new {FirstName = "foo", LastName="bar", Zip="1234", City="Gotham City"},
+ new {FirstName = "foo", LastName="bar", Zip="1234", City="Gotham City"},
+ new {FirstName = "foo", LastName="bar", Zip="1234", City="Gotham City"},
+ new {FirstName = "foo", LastName="bar", Zip="1234", City="Gotham City"},
+ new {FirstName = "foo", LastName="bar", Zip="1234", City="Gotham City"},
+ new {FirstName = "foo", LastName="bar", Zip="1234", City="Gotham City"},
+ new {FirstName = "foo", LastName="bar", Zip="1234", City="Gotham City"},
+ new {FirstName = "foo", LastName="bar", Zip="1234", City="Gotham City"},
+ },
+ ItemTemplate = new DataTemplate (typeof(PersonCell)),
+ };
+ Content = lv;
+ }
+ }
+}
+
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1305.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1305.cs
new file mode 100644
index 00000000..b1c38b10
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1305.cs
@@ -0,0 +1,50 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 1305, "ToolbarItems on NavigationPage broken", PlatformAffected.Android, NavigationBehavior.PushModalAsync)]
+ public class Issue1305 : ContentPage
+ {
+ public Issue1305 ()
+ {
+ var settings = new ToolbarItem
+ {
+ Icon = "bank.png",
+ Text = "Settings",
+ Command = new Command(ShowSettingsPage),
+ };
+
+ ToolbarItems.Add(settings);
+
+ Content = new ContentView { Content = new Label { Text = "Testing..." } };
+
+ Title = "Test Page";
+
+ Icon = "Icon.png";
+
+ }
+
+ async void ShowSettingsPage()
+ {
+ await Navigation.PushAsync(new Issue13052());
+ }
+ }
+
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 1305, "ToolbarItems on NavigationPage broken", PlatformAffected.Android)]
+ public class Issue13052 : ContentPage
+ {
+ public Issue13052 ()
+ {
+ Content = new ContentView { Content = new Label { Text = "Settings..." } };
+
+ Title = "Settings";
+
+ Icon = "bank.png";
+ }
+ }
+}
+
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1329.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1329.cs
new file mode 100644
index 00000000..b9d133e1
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1329.cs
@@ -0,0 +1,46 @@
+
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 1329, "Losing root page with rapidly pushing and popping", PlatformAffected.Android)]
+ public class Issue1329 : NavigationPage
+ {
+ public Issue1329 () : base (GetPage ("root page"))
+ {
+ var navigation = new NavigationPage (GetPage ("root page"));
+ var pageNum = 0;
+
+ MessagingCenter.Subscribe<Button> (
+ navigation,
+ "PushPage",
+ (sender) => navigation.PushAsync (GetPage ("Page #: " + ++pageNum))
+ );
+
+ navigation.Popped += (sender, e) => {
+ pageNum -= 1;
+ };
+ }
+
+ public static Page GetPage (string name) {
+
+ var button = new Button {
+ Text = name
+ };
+
+ button.Clicked += (sender, e) => MessagingCenter.Send<Button> ((Button)sender, "PushPage");
+
+ var page = new ContentPage {
+ Content = button
+ };
+
+ return page;
+ }
+
+ }
+
+}
+
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1384.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1384.cs
new file mode 100644
index 00000000..0bf8aeab
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1384.cs
@@ -0,0 +1,40 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 1384, "Image is grid issue", PlatformAffected.Android | PlatformAffected.iOS | PlatformAffected.WinPhone)]
+ public class Issue1384:ContentPage
+ {
+ public Issue1384 ()
+ {
+ var grid = new Grid {BackgroundColor = Color.Red, VerticalOptions=LayoutOptions.Start};
+ grid.Children.Add (new Image {Source = "photo.jpg", Aspect = Aspect.AspectFit});
+ grid.Children.Add (new Label {
+ Opacity =.75,
+ YAlign = TextAlignment.Start,
+ XAlign = TextAlignment.End,
+ Text ="top and flush right",
+ Font = Font.SystemFontOfSize (NamedSize.Large),
+ VerticalOptions=LayoutOptions.Start,
+ HorizontalOptions=LayoutOptions.End,
+ HeightRequest=30,
+ TextColor = Color.White
+ });
+ grid.Children.Add (new Label {
+ Opacity =.75,
+ YAlign = TextAlignment.End,
+ Text ="bottom and flush left",
+ Font = Font.SystemFontOfSize (NamedSize.Large),
+ VerticalOptions=LayoutOptions.End,
+ HeightRequest=40,
+ TextColor = Color.White,
+ BackgroundColor = Color.Green,
+ });
+ Content = grid;
+ }
+ }
+}
+
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1400.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1400.cs
new file mode 100644
index 00000000..b8e4a8ce
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1400.cs
@@ -0,0 +1,153 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel;
+using System.Linq;
+
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 1400, "Group binding errors", PlatformAffected.Android | PlatformAffected.iOS | PlatformAffected.WinPhone, NavigationBehavior.PushModalAsync)]
+ public class Issue1400 : ContentPage
+ {
+ public static Entry Editfield { get; set; }
+ public static ListView List { get; set; }
+ public static List<MyGroup> Data { get; set; }
+ public Issue1400 ()
+ {
+ Data = new List<MyGroup>();
+ Data.Add(new MyGroup(){Headertitle = "Header 1"});
+ Data.First().Add(new MyData(){Title = "title 1"});
+ Data.First().Add(new MyData() { Title = "title 2" });
+ Data.Add(new MyGroup() { Headertitle = "Header 2" });
+ Data.Last().Add(new MyData() { Title = "title 2a" });
+ Data.Last().Add(new MyData() { Title = "title 2b" });
+
+
+ Editfield = new Entry();
+ Editfield.HorizontalOptions = LayoutOptions.FillAndExpand;
+ Editfield.BindingContext = Data.First().First();
+ Editfield.SetBinding<MyData>(Entry.TextProperty, f => f.Title);
+
+ Editfield.TextChanged += (sender, args) =>
+ {
+
+ AddCell(null);
+ };
+
+ List = new ListView();
+ List.HorizontalOptions = LayoutOptions.FillAndExpand;
+ List.VerticalOptions = LayoutOptions.FillAndExpand;
+ List.BackgroundColor = Color.Yellow;
+ List.ItemTemplate = new DataTemplate(typeof (VCTest));
+ List.GroupHeaderTemplate = new DataTemplate(typeof(VCHeader));
+ List.IsGroupingEnabled = true;
+ List.ItemsSource = Data;
+
+
+
+ Content = new StackLayout () {
+ VerticalOptions = LayoutOptions.StartAndExpand,
+ HorizontalOptions = LayoutOptions.FillAndExpand,
+ Children = { Editfield, List },
+ Padding = new Thickness (10, 10, 10, 10)
+
+ };
+ }
+
+ public static List<MyGroup> CopyList(List<MyGroup> data)
+ {
+ var newlist = new List<MyGroup>();
+ foreach (var grp in data)
+ {
+ var grpItem = new MyGroup() { Headertitle = grp.Headertitle };
+ foreach (var subItem in grp)
+ {
+ var item = new MyData() { Title = subItem.Title };
+ grpItem.Add(item);
+ }
+ newlist.Add(grpItem);
+ }
+ return newlist;
+ }
+
+ public static void AddCell(MyData data)
+ {
+ var newlist = CopyList(Data);
+
+ // just make some changes
+ newlist.Last().Add(new MyData() { Title = Editfield.Text });
+ newlist.Last().RemoveAt(0);
+ newlist.Last().Add(new MyData() { Title = "2nd "+Editfield.Text });
+
+ Data = newlist;
+
+ List.ItemsSource = newlist;
+ }
+ }
+
+ public class MyData : INotifyPropertyChanged
+ {
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ string _title;
+
+ public const string PropTitle = "Title";
+
+ public string Title
+ {
+ get { return _title; }
+ set
+ {
+ if (value.Equals(_title, StringComparison.Ordinal)) return;
+ _title = value;
+ OnPropertyChanged(new PropertyChangedEventArgs(PropTitle));
+ }
+ }
+
+ public void OnPropertyChanged(PropertyChangedEventArgs e)
+ {
+ if (PropertyChanged != null) PropertyChanged(this, e);
+ }
+ }
+
+ public class MyGroup : ObservableCollection<MyData>, INotifyPropertyChanged
+ {
+ string _headertitle;
+
+ public const string PropHeadertitle = "Headertitle";
+
+ public string Headertitle
+ {
+ get { return _headertitle; }
+ set
+ {
+ if (value.Equals(_headertitle, StringComparison.Ordinal)) return;
+ _headertitle = value;
+ OnPropertyChanged( new PropertyChangedEventArgs(PropHeadertitle));
+ }
+ }
+ }
+
+ internal class VCTest : ViewCell
+ {
+ public VCTest()
+ {
+ var label = new Label();
+ label.SetBinding<MyData>(Label.TextProperty, f => f.Title);
+ View = label;
+ }
+ }
+
+ internal class VCHeader : ViewCell
+ {
+ public VCHeader()
+ {
+ var label = new Label();
+ label.SetBinding<MyGroup>(Label.TextProperty, f => f.Headertitle);
+ View = label;
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1461.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1461.cs
new file mode 100644
index 00000000..2ad70257
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1461.cs
@@ -0,0 +1,286 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using NUnit.Framework;
+using Xamarin.UITest;
+using Xamarin.UITest.iOS;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+
+#if UITEST
+ public static class Issue1461Helpers
+ {
+ public static bool ShouldRunTest (IApp app)
+ {
+ var appAs = app as iOSApp;
+ return (appAs != null && appAs.Device.IsTablet);
+ }
+ }
+#endif
+
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 1461, "1461 - (Popover in Portrait and Landscape)", PlatformAffected.iOS)]
+ public class Issue1461 : TestContentPage
+ {
+ protected override async void Init ()
+ {
+ await Navigation.PushModalAsync (new Issue1461Page (MasterBehavior.Popover, false));
+ }
+
+#if UITEST
+ [Test]
+ [UiTest (typeof (MasterDetailPage), "IsPresented")]
+ [UiTest (typeof (MasterDetailPage), "Master")]
+ public void Test1 ()
+ {
+ if (Issue1461Helpers.ShouldRunTest (RunningApp)) {
+ RunningApp.SetOrientationLandscape ();
+ var query = RunningApp.Query (q => q.Marked ("Master_Label"));
+ Assert.IsTrue (!query.Any (), "Master should not present");
+ RunningApp.Screenshot ("Master should not present");
+ RunningApp.SetOrientationPortrait ();
+ query = RunningApp.Query (q => q.Marked ("Master_Label"));
+ Assert.IsTrue (!query.Any (), "Master should not present");
+ RunningApp.Screenshot ("Master should not present");
+ RunningApp.Tap (q => q.Marked ("Go Back"));
+ } else {
+ Assert.Inconclusive ("Only run on iOS Tablet");
+ }
+ }
+#endif
+ }
+
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 1461, "1461 - Default", PlatformAffected.iOS)]
+ public class Issue1461A : TestContentPage
+ {
+ protected override async void Init ()
+ {
+ await Navigation.PushModalAsync (new Issue1461Page (MasterBehavior.Default, null));
+ }
+
+#if UITEST
+ [Test]
+ [UiTest (typeof (MasterDetailPage), "IsPresented")]
+ [UiTest (typeof (MasterDetailPage), "Master")]
+ public void Test2 ()
+ {
+ if (Issue1461Helpers.ShouldRunTest(RunningApp)) {
+ RunningApp.SetOrientationLandscape ();
+ var query = RunningApp.Query (q => q.Marked ("Master_Label"));
+ Assert.IsTrue (query.Any (), "Master should be present");
+ RunningApp.Screenshot ("Master should not present");
+ RunningApp.SetOrientationPortrait ();
+ query = RunningApp.Query (q => q.Marked ("Master_Label"));
+ Assert.IsTrue (!query.Any (), "Master should not present");
+ RunningApp.Screenshot ("Master should not present");
+ RunningApp.Tap (q => q.Marked ("Go Back"));
+ } else {
+ Assert.Inconclusive ("Only run on iOS Tablet");
+ }
+ }
+
+ #if UITEST
+ [Test]
+ [UiTest (typeof (MasterDetailPage), "Button")]
+ public void TestButton ()
+ {
+ if (Issue1461Helpers.ShouldRunTest(RunningApp)) {
+ RunningApp.SetOrientationLandscape ();
+ RunningApp.WaitForNoElement (q => q.Marked ("bank"));
+ RunningApp.SetOrientationPortrait ();
+ RunningApp.WaitForElement (q => q.Marked ("bank"));
+ } else {
+ Assert.Inconclusive ("Only run on iOS Tablet");
+ }
+ }
+ #endif
+#endif
+ }
+
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 1461, "1461 - (Splitview in Landscape)", PlatformAffected.iOS)]
+ public class Issue1461B : TestContentPage
+ {
+ protected override async void Init ()
+ {
+ await Navigation.PushModalAsync (new Issue1461Page (MasterBehavior.SplitOnLandscape, null));
+ }
+
+#if UITEST
+ [Test]
+ [UiTest (typeof (MasterDetailPage), "IsPresented")]
+ [UiTest (typeof (MasterDetailPage), "Master")]
+ public void Test3 ()
+ {
+ if (Issue1461Helpers.ShouldRunTest(RunningApp)) {
+ RunningApp.SetOrientationLandscape ();
+ var query = RunningApp.Query (q => q.Marked ("Master_Label"));
+ Assert.IsTrue (query.Any (), "Master should be present");
+ RunningApp.Screenshot ("Master should not present");
+ RunningApp.SetOrientationPortrait ();
+ query = RunningApp.Query (q => q.Marked ("Master_Label"));
+ Assert.IsTrue (!query.Any (), "Master should not present");
+ RunningApp.Screenshot ("Master should not present");
+ RunningApp.Tap (q => q.Marked ("Go Back"));
+ } else {
+ Assert.Inconclusive ("Only run on iOS Tablet");
+ }
+ }
+#endif
+ }
+
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 1461, "1461 - (Splitview in Portrait)", PlatformAffected.iOS)]
+ public class Issue1461C : TestContentPage
+ {
+ protected override async void Init ()
+ {
+ await Navigation.PushModalAsync (new Issue1461Page (MasterBehavior.SplitOnPortrait, null));
+ }
+
+#if UITEST
+ [Test]
+ [UiTest (typeof (MasterDetailPage), "IsPresented")]
+ [UiTest (typeof (MasterDetailPage), "Master")]
+ public void Test4 ()
+ {
+ if (Issue1461Helpers.ShouldRunTest(RunningApp)) {
+ RunningApp.SetOrientationPortrait ();
+ var s = RunningApp.Query (q => q.Marked ("Master_Label"));
+ Assert.IsTrue (s.Any (), "Master should be present");
+ RunningApp.Screenshot ("Master should present");
+
+ RunningApp.SetOrientationLandscape ();
+ s = RunningApp.Query (q => q.Marked ("Master_Label"));
+ Assert.IsTrue (!s.Any (), "Master should not present on landscape");
+ RunningApp.Screenshot ("Master should not present");
+ RunningApp.Tap (q => q.Marked ("Go Back"));
+ } else {
+ Assert.Inconclusive ("Only run on iOS Tablet");
+ }
+ }
+#endif
+ }
+
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 1461, "1461 - (Splitview in Portrait and Landscape)", PlatformAffected.iOS)]
+ public class Issue1461D : TestContentPage
+ {
+ protected override async void Init ()
+ {
+ await Navigation.PushModalAsync (new Issue1461Page (MasterBehavior.Split, null));
+ }
+
+#if UITEST
+ [Test]
+ [UiTest (typeof (MasterDetailPage), "IsPresented")]
+ [UiTest (typeof (MasterDetailPage), "Master")]
+ public void Test5 ()
+ {
+ if (Issue1461Helpers.ShouldRunTest(RunningApp)) {
+ RunningApp.SetOrientationPortrait ();
+ var s = RunningApp.Query (q => q.Marked ("Master_Label"));
+ Assert.IsTrue (s.Any (), "Master should be present");
+ RunningApp.Screenshot ("Master should be present");
+
+ RunningApp.SetOrientationLandscape ();
+ s = RunningApp.Query (q => q.Marked ("Master_Label"));
+
+ Assert.IsTrue (s.Any (), "Master should be present");
+ RunningApp.Screenshot ("Master should be present");
+ RunningApp.Tap (q => q.Marked ("Go Back"));
+ } else {
+ Assert.Inconclusive ("Only run on iOS Tablet");
+ }
+ }
+#endif
+ }
+
+ internal sealed class Issue1461Page : MasterDetailPage
+ {
+ public Issue1461Page ()
+ : this (MasterBehavior.Default,null)
+ { }
+
+ bool? _showButton;
+ public Issue1461Page (MasterBehavior state, bool? initState)
+ {
+
+ var btn = new Button { Text = "hide me" };
+ btn.Clicked += bnToggle_Clicked;
+ Master = new ContentPage {
+ Title = string.Format ("Master sample for {0}", state),
+ Icon = "bank.png",
+ Padding = Device.OnPlatform (new Thickness (5, 60, 5, 5), 5, 5),
+ Content =
+ new StackLayout { Children = {
+ new Label {
+ Text = "Master Label",
+ AutomationId = "Master_Label",
+ BackgroundColor = Color.Gray
+ },
+ btn
+ }
+ },
+ //BackgroundColor = Color.Red
+ };
+
+ if(initState.HasValue)
+ _showButton = initState.Value;
+
+ var lbl = new Label {
+ HorizontalOptions = LayoutOptions.End,
+ BindingContext = this
+ };
+ lbl.SetBinding (Label.TextProperty, "IsPresented");
+
+ var bnToggle = new Button {
+ Text = "Toggle IsPresented",
+ };
+
+ var bnGoBack = new Button {
+ Text = "Go Back",
+ };
+
+ bnGoBack.Clicked += bnGoBack_Clicked;
+ bnToggle.Clicked += bnToggle_Clicked;
+
+ Detail = new NavigationPage( new ContentPage {
+ Title = "Detail Title",
+ Content = new StackLayout{ Spacing=10, Children= { lbl, bnToggle, bnGoBack} }
+ });
+
+ MasterBehavior = state;
+ }
+
+ public override bool ShouldShowToolbarButton ()
+ {
+ if (_showButton.HasValue)
+ return _showButton.Value;
+ return base.ShouldShowToolbarButton ();
+ }
+
+ async void bnGoBack_Clicked (object sender, EventArgs e)
+ {
+ await Navigation.PopModalAsync ();
+ }
+
+ async void bnToggle_Clicked (object sender, EventArgs e)
+ {
+ try {
+ IsPresented = !IsPresented;
+ } catch (InvalidOperationException ex) {
+ DisplayAlert ("Error", ex.Message, "ok");
+ }
+
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1497.xaml b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1497.xaml
new file mode 100644
index 00000000..e7569ed4
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1497.xaml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="Xamarin.Forms.Controls.Issue1497">
+ <ContentView
+ Grid.Column="0" Grid.Row="0"
+ VerticalOptions="FillAndExpand"
+ HorizontalOptions="FillAndExpand"
+ BackgroundColor="Silver" Padding="5">
+
+ <Grid x:Name="grid" Grid.Column="0" Grid.Row="0" VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand" BackgroundColor="Green">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="*" />
+ </Grid.RowDefinitions>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="*"/>
+ </Grid.ColumnDefinitions>
+ <Label Text="Messages" TextColor="White" HorizontalOptions="FillAndExpand" />
+ <Button
+ Text="GO"
+ TextColor="White"
+ BackgroundColor="Black"
+ Grid.Row="1"
+ HorizontalOptions="FillAndExpand"
+ VerticalOptions="EndAndExpand" />
+ </Grid>
+ </ContentView>
+</ContentPage>
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1497.xaml.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1497.xaml.cs
new file mode 100644
index 00000000..186a8b2d
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1497.xaml.cs
@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using Xamarin.Forms;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+#if APP
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 1497, "Grid sizing issue", PlatformAffected.Android | PlatformAffected.iOS | PlatformAffected.WinPhone)]
+ public partial class Issue1497 : ContentPage
+ {
+ public Issue1497 ()
+ {
+ InitializeComponent ();
+ }
+ }
+#endif
+}
+
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1538.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1538.cs
new file mode 100644
index 00000000..0497c519
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1538.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Threading.Tasks;
+
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 1538, "Crash measuring empty ScrollView", PlatformAffected.Android | PlatformAffected.WinPhone)]
+ public class Issue1538 : ContentPage
+ {
+ ScrollView _sv;
+ public Issue1538 ()
+ {
+ StackLayout sl = new StackLayout(){VerticalOptions = LayoutOptions.FillAndExpand};
+ sl.Children.Add( _sv = new ScrollView(){HeightRequest=100} );
+ Content = sl;
+
+ AddContentDelayed ();
+ }
+
+ async void AddContentDelayed ()
+ {
+ await Task.Delay (1000);
+ _sv.Content = new Label { Text = "Foo" };
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1545.xaml b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1545.xaml
new file mode 100644
index 00000000..7cfb67ca
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1545.xaml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+ x:Class="Xamarin.Forms.Controls.Issue1545"
+ Title="{Binding Title}">
+ <StackLayout>
+ <ActivityIndicator IsVisible="{Binding IsBusy}" IsRunning="{Binding IsBusy}"/>
+ <ListView x:Name="List" ItemsSource="{Binding Artists}">
+ <ListView.ItemTemplate>
+ <DataTemplate>
+ <ImageCell Text="{Binding Name}" ImageSource="{Binding MediumImage}"/>
+ </DataTemplate>
+ </ListView.ItemTemplate>
+ </ListView>
+ </StackLayout>
+</ContentPage> \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1545.xaml.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1545.xaml.cs
new file mode 100644
index 00000000..b00ced62
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1545.xaml.cs
@@ -0,0 +1,129 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+#if APP
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 1545, "Binding instances cannot be reused", PlatformAffected.Android | PlatformAffected.iOS | PlatformAffected.WinPhone)]
+ public partial class Issue1545 : ContentPage
+ {
+ ArtistsViewModel _viewModel;
+ public Issue1545()
+ {
+ InitializeComponent();
+ BindingContext = _viewModel = new ArtistsViewModel();
+ }
+
+ protected override void OnAppearing()
+ {
+ base.OnAppearing();
+ if (_viewModel.IsInitialized)
+ return;
+
+ _viewModel.IsInitialized = true;
+ _viewModel.LoadCommand.Execute(null);
+ }
+ }
+
+ public class BaseViewModel : INotifyPropertyChanged
+ {
+ public string Title { get; set; }
+ public bool IsInitialized { get; set; }
+
+ bool _isBusy;
+
+ /// <summary>
+ /// Gets or sets if VM is busy working
+ /// </summary>
+ public bool IsBusy
+ {
+ get { return _isBusy; }
+ set { _isBusy = value; OnPropertyChanged("IsBusy"); }
+ }
+
+ //INotifyPropertyChanged Implementation
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ protected void OnPropertyChanged(string propertyName)
+ {
+ if (PropertyChanged == null)
+ return;
+
+ PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
+ }
+ }
+
+ public class ArtistsViewModel : BaseViewModel
+ {
+ public ArtistsViewModel()
+ {
+ Title = "Artists";
+ Artists = new ObservableCollection<Artist>();
+ }
+
+ /// <summary>
+ /// gets or sets the feed items
+ /// </summary>
+ public ObservableCollection<Artist> Artists
+ {
+ get;
+ private set;
+ }
+
+ Command _loadCommand;
+ /// <summary>
+ /// Command to load/refresh artitists
+ /// </summary>
+ public Command LoadCommand
+ {
+ get { return _loadCommand ?? (_loadCommand = new Command(async () => await ExecuteLoadCommand())); }
+ }
+
+ static readonly Artist[] ArtistsToLoad = new Artist[] {
+ new Artist { Name = "Metallica", ListenerCount = "100", PlayCount = "5000" },
+ new Artist { Name = "Epica", ListenerCount = "50", PlayCount = "1000" }
+ };
+
+ async Task ExecuteLoadCommand()
+ {
+ if (IsBusy)
+ return;
+
+ IsBusy = true;
+
+ Artists.Clear();
+
+ await Task.Delay (3000);
+
+ foreach (Artist a in ArtistsToLoad)
+ Artists.Add (a);
+
+ IsBusy = false;
+ }
+ }
+
+ public class Artist
+ {
+
+ public string Name { get; set; }
+
+ public string PlayCount { get; set; }
+
+ public string ListenerCount { get; set; }
+
+ public string Mbid { get; set; }
+
+ public string Url { get; set; }
+
+ public string Streamable { get; set; }
+ }
+#endif
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1546.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1546.cs
new file mode 100644
index 00000000..8e3fa1c0
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1546.cs
@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 1546, "Crash when Label.Text is null", PlatformAffected.Android)]
+ public class Issue1546
+ : ContentPage
+ {
+ public Issue1546()
+ {
+ Content = new Label();
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1549.xaml b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1549.xaml
new file mode 100644
index 00000000..16f3945d
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1549.xaml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<local:BaseView
+ xmlns="http://xamarin.com/schemas/2014/forms"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+ x:Class="Xamarin.Forms.Controls.Issue1549"
+ xmlns:local="clr-namespace:Xamarin.Forms.Controls;assembly=Xamarin.Forms.Controls"
+ Padding="0,40,0,0">
+ <local:BaseView.Resources>
+ <ResourceDictionary>
+ <local:InvertBoolenConverter x:Key="cnvInvert"></local:InvertBoolenConverter>
+ </ResourceDictionary>
+ </local:BaseView.Resources>
+ <local:BaseView.Content>
+ <ListView x:Name="lst" VerticalOptions="FillAndExpand"
+ HorizontalOptions="FillAndExpand"
+
+ ItemsSource="{Binding Items}"
+
+ >
+ <ListView.ItemTemplate >
+ <DataTemplate>
+ <ViewCell >
+ <ViewCell.View>
+ <Grid VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand" >
+ <Label IsVisible="{Binding IsLocked}" Text="Show Is Locked" />
+ <Label IsVisible="{Binding IsLocked, Converter={StaticResource cnvInvert}}" Text="Show Is Not locked" />
+ </Grid>
+ </ViewCell.View>
+ </ViewCell>
+ </DataTemplate>
+ </ListView.ItemTemplate>
+ </ListView>
+ </local:BaseView.Content>
+</local:BaseView> \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1549.xaml.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1549.xaml.cs
new file mode 100644
index 00000000..850201de
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1549.xaml.cs
@@ -0,0 +1,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
+}
+
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1554.xaml b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1554.xaml
new file mode 100644
index 00000000..9db3fa42
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1554.xaml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+ x:Class="Xamarin.Forms.Controls.Issue1554">
+ <ListView ItemsSource="{Binding Values}">
+ <ListView.ItemTemplate>
+ <DataTemplate>
+ <ViewCell>
+ <ViewCell.View>
+ <StackLayout>
+ <Label Text="{Binding}"></Label>
+ <Label Text="{Binding}"></Label>
+<!-- <ContentView></ContentView>-->
+ </StackLayout>
+ </ViewCell.View>
+ </ViewCell>
+ </DataTemplate>
+ </ListView.ItemTemplate>
+ </ListView>
+</ContentPage>
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1554.xaml.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1554.xaml.cs
new file mode 100644
index 00000000..0a0c20cb
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1554.xaml.cs
@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+using Xamarin.Forms;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+#if APP
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 1554, "NRE: NavigationProxy.set_Inner", PlatformAffected.Android | PlatformAffected.iOS | PlatformAffected.WinPhone)]
+ public partial class Issue1554 : ContentPage
+ {
+ public Issue1554 ()
+ {
+ BindingContext = new
+ {
+ Values = new[] { "ABC", "DEF", "GHI" }
+ };
+
+ InitializeComponent ();
+ }
+ }
+#endif
+}
+
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1557.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1557.cs
new file mode 100644
index 00000000..7dc92cc6
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1557.cs
@@ -0,0 +1,34 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 1557, "Setting source crashes if view was detached from visual tree", PlatformAffected.iOS)]
+ public class Issue1557
+ : ContentPage
+ {
+ ObservableCollection<string> _items = new ObservableCollection<string> { "foo", "bar" };
+ public Issue1557()
+ {
+ Content = new ListView {
+ ItemsSource = _items
+ };
+
+ Task.Delay (3000).ContinueWith (async t => {
+ var list = (ListView) Content;
+
+ await Navigation.PopAsync();
+
+ list.ItemsSource = new List<string>() { "test" };
+
+ }, TaskScheduler.FromCurrentSynchronizationContext());
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1566.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1566.cs
new file mode 100644
index 00000000..223edb6d
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1566.cs
@@ -0,0 +1,91 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 1566, "ListView reuse issue", PlatformAffected.Android)]
+ public class Issue1566
+ : ContentPage
+ {
+ bool _flag = true;
+
+ ObservableCollection<Tuple<string, string>> _collection = new ObservableCollection<Tuple<string, string>>();
+
+ void FillTheList()
+ {
+ _collection.Clear();
+
+ for (int i = 0; i < 100; i++)
+ {
+ var item = new Tuple<string, string>(
+ string.Format("{0} {0} {0} {0} {0} {0}", _flag ? i : 100-i),
+ string.Format("---- i ----{0} {0} {0} {0} {0} {0}", _flag ? i : 100-i)
+ );
+
+
+ _collection.Add(item);
+ }
+
+ //flag = !flag;
+ }
+
+ public Issue1566()
+ {
+ SearchBar search = new SearchBar();
+ search.SearchButtonPressed += (sender, e) => FillTheList();
+
+ ListView list = new ListView() {
+ HorizontalOptions = LayoutOptions.FillAndExpand,
+ VerticalOptions = LayoutOptions.FillAndExpand,
+ HasUnevenRows = true,
+ ItemsSource = _collection,
+ ItemTemplate = new DataTemplate(typeof(CellTemplate))
+ };
+
+ Label info = new Label() {
+ Text = "Type something into searchbox and press search. Then swipe the list. Rows are mixed. It's important to have keyboard visible!!!"
+ };
+
+ StackLayout root = new StackLayout() {
+ HorizontalOptions = LayoutOptions.FillAndExpand,
+ VerticalOptions = LayoutOptions.FillAndExpand,
+ Children =
+ {
+ search,
+ list,
+ info,
+ }
+ };
+
+ Content = root;
+ }
+
+ class CellTemplate : ViewCell
+ {
+ public CellTemplate()
+ {
+ Label cellLabel = new Label() {
+ HorizontalOptions = LayoutOptions.FillAndExpand,
+ };
+
+ cellLabel.SetBinding(Label.TextProperty, new Binding("Item1", BindingMode.OneWay));
+
+ StackLayout root = new StackLayout() {
+ Children =
+ {
+ cellLabel
+ }
+ };
+
+ View = root;
+ }
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1567.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1567.cs
new file mode 100644
index 00000000..0b67d092
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1567.cs
@@ -0,0 +1,37 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 1567, "NRE in NavigationProxy.set_Inner", PlatformAffected.iOS)]
+ public class Issue1567
+ : ContentPage
+ {
+ public Issue1567()
+ {
+ Title = "Test";
+ var label = new Label { Text = "Whatever" };
+
+ ToolbarItems.Add (new ToolbarItem ("Modal", null, async () => {
+ var cp2 = new ContentPage () {
+ Title = "Modal",
+ Content = new Label (){ Text = "Second screen" },
+ };
+ var np2 = new NavigationPage(cp2) { Title = "Modal" };
+ try {
+ await Navigation.PushModalAsync (cp2);
+ } catch (InvalidOperationException ex) {
+ label.Text = "Exception properly thrown: " + ex.Message;
+ }
+ }));
+
+ Content = label;
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1568.xaml b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1568.xaml
new file mode 100644
index 00000000..00a5a08e
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1568.xaml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+ x:Class="Xamarin.Forms.Controls.TestCasesPages.Issue1568">
+ <StackLayout Orientation="Vertical">
+ <StackLayout
+ x:Name="_stackToolbar"
+ Orientation="Horizontal">
+ <Button
+ x:Name="_btnExit"
+ Text="&lt; Exit"
+ Command="{Binding ExitCommand}" />
+ <Button
+ x:Name="_btnSelectOrg"
+ Text="Select Org"
+ Command="{Binding SelectOrgCommand}" />
+ <Button
+ x:Name="_btnSelectStartInterval"
+ Text="Select Start Date"
+ Command="{Binding SelectStartIntervalCommand}" />
+ <Button
+ x:Name="_btnReload"
+ Text="Reload Schedule"
+ Command="{Binding ReloadScheduleCommand}" />
+ <Button
+ x:Name="_btnSave"
+ Text="Save Schedule"
+ Command="{Binding SaveScheduleCommand}" />
+ </StackLayout>
+
+ <Grid>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="*" />
+ <ColumnDefinition Width="Auto" />
+ </Grid.ColumnDefinitions>
+
+ <BoxView
+ x:Name="_scheduleGrid"
+ Grid.Column="0"
+ Color="Red"
+ HorizontalOptions="Fill"
+ VerticalOptions="Fill" />
+
+ <BoxView
+ x:Name="_shiftEditor"
+ Grid.Column="1"
+ Color="Blue"
+ WidthRequest="300"
+ HorizontalOptions="Fill"
+ VerticalOptions="Fill" />
+ </Grid>
+ </StackLayout>
+</ContentPage> \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1568.xaml.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1568.xaml.cs
new file mode 100644
index 00000000..6dce5c68
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1568.xaml.cs
@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls.TestCasesPages
+{
+#if APP
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 1568, "StackLayout, Grid issue", PlatformAffected.Android | PlatformAffected.iOS | PlatformAffected.WinPhone)]
+ public partial class Issue1568 : ContentPage
+ {
+ public Issue1568 ()
+ {
+ InitializeComponent ();
+ }
+ }
+#endif
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1583.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1583.cs
new file mode 100644
index 00000000..f150d46d
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1583.cs
@@ -0,0 +1,20 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 1583, "NavigationPage.TitleIcon broken", PlatformAffected.Android | PlatformAffected.iOS | PlatformAffected.WinPhone)]
+ public class Issue1583 : ContentPage
+ {
+ public Issue1583 ()
+ {
+ Title = "Test";
+ BackgroundColor = Color.Pink;
+ Content = new Label{Text = "Hello"};
+ NavigationPage.SetTitleIcon(this, "bank.png");
+ }
+ }
+}
+
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1590.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1590.cs
new file mode 100644
index 00000000..2e1c70c7
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1590.cs
@@ -0,0 +1,123 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls.TestCasesPages
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 1590, "ListView.IsGroupingEnabled results ins ArguementOutOfRangeException", PlatformAffected.Android)]
+ public class Issue1590 : ContentPage
+ {
+ ListView _listView;
+
+ public Issue1590()
+ {
+ var vm = new RootPageViewModel();
+ Content = BuildListView(vm);
+ }
+
+ StackLayout BuildListView(RootPageViewModel viewModel)
+ {
+ var headerTemplate = new DataTemplate(typeof(ModuleMediaListHeaderTemplate));
+ headerTemplate.CreateContent();
+
+ var itemTemplate = new DataTemplate(typeof(ModuleMediaListItemTemplate));
+ itemTemplate.CreateContent();
+
+ _listView = new ListView
+ {
+ ItemsSource = viewModel.MediaSections,
+ IsGroupingEnabled = true,
+ GroupDisplayBinding = new Binding("SectionName"),
+ HasUnevenRows = false,
+ GroupHeaderTemplate = headerTemplate,
+ ItemTemplate = itemTemplate
+ };
+
+ return new StackLayout { Children = { _listView } };
+ }
+ }
+
+ [Preserve (AllMembers=true)]
+ public class RootPageViewModel
+ {
+ public IEnumerable MediaSections
+ {
+ get
+ {
+ var titles = new[] {"First", "Second", "Third", "Forth", "Fifth"};
+
+ return titles.Select(section => new MediaListSection(section)
+ {
+ new FooViewModel {Title = "Foo", Description = "description for foo"},
+ new FooViewModel {Title = "Bar", Description = "description for bar"},
+ new FooViewModel {Title = "Baz", Description = "description for baz"},
+ new FooViewModel {Title = "Fiz", Description = "description for fiz"},
+ new FooViewModel {Title = "Buz", Description = "description for buz"},
+ }).ToList();
+ }
+ }
+ }
+
+ [Preserve (AllMembers=true)]
+ public class MediaListSection : ObservableCollection<FooViewModel>
+ {
+ public string SectionName { get; private set; }
+
+ public MediaListSection(string sectionName)
+ {
+ SectionName = sectionName;
+ }
+ }
+
+ [Preserve (AllMembers=true)]
+ public class FooViewModel
+ {
+ public string Title { get; set; }
+ public string Description { get; set; }
+ }
+
+ [Preserve (AllMembers=true)]
+ public class ModuleMediaListItemTemplate : ViewCell
+ {
+ public ModuleMediaListItemTemplate()
+ {
+ var title = new Label { YAlign = TextAlignment.Center };
+ title.SetBinding(Label.TextProperty, new Binding("Title", BindingMode.OneWay));
+
+ var description = new Label { YAlign = TextAlignment.Center };
+ description.SetBinding(Label.TextProperty, new Binding("Description", BindingMode.OneWay));
+
+ View = new StackLayout
+ {
+ Orientation = StackOrientation.Horizontal,
+ Padding = new Thickness(8),
+ Children = { title, description }
+ };
+ }
+ }
+
+ [Preserve (AllMembers=true)]
+ public class ModuleMediaListHeaderTemplate : ViewCell
+ {
+ public ModuleMediaListHeaderTemplate()
+ {
+ var title = new Label { TextColor = Color.White, YAlign = TextAlignment.Center };
+ title.SetBinding(Label.TextProperty, new Binding("SectionName", BindingMode.OneWay));
+
+ View = new StackLayout
+ {
+ Padding = new Thickness(8, 0),
+ BackgroundColor = Color.FromHex("#999999"),
+ Orientation = StackOrientation.Horizontal,
+ Children = { title },
+ };
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1593.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1593.cs
new file mode 100644
index 00000000..238ab936
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1593.cs
@@ -0,0 +1,169 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using Xamarin.Forms;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 1593, "Android reports zero minimum size for almost all controls", PlatformAffected.Android)]
+ public class Issue1593 : ContentPage
+ {
+ public Issue1593 ()
+ {
+ var title = new Label {
+ Text = "Select League",
+ Font = Font.SystemFontOfSize (NamedSize.Large),
+ TextColor = Color.White
+ };
+
+ # region Season Filter
+
+ var seasonLabel = new Label {
+ Text = "Season",
+ Font = Font.SystemFontOfSize (NamedSize.Small),
+ TextColor = Color.White
+ };
+
+ var seasonPicker = new Picker {
+ WidthRequest = 140,
+ Title = "Season",
+ Items = { "Test 1", "Test 2"}
+ };
+
+ var seasonPanel = new StackLayout {
+ Children = {
+ seasonLabel,
+ seasonPicker
+ }
+ };
+
+ #endregion
+
+ # region Sport Filter
+
+ var sportLabel = new Label {
+ Text = "Sport",
+ Font = Font.SystemFontOfSize (NamedSize.Small),
+ TextColor = Color.White
+ };
+
+ var sportPicker = new Picker {
+ WidthRequest = 140,
+ Title = "Sport",
+ Items = { "Test 1", "Test 2"}
+ };
+
+ var sportPanel = new StackLayout {
+ Children = {
+ sportLabel,
+ sportPicker
+ }
+ };
+
+ #endregion
+
+ var filtersPanel = new StackLayout {
+ Padding = new Thickness (0, 10, 0, 0),
+ Orientation = StackOrientation.Horizontal,
+ HorizontalOptions = LayoutOptions.Fill,
+ Children = {
+ seasonPanel,
+ sportPanel
+ }
+ };
+
+ var leagues = new ListView {
+ MinimumHeightRequest = 100,
+ ItemsSource = new [] {
+ "Test 1",
+ "Test 2",
+ "Test 3",
+ "Test 4",
+ "Test 5",
+ "Test 6",
+ "Test 7",
+ "Test 8",
+ "Test 9",
+ "Test 10",
+ "Test 11",
+ "Test 12",
+ "Test 13",
+ "Test 14",
+ "Test 15",
+ },
+ BackgroundColor = Color.Gray,
+ ItemTemplate = new DataTemplate (() => {
+ var leagueName = new Label {
+ Font =
+ Font.SystemFontOfSize (NamedSize.Large),
+ BackgroundColor = Color.Transparent,
+ TextColor = Color.White,
+ VerticalOptions = LayoutOptions.CenterAndExpand,
+ LineBreakMode = LineBreakMode.WordWrap
+ };
+ leagueName.SetBinding (Label.TextProperty, ".");
+
+ var row = new StackLayout {
+ Padding = new Thickness (5, 0, 5, 0),
+ BackgroundColor = Color.Transparent,
+ Orientation = StackOrientation.Horizontal,
+ VerticalOptions = LayoutOptions.CenterAndExpand,
+ Children = {
+ leagueName
+ }
+ };
+
+ return new ViewCell {
+ View = row
+ };
+ })
+ };
+
+ var activityIndicator = new ActivityIndicator {
+ VerticalOptions =
+ LayoutOptions.CenterAndExpand,
+ IsVisible = false
+ };
+
+ var titlePanel = new StackLayout {
+ Orientation = StackOrientation.Horizontal,
+ Spacing = 50,
+ Children = {
+ title,
+ activityIndicator
+ }
+ };
+
+ var standingsButton = new Button {
+ Text = "Standings",
+ HorizontalOptions = LayoutOptions.CenterAndExpand
+ };
+
+ var scheduleButton = new Button {
+ Text = "Schedule",
+ HorizontalOptions = LayoutOptions.CenterAndExpand
+ };
+
+ var buttonPanel = new StackLayout {
+ Orientation = StackOrientation.Horizontal,
+ HorizontalOptions = LayoutOptions.CenterAndExpand,
+ Children = {
+ standingsButton,
+ scheduleButton
+ }
+ };
+
+ Content = new StackLayout {
+ Padding = 20,
+ Children = {
+ titlePanel,
+ filtersPanel,
+ leagues,
+ buttonPanel
+ }
+ };
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1598.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1598.cs
new file mode 100644
index 00000000..bb448743
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1598.cs
@@ -0,0 +1,80 @@
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ public class MasterDetailToolbarBug : MasterDetailPage
+ {
+ public MasterDetailToolbarBug ()
+ {
+ Title = "MasterDetailToolbarBug";
+
+ Master = new ContentPage () {
+ Title = "Master"
+ };
+ Detail = new ContentPage () {
+ Title = "Detail",
+ };
+ Detail.ToolbarItems.Add (new ToolbarItem ("ToolbarItem2", "Icon.png", ()
+ => { }));
+ }
+ }
+
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 1598, "MasterDetailContainer does not handle adding of views which are already its children", PlatformAffected.Android)]
+ public class Issue1598 : ContentPage
+ {
+ MasterDetailToolbarBug _secondPage = new MasterDetailToolbarBug ();
+
+ public Issue1598 ()
+ {
+ Title = "XamarinTest MainMenu";
+
+ var menu1 = new MainMenuCell ("MasterDetail - Toolbar bug", "Icon.png");
+ menu1.Tapped += (o, e) => {
+ Navigation.PushAsync (_secondPage);
+ };
+
+ var menu = new TableView () {
+ VerticalOptions = LayoutOptions.FillAndExpand,
+ HorizontalOptions = LayoutOptions.FillAndExpand,
+ HasUnevenRows = true,
+ Intent = TableIntent.Menu,
+ Root = new TableRoot {
+ new TableSection ("Menu") {
+ menu1,
+ }
+ }
+ };
+
+ Content = menu;
+
+ ToolbarItems.Add (new ToolbarItem ("ToolbarItem1", "bank.png", () => { }));
+ }
+
+ class MainMenuCell : ViewCell
+ {
+ public MainMenuCell (string title, string iconFile)
+ {
+ View = new StackLayout () {
+ HorizontalOptions = LayoutOptions.FillAndExpand,
+ VerticalOptions = LayoutOptions.FillAndExpand,
+ Orientation = StackOrientation.Horizontal,
+ Spacing = 15,
+ Padding = 10,
+ Children = {
+ new Image () {
+ Source = ImageSource.FromFile (iconFile),
+ VerticalOptions = LayoutOptions.CenterAndExpand,
+ },
+ new Label () {
+ Text = title,
+ VerticalOptions = LayoutOptions.CenterAndExpand,
+ Font = Font.SystemFontOfSize (NamedSize.Large,
+ FontAttributes.Bold)
+ }
+ }
+ };
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1613.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1613.cs
new file mode 100644
index 00000000..1eaf95e4
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1613.cs
@@ -0,0 +1,64 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+using Xamarin.Forms.CustomAttributes;
+using Xamarin.Forms.Maps;
+
+namespace Xamarin.Forms.Controls.TestCasesPages
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 1613, "Map.GetSizeRequest always returns map's current size", PlatformAffected.Android | PlatformAffected.iOS)]
+ public class Issue1613 : ContentPage
+ {
+ public Issue1613 ()
+ {
+ Build ();
+ }
+
+ async void Build ()
+ {
+ var image = new Image {
+ Source = "http://www.califliving.com/title24-energy/images/sanfrancisco.jpg",
+ Aspect = Aspect.AspectFill,
+ Opacity = 0.5,
+ };
+
+ var name = new Label {
+ Text = "Foo",
+ XAlign = TextAlignment.Center,
+ YAlign = TextAlignment.Center,
+ Font = Font.SystemFontOfSize(30, FontAttributes.Bold),
+ TextColor = Color.White,
+ };
+
+ var nameView = new AbsoluteLayout {
+ HeightRequest = 170,
+ BackgroundColor = Color.Black,
+ Children = {
+ {image, new Rectangle(0, 0, 1, 1), AbsoluteLayoutFlags.All},
+ {name, new Rectangle(0, 0, 1, 1), AbsoluteLayoutFlags.All}
+ },
+ };
+
+ var addressLabel = new Label {
+ Text = "Loading address…",
+ XAlign = TextAlignment.Center,
+ YAlign = TextAlignment.Center,
+ };
+
+ var map = new Map {
+ VerticalOptions = LayoutOptions.FillAndExpand,
+ };
+
+ Content = new StackLayout {
+ Children = { nameView, addressLabel, map },
+ };
+
+ await Task.Delay (1000);
+ addressLabel.Text = "Updated with new\nmultiline\nlabel";
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1618.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1618.cs
new file mode 100644
index 00000000..48f519f6
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1618.cs
@@ -0,0 +1,37 @@
+using System;
+using System.Linq;
+
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 1618, "Horizontal ScrollView in ListView crashes", PlatformAffected.Android)]
+ public class Issue1618
+ : ContentPage
+ {
+ public Issue1618()
+ {
+ Content = new ListView {
+ ItemsSource = Enumerable.Range(0, 100).Select (i => Enumerable.Repeat (i, 500).Aggregate (string.Empty, (s, n) => s += n + " ")),
+ ItemTemplate = new DataTemplate (typeof (MyCell))
+ };
+ }
+
+ class MyCell
+ : ViewCell
+ {
+ public MyCell()
+ {
+ var scroll = new ScrollView {
+ Orientation = ScrollOrientation.Horizontal,
+ Content = new Label()
+ };
+
+ scroll.Content.SetBinding (Label.TextProperty, ".");
+
+ View = scroll;
+ }
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1641.xaml b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1641.xaml
new file mode 100644
index 00000000..ddc824a0
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1641.xaml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+ x:Class="Xamarin.Forms.Controls.Issue1641">
+ <ContentPage.Resources>
+ <ResourceDictionary>
+ <x:String x:Key="caption" >Hello there!</x:String>
+ </ResourceDictionary>
+ </ContentPage.Resources>
+ <TableView>
+ <TableRoot Title="x">
+ <TableSection Title="y">
+ <TextCell Text="{StaticResource caption}" />
+ </TableSection>
+ </TableRoot>
+ </TableView>
+</ContentPage> \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1641.xaml.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1641.xaml.cs
new file mode 100644
index 00000000..c5e03f6e
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1641.xaml.cs
@@ -0,0 +1,17 @@
+using Xamarin.Forms;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+#if APP
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 1641, "Static Resources inside TableView using XAML doesn't work", PlatformAffected.Android | PlatformAffected.iOS | PlatformAffected.WinPhone)]
+ public partial class Issue1641 : ContentPage
+ {
+ public Issue1641 ()
+ {
+ InitializeComponent ();
+ }
+ }
+#endif
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1644.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1644.cs
new file mode 100644
index 00000000..c8947782
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1644.cs
@@ -0,0 +1,74 @@
+using System;
+using Xamarin.Forms;
+using System.Collections.ObjectModel;
+
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 1644, "ListView reappearing and selecting its item causes jobject exception", PlatformAffected.Android)]
+ public class Issue1644 : ContentPage
+ {
+ public ObservableCollection<string> Collection = new
+ ObservableCollection<string>();
+
+ public Issue1644 ()
+ {
+ for (int i = 0; i < 20; i++)
+ {
+ Collection.Add(DateTime.Now.ToString());
+ }
+
+ var listView = new ListView() {
+ HorizontalOptions = LayoutOptions.FillAndExpand,
+ HasUnevenRows = true,
+ ItemsSource = Collection,
+ };
+
+ listView.ItemSelected += (sender, e) =>
+ {
+ listView.SelectedItem = null;
+ };
+
+ var root = new StackLayout() {
+ Padding = 5,
+ Spacing = 5,
+ HorizontalOptions = LayoutOptions.FillAndExpand,
+ VerticalOptions = LayoutOptions.FillAndExpand,
+ Children = {
+ listView
+ }
+ };
+
+ Content = root;
+ }
+ }
+
+ public class Issue1644Menu : MasterDetailPage
+ {
+ Issue1644 _secondPage = new Issue1644();
+
+ public Issue1644Menu()
+ {
+ var button = new Button() {
+ Text = "MAIN MENU BUTTON"
+ };
+
+ button.Clicked += (sender, e) =>
+ {
+ Navigation.PushAsync(_secondPage);
+ };
+
+ Master = new ContentPage() {
+ Title = "Master"
+ };
+
+ Detail = new ContentPage() {
+ Title = "Detail",
+ Content = button
+ };
+ }
+ }
+}
+
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1653.xaml b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1653.xaml
new file mode 100644
index 00000000..2d937fc4
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1653.xaml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+ x:Class="Xamarin.Forms.Controls.Issue1653">
+ <StackLayout Spacing="0">
+ <StackLayout x:Name="accountDetailsStack"/>
+ <StackLayout x:Name="carrierHeaderStack">
+ <Label Text="HEADER" Font="40" />
+ </StackLayout>
+ <StackLayout Padding="22,0,22,22">
+ <Label x:Name="productNameLabel" Text="TESTING 345" XAlign="Center" YAlign="Center" TextColor="#808080"></Label>
+ <StackLayout IsClippedToBounds="true">
+ <ScrollView HeightRequest="980" BackgroundColor="Aqua" IsClippedToBounds="true">
+ <StackLayout x:Name="addonGroupStack" Spacing="1" ></StackLayout>
+ </ScrollView>
+ </StackLayout>
+ <Button x:Name="activateButton" Text="ACTIVATE NOW" TextColor="White" BackgroundColor="#00A0FF">
+ </Button>
+ <ActivityIndicator x:Name="checkoutRunningIndicator" HeightRequest="20"/>
+ </StackLayout>
+ </StackLayout>
+</ContentPage> \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1653.xaml.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1653.xaml.cs
new file mode 100644
index 00000000..e8088be7
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1653.xaml.cs
@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+#if APP
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 1653, "ScrollView exceeding bounds", PlatformAffected.Android | PlatformAffected.iOS | PlatformAffected.WinPhone)]
+ public partial class Issue1653 : ContentPage
+ {
+ public Issue1653 ()
+ {
+ InitializeComponent ();
+
+ for (int i = 0; i < 40; i++)
+ addonGroupStack.Children.Add (new Label {Text = "Testing 123"});
+ }
+ }
+#endif
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1653v2.xaml b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1653v2.xaml
new file mode 100644
index 00000000..581087dd
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1653v2.xaml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+ x:Class="Xamarin.Forms.Controls.Issue1653v2">
+ <StackLayout Spacing="0">
+ <StackLayout x:Name="accountDetailsStack"/>
+ <StackLayout x:Name="carrierHeaderStack">
+ <Label Text="HEADER" Font="40" />
+ </StackLayout>
+ <StackLayout Padding="22,0,22,22">
+ <Label x:Name="productNameLabel" Text="TESTING 345" XAlign="Center" YAlign="Center" TextColor="#808080"></Label>
+ <ScrollView HeightRequest="980" BackgroundColor="Aqua" IsClippedToBounds="true">
+ <StackLayout x:Name="addonGroupStack" Spacing="1" ></StackLayout>
+ </ScrollView>
+ <Button x:Name="activateButton" Text="ACTIVATE NOW" TextColor="White" BackgroundColor="#00A0FF">
+ </Button>
+ <ActivityIndicator x:Name="checkoutRunningIndicator" HeightRequest="20"/>
+ </StackLayout>
+ </StackLayout>
+</ContentPage>
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1653v2.xaml.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1653v2.xaml.cs
new file mode 100644
index 00000000..2492e8cf
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1653v2.xaml.cs
@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+using Xamarin.Forms;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+#if APP
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 1653, "ScrollView exceeding bounds - v2", PlatformAffected.Android | PlatformAffected.iOS | PlatformAffected.WinPhone)]
+ public partial class Issue1653v2 : ContentPage
+ {
+ public Issue1653v2 ()
+ {
+ InitializeComponent ();
+
+ for (int i = 0; i < 40; i++)
+ addonGroupStack.Children.Add (new Label {Text = "Testing 123"});
+ }
+ }
+#endif
+}
+
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1664.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1664.cs
new file mode 100644
index 00000000..61cbecfd
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1664.cs
@@ -0,0 +1,46 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 1664, "Page.Title bubbling", PlatformAffected.iOS)]
+ public class Issue1664 : TabbedPage
+ {
+ public Issue1664 ()
+ {
+ NavigationPage nav1 = new NavigationPage (new ContentPage {Title = "Page1"});
+ NavigationPage nav2 = new NavigationPage (new PageTwo ());
+
+ nav1.Title = "Tab 1";
+ nav2.Title = "Tab 2";
+
+ Children.Add (nav1);
+ Children.Add (nav2);
+ }
+
+ public class PageTwo : ContentPage
+ {
+ public PageTwo ()
+ {
+ var pageTwoEntry = new Entry {
+ VerticalOptions = LayoutOptions.Center,
+ HorizontalOptions = LayoutOptions.FillAndExpand,
+ Placeholder = "Enter a title for page 2",
+ Text = "Page 2",
+ };
+
+ pageTwoEntry.SetBinding (Entry.TextProperty, new Binding ("Title", BindingMode.OneWayToSource));
+ BindingContext = this;
+ Content = new StackLayout {
+ Children = {
+ new Label {Text = "When changing the content of this entry, the page title (on top) should update, but not the tab title"},
+ pageTwoEntry
+ }
+ };
+ }
+ }
+ }
+}
+
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1680.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1680.cs
new file mode 100644
index 00000000..eb98b5ed
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1680.cs
@@ -0,0 +1,106 @@
+using System;
+using System.Collections.ObjectModel;
+
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 1680, "Disposed object updating ListView ItemSource", PlatformAffected.Android)]
+ public class Issue1680 : ContentPage
+ {
+ XamarinListViewBug _page1 = new XamarinListViewBug();
+
+ public Issue1680()
+ {
+ var button1 = new Button { Text = "PAGE1" };
+
+ button1.Clicked += (sender, e) => Navigation.PushAsync (_page1);
+
+ var root = new StackLayout {
+ HorizontalOptions = LayoutOptions.FillAndExpand,
+ VerticalOptions = LayoutOptions.FillAndExpand,
+ Children = {
+ button1,
+ }
+ };
+
+ Content = root;
+ }
+
+ public class XamarinListViewBug : MasterDetailPage
+ {
+ bool _flag;
+
+ readonly ObservableCollection<Tuple<string, string>> _collection = new ObservableCollection<Tuple<string, string>>();
+
+ void FillTheList()
+ {
+ _collection.Clear();
+
+ for (int i = 0; i < 100; i++) {
+ var item = new Tuple<string, string> (
+ string.Format ("{0} {0} {0} {0} {0} {0}", _flag ? i : 100 - i),
+ string.Format ("---- i ----{0} {0} {0} {0} {0} {0}", _flag ? i : 100 - i)
+ );
+
+
+ _collection.Add (item);
+ }
+
+ _flag = !_flag;
+ }
+
+ public XamarinListViewBug()
+ {
+ Title = "XamarinListViewBug";
+
+ SearchBar search = new SearchBar();
+ search.SearchButtonPressed += (sender, e) => FillTheList();
+
+ ListView list = new ListView {
+ HorizontalOptions = LayoutOptions.FillAndExpand,
+ VerticalOptions = LayoutOptions.FillAndExpand,
+ HasUnevenRows = true,
+ ItemsSource = _collection,
+ ItemTemplate = new DataTemplate (typeof (CellTemplate))
+ };
+
+ StackLayout root = new StackLayout {
+ HorizontalOptions = LayoutOptions.FillAndExpand,
+ VerticalOptions = LayoutOptions.FillAndExpand,
+ Children = {
+ search,
+ list,
+ }
+ };
+
+ Master = new ContentPage { Title = "Master" };
+ Detail = new ContentPage {
+ Title = "Detail",
+ Content = root
+ };
+ }
+
+ class CellTemplate : ViewCell
+ {
+ public CellTemplate()
+ {
+ Label cellLabel = new Label{
+ HorizontalOptions = LayoutOptions.FillAndExpand,
+ };
+
+ cellLabel.SetBinding (Label.TextProperty, new Binding ("Item1", BindingMode.OneWay));
+
+ StackLayout root = new StackLayout {
+ Children = {
+ cellLabel
+ }
+ };
+
+ View = root;
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1682.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1682.cs
new file mode 100644
index 00000000..b23a534d
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1682.cs
@@ -0,0 +1,30 @@
+using System;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 1682, "Software keyboard does not show up when we set Focus for Entry in Android", PlatformAffected.Android, NavigationBehavior.PushModalAsync)]
+ public class Issue1682 : ContentPage
+ {
+ public Issue1682 ()
+ {
+ var entry = new Entry {
+ WidthRequest = 300
+ };
+
+ var button = new Button {
+ Text = "Click"
+ };
+
+ button.Clicked += (sender, e) => entry.Focus ();
+
+ Content = new StackLayout {
+ Children = { entry, button },
+ VerticalOptions = LayoutOptions.CenterAndExpand,
+ HorizontalOptions = LayoutOptions.CenterAndExpand,
+ };
+ }
+ }
+}
+
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1685.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1685.cs
new file mode 100644
index 00000000..1f9cbcf2
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1685.cs
@@ -0,0 +1,77 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 1685, "Entry clears when upadting text from native with one-way binding", PlatformAffected.Android | PlatformAffected.iOS | PlatformAffected.WinPhone, NavigationBehavior.PushModalAsync)]
+ public class Issue1685 : ContentPage
+ {
+ class Test : INotifyPropertyChanged
+ {
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ decimal _entryValue = decimal.Zero;
+ public decimal EntryValue
+ {
+ get
+ {
+ return _entryValue;
+ }
+ set
+ {
+ _entryValue = value;
+ OnPropertyChanged("EntryValue");
+ }
+ }
+
+ void OnPropertyChanged(string caller) {
+ var handler = PropertyChanged;
+ if (handler != null)
+ {
+ handler(this, new PropertyChangedEventArgs(caller));
+ }
+ }
+ }
+
+ public Issue1685()
+ {
+ Title = "EntryBindingBug";
+
+ BindingContext = new Test();
+
+ var entry = new Entry() {
+ Placeholder = "Entry"
+ };
+ entry.SetBinding(Entry.TextProperty, "EntryValue", BindingMode.OneWay);
+
+ var button = new Button() {
+ Text = "Click me"
+ };
+
+ button.Clicked += (sender, e) =>
+ {
+ var context = BindingContext as Test;
+ context.EntryValue = context.EntryValue + 1;
+ };
+
+ var root = new StackLayout() {
+ VerticalOptions = LayoutOptions.FillAndExpand,
+ HorizontalOptions = LayoutOptions.FillAndExpand,
+ Children = {
+ entry,
+ button
+ }
+ };
+
+ Content = root;
+
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1691.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1691.cs
new file mode 100644
index 00000000..110f9093
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1691.cs
@@ -0,0 +1,77 @@
+using System;
+using System.Collections.ObjectModel;
+using System.Linq;
+
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+using System.Diagnostics;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 1691, "CarouselPage iOS CurrentPage bug")]
+ public class Issue1691 : TestCarouselPage
+ {
+ int _currentIndex;
+ int _page = 9;
+
+ protected override void Init ()
+ {
+ _currentIndex = 10;
+ ItemsSource = new ObservableCollection<int>() { _currentIndex };
+ SelectedItem = ((ObservableCollection<int>)ItemsSource)[0];
+ }
+
+ protected override ContentPage CreateDefault (object item)
+ {
+ var currentInt = item as int?;
+
+ var label = new Label {
+ Text = "Page " + currentInt,
+ };
+
+ return new ContentPage {
+ Content = new StackLayout {
+ Children = {
+ label,
+ new Button {
+ AutomationId = "CreatePreviousPage" + currentInt,
+ Text = "Create previous page",
+ Command = new Command (() => {
+ ((ObservableCollection<int>)ItemsSource).Insert (0, _page);
+ _page--;
+ label.Text = "Page Created";
+ })
+ },
+ new Button {
+ AutomationId = "GoToPreviousPage" + currentInt,
+ Text = "Go to previous page",
+ Command = new Command (() => {
+ CurrentPage = Children[0];
+ })
+ }
+ }
+ }
+ };
+ }
+
+#if UITEST
+ [Test]
+ public void Issue1691Test ()
+ {
+ RunningApp.Screenshot ("I am at Issue 1691");
+ RunningApp.Tap (q => q.Marked ("CreatePreviousPage10"));
+ RunningApp.WaitForElement (q => q.Marked ("Page Created"));
+ RunningApp.Screenshot ("I should be on the same page with a new page created to the left");
+ RunningApp.Tap (q => q.Marked ("GoToPreviousPage10"));
+ RunningApp.WaitForNoElement (q => q.Marked ("GoToPreviousPage10"));
+ RunningApp.Screenshot ("I should be on page 9");
+ RunningApp.WaitForElement (q => q.Marked ("GoToPreviousPage9"));
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1698.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1698.cs
new file mode 100644
index 00000000..d50727fd
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1698.cs
@@ -0,0 +1,29 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 1698, "ActionSheet extra buttons are not accessible", PlatformAffected.Android | PlatformAffected.WinPhone)]
+ public class Issue1698 : ContentPage
+ {
+ public Issue1698 ()
+ {
+ Button btn = new Button
+ {
+ Text = "Display ActionSheet"
+ };
+
+ btn.Clicked += btn_Clicked;
+
+ Content = btn;
+ }
+
+ public async void btn_Clicked(object sender, EventArgs e)
+ {
+ string x = await DisplayActionSheet("Action Sheet", "Cancel", null, new string[] { "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "Eleven", "twelve", "thirteen", "fourteen" });
+ }
+ }
+}
+
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1700.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1700.cs
new file mode 100644
index 00000000..5335bf98
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1700.cs
@@ -0,0 +1,30 @@
+using System;
+
+using Xamarin.Forms;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 1700, "Image fails loading from long URL", PlatformAffected.iOS | PlatformAffected.Android | PlatformAffected.WinPhone)]
+ public class Issue1700 : ContentPage
+ {
+ public Issue1700 ()
+ {
+ var stack = new StackLayout();
+ var url = "http://imgs.xkcd.com/comics/tasks.png?a=bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb";
+ var url2 = "http://www.optipess.com/wp-content/uploads/2010/08/02_Bad-Comics6-10.png?a=bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbasdasdasdasdasasdasdasdasdasd";
+ var img = new Image{
+ Source = new UriImageSource { Uri = new Uri(url) }
+ } ;
+ stack.Children.Add(img);
+ var img2 = new Image{
+ Source = new UriImageSource { Uri = new Uri(url2) }
+ } ;
+ stack.Children.Add(img2);
+ Content = new ScrollView() { Content = stack };
+ }
+ }
+}
+
+
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1703.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1703.cs
new file mode 100644
index 00000000..3f301d33
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1703.cs
@@ -0,0 +1,63 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 1703, "Memory leak when navigating a page off of a navigation stack", PlatformAffected.Android | PlatformAffected.iOS | PlatformAffected.WinPhone)]
+ public class Issue1703 : NavigationPage
+ {
+ static List<WeakReference> s_pageRefs = new List<WeakReference>();
+
+ public Issue1703 ()
+ {
+ Navigation.PushAsync (GetMainPage ());
+ }
+
+ public static Page GetMainPage()
+ {
+ return CreateWeakReferencedPage();
+ }
+
+ static Page CreateWeakReferencedPage()
+ {
+ GC.Collect();
+ var result = CreatePage();
+ s_pageRefs.Add(new WeakReference(result));
+
+ // Add a second unreferenced page to prove that the problem only exists
+ // when pages are actually navigated to/from
+ s_pageRefs.Add(new WeakReference(CreatePage()));
+ GC.Collect();
+ return result;
+ }
+
+ static Page CreatePage()
+ {
+ var page = new ContentPage();
+ var contents = new StackLayout();
+
+ contents.Children.Add(
+ new Button
+ {
+ Text = "Next Page",
+ Command = new Command(() => page.Navigation.PushAsync(CreateWeakReferencedPage()))
+ });
+ contents.Children.Add(
+ new Label
+ {
+ Text = string.Format(
+ "References alive at time of creation: {0}",
+ s_pageRefs.Count(p => p.IsAlive)),
+ HorizontalOptions = LayoutOptions.CenterAndExpand
+ });
+
+ page.Content = contents;
+ return page;
+ }
+ }
+}
+
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1705.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1705.cs
new file mode 100644
index 00000000..c8e2bea6
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1705.cs
@@ -0,0 +1,38 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 1705, "Editor.IsEnabled = false", PlatformAffected.iOS)]
+ public class Issue1705 : ContentPage
+ {
+ public Issue1705 ()
+ {
+ Title = "test page";
+ Padding = 10;
+
+ var layout = new StackLayout ();
+ var t = new Entry {
+ IsEnabled = false
+ };
+
+ var e = new Editor {
+ IsEnabled = false,
+ BackgroundColor = Color.Aqua
+ };
+
+ layout.Children.Add (e);
+ layout.Children.Add (t);
+
+ Content = layout;
+ }
+ }
+
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1712.xaml b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1712.xaml
new file mode 100644
index 00000000..d1720e46
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1712.xaml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="Xamarin.Forms.Controls.Issue1712">
+ <ContentPage.Content>
+ <WebView Source="http://xamarin.com/" VerticalOptions="FillAndExpand" />
+ </ContentPage.Content>
+</ContentPage>
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1712.xaml.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1712.xaml.cs
new file mode 100644
index 00000000..ca3e2d1e
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1712.xaml.cs
@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using Xamarin.Forms;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+#if APP
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 1712, "Wrong error thrown when setting LayoutOptions property to string", PlatformAffected.Android | PlatformAffected.iOS | PlatformAffected.WinPhone)]
+ public partial class Issue1712 : ContentPage
+ {
+ public Issue1712 ()
+ {
+ InitializeComponent ();
+ }
+ }
+#endif
+}
+
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1722.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1722.cs
new file mode 100644
index 00000000..1b5b3a8d
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1722.cs
@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 1722, "MasterDetailPage crashes when assigning a NavigationPage to Detail with no children pushed", PlatformAffected.iOS)]
+ public class Issue1722 : MasterDetailPage
+ {
+ public Issue1722 ()
+ {
+ Master = new ContentPage {
+ Title = "Master",
+ Content = new Label { Text = "Master" }
+ };
+
+ Detail = new NavigationPage ();
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1723.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1723.cs
new file mode 100644
index 00000000..8671e75d
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1723.cs
@@ -0,0 +1,53 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 1723, "Picker's Items.Clear cause exception", PlatformAffected.WinPhone, NavigationBehavior.PushModalAsync)]
+ public class Issue1723
+ : ContentPage
+ {
+ Picker _picker = null;
+
+ public Issue1723()
+ {
+ StackLayout layout = new StackLayout();
+ Content = layout;
+
+ _picker = new Picker();
+ layout.Children.Add(_picker);
+
+ Button button = new Button();
+ button.Clicked += button_Clicked;
+ button.Text = "prepare magic";
+ layout.Children.Add(button);
+ }
+
+ void button_Clicked(object sender, EventArgs e)
+ {
+ Random r = new Random();
+
+ _picker.Items.Clear();
+
+ for (int j = 0; j < r.Next(10, 30); j++)
+ {
+ StringBuilder sb = new StringBuilder();
+ for (int k = 10; k < r.Next(15, 35); k++)
+ {
+ sb.Append((char)r.Next(65, 90));
+ }
+ _picker.Items.Add(sb.ToString());
+ }
+ _picker.SelectedIndex = r.Next(0, _picker.Items.Count);
+
+ Button button = (Button)sender;
+ button.Text = "crash the magic";
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1741.xaml b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1741.xaml
new file mode 100644
index 00000000..ce37314e
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1741.xaml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+ x:Class="Xamarin.Forms.Controls.Issue1741">
+ <Switch x:Name="chkAnon" Toggled="Anonymous_Toggled" />
+</ContentPage> \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1741.xaml.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1741.xaml.cs
new file mode 100644
index 00000000..8972ae80
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1741.xaml.cs
@@ -0,0 +1,27 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+#if APP
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 1741, "Switch.IsEnabled = false does not disable a switch when switch is defined in XAML", PlatformAffected.WinPhone)]
+ public partial class Issue1741 : ContentPage
+ {
+ public Issue1741 ()
+ {
+ InitializeComponent();
+ }
+
+ public void Anonymous_Toggled (object sender, EventArgs e)
+ {
+ chkAnon.IsEnabled = !chkAnon.IsEnabled;
+ }
+ }
+#endif
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1742.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1742.cs
new file mode 100644
index 00000000..90c5ee57
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1742.cs
@@ -0,0 +1,55 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 1742, "Invisible Button still fires Clicked event", PlatformAffected.WinPhone)]
+ public class Issue1742 : ContentPage
+ {
+ public Issue1742 ()
+ {
+ var listView = new ListView
+ {
+ RowHeight = 40
+ };
+ var invisibleButton = new Button
+ {
+ IsVisible = false,
+ Text = "INVISIBLE button"
+ };
+ var visibleButton = new Button
+ {
+ IsVisible = true,
+ Text = "Visible button"
+ };
+
+ invisibleButton.Clicked += Button_Clicked;
+ visibleButton.Clicked += Button_Clicked;
+ listView.ItemTapped += ListView_ItemTapped;
+
+ listView.ItemsSource = new string[] { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" };
+
+ Content = new StackLayout {
+ VerticalOptions = LayoutOptions.FillAndExpand,
+ Children = { listView, visibleButton, invisibleButton }
+ };
+
+ }
+
+ void ListView_ItemTapped(object sender, ItemTappedEventArgs args)
+ {
+ DisplayAlert("Alert", "List item tapped", "OK", "Cancel");
+ }
+
+ void Button_Clicked(object sender, EventArgs args)
+ {
+ DisplayAlert("Alert", ((Button)sender).Text + " clicked", "OK", "Cancel");
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1747.xaml b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1747.xaml
new file mode 100644
index 00000000..5b599790
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1747.xaml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+ x:Class="Xamarin.Forms.Controls.Issue1747">
+ <StackLayout>
+ <Switch IsToggled="{Binding ShouldBeToggled, Mode=TwoWay}" IsEnabled="{Binding ShouldBeEnabled}"/>
+ <Button Text="Toggle Enabled" Clicked="Button_OnClick" />
+ </StackLayout>
+</ContentPage>
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1747.xaml.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1747.xaml.cs
new file mode 100644
index 00000000..b24e8404
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1747.xaml.cs
@@ -0,0 +1,65 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Runtime.CompilerServices;
+
+using Xamarin.Forms;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+
+ public class ViewModel : INotifyPropertyChanged
+ {
+ bool _shouldBeToggled;
+ public bool ShouldBeToggled {
+ get { return _shouldBeToggled; }
+ set
+ {
+ _shouldBeToggled = value;
+ OnPropertyChanged ();
+ }
+ }
+
+ bool _shouldBeEnabled;
+ public bool ShouldBeEnabled {
+ get { return _shouldBeEnabled; }
+ set
+ {
+ _shouldBeEnabled = value;
+ OnPropertyChanged ();
+ }
+ }
+
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ protected virtual void OnPropertyChanged ([CallerMemberName] string propertyName = null)
+ {
+ PropertyChangedEventHandler handler = PropertyChanged;
+ if (handler != null)
+ handler (this, new PropertyChangedEventArgs (propertyName));
+ }
+ }
+#if APP
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 1747, "Binding to Switch.IsEnabled has no effect", PlatformAffected.WinPhone)]
+ public partial class Issue1747 : ContentPage
+ {
+ readonly ViewModel _vm;
+
+ public Issue1747 ()
+ {
+ _vm = new ViewModel ();
+ BindingContext = _vm;
+ InitializeComponent ();
+ }
+
+ public void Button_OnClick (object sender, EventArgs args)
+ {
+ _vm.ShouldBeToggled = !_vm.ShouldBeToggled;
+ _vm.ShouldBeEnabled = !_vm.ShouldBeEnabled;
+ }
+ }
+#endif
+}
+
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1755.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1755.cs
new file mode 100644
index 00000000..ed4b88e4
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1755.cs
@@ -0,0 +1,36 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+using Xamarin.Forms.CustomAttributes;
+using Xamarin.Forms.Maps;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 1755, "Initializing a map with a different MapType other than default has no effect", PlatformAffected.WinPhone)]
+ public class Issue1755
+ : ContentPage
+ {
+ public Issue1755()
+ {
+ var map = new Map (MapSpan.FromCenterAndRadius (new Position (54.767683, -1.571671), Distance.FromMiles (5))) {
+ IsShowingUser = false,
+ HeightRequest = 100,
+ WidthRequest = 960,
+ VerticalOptions = LayoutOptions.FillAndExpand,
+ MapType = MapType.Hybrid
+ };
+
+ var switchMapTypeButton = new Button { Text = "Switch to hybrid" };
+ switchMapTypeButton.Clicked += (sender, args) => map.MapType = map.MapType == MapType.Hybrid ? MapType.Street : MapType.Hybrid;
+
+ var stack = new StackLayout { Spacing = 0 };
+ stack.Children.Add(map);
+ stack.Children.Add(switchMapTypeButton);
+ Content = stack;
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1758.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1758.cs
new file mode 100644
index 00000000..0afd2ebb
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1758.cs
@@ -0,0 +1,68 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 1758, "LayoutTo needs to be smarted about using layout specific API calls", PlatformAffected.Android | PlatformAffected.iOS | PlatformAffected.WinPhone)]
+ public class Issue1758 : ContentPage
+ {
+ ListView _list;
+ Button _button;
+
+ public Issue1758()
+ {
+ _list = new ListView { ItemsSource = new[] { "hello", "world", "from", "xamarin", "forms" } };
+
+ _button = new Button { Text = "Button" };
+
+ // The same behavior happens for both Absolute and Relative layout.
+ var layout = true ? Relative() : Absolute();
+
+ Animate();
+
+ Content = layout;
+ }
+
+ Layout Relative()
+ {
+ var layout = new RelativeLayout();
+
+ layout.Children.Add(_list,
+ Forms.Constraint.RelativeToParent(p => p.X),
+ Forms.Constraint.RelativeToParent(p => p.Y),
+ Forms.Constraint.RelativeToParent(p => p.Width),
+ Forms.Constraint.RelativeToParent(p => p.Height)
+ );
+
+ layout.Children.Add(_button,
+ Forms.Constraint.Constant(0),
+ Forms.Constraint.Constant(300));
+
+ return layout;
+ }
+
+ Layout Absolute()
+ {
+ var layout = new AbsoluteLayout { Children = { _list, _button } };
+
+ AbsoluteLayout.SetLayoutBounds(_list, new Rectangle(0, 0, AbsoluteLayout.AutoSize, AbsoluteLayout.AutoSize));
+ AbsoluteLayout.SetLayoutBounds(_button, new Rectangle(0, 300, AbsoluteLayout.AutoSize, AbsoluteLayout.AutoSize));
+
+ return layout;
+ }
+
+ async void Animate()
+ {
+ // Comment this delay out to see the bug
+ // await Task.Delay(500);
+
+ _button.LayoutTo(new Rectangle(100, 100, 100, 100), 1000);
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1762.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1762.cs
new file mode 100644
index 00000000..cc50fa52
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1762.cs
@@ -0,0 +1,273 @@
+using System;
+using System.Collections.ObjectModel;
+using System.Collections.Specialized;
+using System.ComponentModel;
+using System.Linq;
+using System.Linq.Expressions;
+using System.Runtime.CompilerServices;
+
+using Xamarin.Forms;
+using System.Collections.Generic;
+
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 1762, "Binding issue with SwitchCell - System.ArgumentException:'jobject' must not be IntPtr.Zero", PlatformAffected.Android)]
+ public class Issue1762 : ContentPage
+ {
+ public static ObservableGroupMyObjCollection Objs = new ObservableGroupMyObjCollection ();
+
+ public Issue1762 ()
+ {
+ StackLayout stack = new StackLayout
+ {};
+ stack.Children.Add (new ListView {
+ ItemsSource = Objs,
+ ItemTemplate = new DataTemplate (() => {
+ SwitchCell cell = new SwitchCell ();
+ cell.SetBinding<MyObj> (SwitchCell.TextProperty, m => m.DisplayText);
+ cell.SetBinding<MyObj> (SwitchCell.OnProperty, m => m.IsSelected);
+ return cell;
+ }),
+ IsGroupingEnabled = true,
+ GroupDisplayBinding = new Binding ("Key")
+ });
+ Button b = new Button {
+ Text = "add"
+ };
+ b.Clicked += (sender, e) => {
+ Random r = new Random ();
+ Objs.Add (new MyObj {
+ DisplayText = r.Next ().ToString (),
+ IsSelected = r.Next () % 2 == 0
+ });
+ };
+ stack.Children.Add (b);
+
+ Content = stack;
+ }
+ }
+
+ public class Grouping<K, T> : ObservableCollection<T>, IGroupingCollection<K, T> where T : INotifyPropertyChanged
+ {
+ public K Key { get; private set; }
+
+ public Grouping (K key, IEnumerable<T> items)
+ {
+ Key = key;
+ foreach (var item in items)
+ Items.Add (item);
+ }
+
+ public Grouping (K key, T item)
+ {
+ Key = key;
+ Items.Add (item);
+ }
+ }
+
+ public static class Extensions
+ {
+ public static IEnumerable<T> Enumerate<T> (this IEnumerable<IEnumerable<T>> listOfList)
+ {
+ foreach (var list in listOfList) {
+ foreach (T item in list)
+ yield return item;
+ }
+ }
+ }
+
+ public interface IGroupingCollection<K, T> : ICollection<T>, IGrouping<K, T> {}
+
+ public interface ISortingKey<T>
+ {
+ T SortingKey { get; }
+ }
+
+ public class MyObj : ObservableObject, ISortingKey<bool>
+ {
+ public MyObj () {}
+
+ string _displayText;
+
+ public string DisplayText
+ {
+ get { return _displayText; }
+ set { SetProperty (ref _displayText, value); }
+ }
+
+ bool _isSelected;
+
+ public bool IsSelected
+ {
+ get { return _isSelected; }
+ set
+ {
+ if (SetProperty (ref _isSelected, value))
+ NotifyPropertyChanged (() => SortingKey);
+ }
+ }
+
+ #region ISortingKey implementation
+ public bool SortingKey
+ {
+ get { return IsSelected; }
+ }
+ #endregion
+ }
+
+ public abstract class ObservableGroupCollection<K, T> : ObservableCollection<IGroupingCollection<K, T>> where T : class, INotifyPropertyChanged, ISortingKey<K>
+ {
+ Func<K, K, bool> _equalityComparer;
+
+ public ObservableGroupCollection (IEnumerable<IGroupingCollection<K, T>> items, Func<K, K, bool> equalityComparer)
+ : base (items)
+ {
+ _equalityComparer = equalityComparer;
+ if (items != null) {
+ foreach (var propChangeItem in items.Enumerate ())
+ SetupPropertyChanged (propChangeItem, equalityComparer);
+ }
+ }
+
+ void SetupPropertyChanged (T propChangeItem, Func<K, K, bool> equalityComparer)
+ {
+ propChangeItem.PropertyChanged += (sender, e) => {
+ if (e.PropertyName == "SortingKey") {
+ //using (BlockReentrancy())
+ {
+ T changedItem = (T)sender;
+ IGroupingCollection<K, T> oldGroup = null, newGroup = null;
+ foreach (var group in Items) //go through all groups to find item
+ {
+ if (oldGroup == null /* || newGroup == null*/) {
+ foreach (var item2 in group) {
+ if (oldGroup == null && item2 == changedItem)
+ oldGroup = group;
+ }
+ }
+ if (newGroup == null && equalityComparer (group.Key, changedItem.SortingKey))
+ newGroup = group;
+ }
+ if (oldGroup != null) {
+ oldGroup.Remove (changedItem);
+ if (oldGroup.Count == 0) {
+ OnCollectionChanged (new NotifyCollectionChangedEventArgs (NotifyCollectionChangedAction.Remove, oldGroup));
+ Items.Remove (oldGroup);
+ }
+ }
+#if DEBUG
+ else
+ throw new Exception ("oldGroup == null");
+#endif
+ if (newGroup == null) {
+ Items.Add (newGroup = new Grouping<K, T> (changedItem.SortingKey, changedItem));
+ OnCollectionChanged (new NotifyCollectionChangedEventArgs (NotifyCollectionChangedAction.Add, newGroup));
+ } else {
+ foreach (var item in newGroup) {
+ if (item == changedItem)
+ return;
+ }
+ newGroup.Add (changedItem);
+ }
+ }
+ }
+ };
+ }
+
+ public ObservableGroupCollection (IGroupingCollection<K, T> item, Func<K, K, bool> equalityComparer)
+ {
+ _equalityComparer = equalityComparer;
+ if (item != null) {
+ foreach (T t in item)
+ SetupPropertyChanged (t, equalityComparer);
+ }
+ }
+
+ public void Add (T item)
+ {
+ SetupPropertyChanged (item, _equalityComparer);
+ foreach (IGroupingCollection<K, T> group in Items) {
+ if (_equalityComparer (group.Key, item.SortingKey)) {
+ group.Add (item);
+ return;
+ }
+ }
+ Grouping<K, T> newGroup = new Grouping<K, T> (item.SortingKey, item);
+ Items.Add (newGroup);
+ OnCollectionChanged (new NotifyCollectionChangedEventArgs (NotifyCollectionChangedAction.Add, newGroup));
+ }
+
+ /*protected override void OnCollectionChanged(NotifyCollectionChangedEventArgs e)
+ {
+ base.OnCollectionChanged(e);
+ }*/
+ }
+
+ public class ObservableGroupMyObjCollection : ObservableGroupCollection<bool, MyObj>
+ {
+ public ObservableGroupMyObjCollection ()
+ : base ((IGroupingCollection<bool, MyObj>)null, (k1, k2) => k1 == k2) {}
+ }
+
+ public abstract class ObservableObject : INotifyPropertyChanged
+ {
+ public event PropertyChangedEventHandler PropertyChanged;
+
+
+ protected virtual void NotifyPropertyChanged ([CallerMemberName] string propertyName = null)
+ {
+ OnPropertyChanged (new PropertyChangedEventArgs (propertyName));
+ }
+
+ protected virtual void NotifyPropertyChanged<T> (Expression<Func<T>> propertyExpression)
+ {
+ string propertyName = GetPropertyName (propertyExpression);
+ OnPropertyChanged (new PropertyChangedEventArgs (propertyName));
+ }
+
+ protected virtual void OnPropertyChanged (PropertyChangedEventArgs e)
+ {
+ var eventHandler = PropertyChanged;
+ if (eventHandler != null) {
+ try {
+ eventHandler (this, e); //crashes here!
+ } catch (Exception ex) {
+ System.Diagnostics.Debug.WriteLine (ex);
+ }
+ }
+ }
+
+
+ protected bool SetProperty<T> (ref T storage, T value, Expression<Func<T>> propertyExpression)
+ {
+ var propertyName = GetPropertyName (propertyExpression);
+ return SetProperty<T> (ref storage, value, propertyName);
+ }
+
+
+ protected bool SetProperty<T> (ref T storage, T value, [CallerMemberName] string propertyName = null)
+ {
+ if (EqualityComparer<T>.Default.Equals (storage, value))
+ return false;
+
+ storage = value;
+ NotifyPropertyChanged (propertyName);
+ return true;
+ }
+
+ string GetPropertyName<T> (Expression<Func<T>> propertyExpression)
+ {
+ if (propertyExpression == null)
+ throw new ArgumentNullException ("propertyExpression");
+
+ if (propertyExpression.Body.NodeType != ExpressionType.MemberAccess)
+ throw new ArgumentException ("Should be a member access lambda expression", "propertyExpression");
+
+ var memberExpression = (MemberExpression)propertyExpression.Body;
+ return memberExpression.Member.Name;
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1763.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1763.cs
new file mode 100644
index 00000000..e6cb31f3
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1763.cs
@@ -0,0 +1,104 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel;
+using System.Linq;
+using System.Runtime.CompilerServices;
+using System.Text;
+using System.Threading.Tasks;
+
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 1763, "First item of grouped ListView not firing .ItemTapped", PlatformAffected.WinPhone, NavigationBehavior.PushAsync)]
+ public class Issue1763 : TabbedPage
+ {
+ public Issue1763 ()
+ {
+ Title = "Contacts";
+
+ Children.Add (new ContactsPage ());
+ }
+ }
+
+ public class ContactsPage : ContentPage
+ {
+ public ContactsPage ()
+ {
+ var listView = new ListView {
+ ItemTemplate = new DataTemplate (() => {
+ var cell = new TextCell ();
+ cell.SetBinding (TextCell.TextProperty, new Binding ("Name"));
+ cell.SetBinding (TextCell.DetailProperty, new Binding ("Number"));
+ return cell;
+ }),
+ IsGroupingEnabled = true,
+ GroupDisplayBinding = new Binding ("Name")
+ };
+
+ var groupedContacts = new ObservableCollection<Group<ContactViewModel>> {
+ new Group<ContactViewModel> ("E", new[] {
+ new ContactViewModel { Name = "Egor1", Number = "'Tap' on this item won't fire the event" },
+ new ContactViewModel { Name = "Egor2", Number = "123" },
+ new ContactViewModel { Name = "Egor3", Number = "123" },
+ })
+ };
+
+ listView.ItemsSource = groupedContacts;
+ listView.ItemTapped += ListViewOnItemTapped;
+
+ Content = listView;
+ }
+
+ void ListViewOnItemTapped (object sender, ItemTappedEventArgs itemTappedEventArgs)
+ {
+ DisplayActionSheet ("Tapped a List item", "Cancel", "Destruction");
+ }
+ }
+
+ public class ContactViewModel : ViewModelBase2
+ {
+ string _name;
+ string _number;
+
+ public string Name
+ {
+ get { return _name; }
+ set { SetProperty (ref _name, value); }
+ }
+
+ public string Number
+ {
+ get { return _number; }
+ set { SetProperty (ref _number, value); }
+ }
+ }
+
+ public class Group<TItem> : ObservableCollection<TItem>
+ {
+ public Group (string name, IEnumerable<TItem> items)
+ {
+ Name = name;
+ foreach (var item in items)
+ Add (item);
+ }
+
+ public string Name { get; set; }
+ }
+
+ public class ViewModelBase2 : INotifyPropertyChanged
+ {
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ protected virtual ViewModelBase2 SetProperty<T> (ref T field, T value, [CallerMemberName] string propertyName = null)
+ {
+ field = value;
+ PropertyChangedEventHandler handler = PropertyChanged;
+ if (handler != null)
+ handler (this, new PropertyChangedEventArgs (propertyName));
+ return this;
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1766.xaml b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1766.xaml
new file mode 100644
index 00000000..15479bd6
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1766.xaml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ContentPage
+ xmlns="http://xamarin.com/schemas/2014/forms"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+ x:Class="Xamarin.Forms.Controls.Issue1766">
+ <ContentPage.Content>
+ <ListView ItemsSource="{Binding MyItems}" x:Name="MyListViewList">
+ <ListView.ItemTemplate>
+ <DataTemplate>
+ <ViewCell>
+ <StackLayout Orientation="Horizontal">
+ <Label Text="{Binding Reference}"/>
+ <Button Clicked="OnButtonClicked"
+ Text=">>>"
+ IsVisible="{Binding ShowButton}"/>
+ </StackLayout>
+ </ViewCell>
+ </DataTemplate>
+ </ListView.ItemTemplate>
+ </ListView>
+ </ContentPage.Content>
+</ContentPage> \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1766.xaml.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1766.xaml.cs
new file mode 100644
index 00000000..efac1a1a
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1766.xaml.cs
@@ -0,0 +1,65 @@
+using System;
+using System.Collections.Generic;
+using Xamarin.Forms;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+#if APP
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 1766, "Editor.IsEnabled = false", PlatformAffected.WinPhone)]
+ public partial class Issue1766 : ContentPage
+ {
+ public Issue1766 ()
+ {
+ InitializeComponent();
+ MyItems.Add(new MyItem() { Reference = DateTime.Now.Ticks.ToString(), ShowButton = true });
+ MyItems.Add(new MyItem() { Reference = DateTime.Now.Ticks.ToString(), ShowButton = false });
+ MyItems.Add(new MyItem() { Reference = DateTime.Now.Ticks.ToString(), ShowButton = true });
+ MyItems.Add(new MyItem() { Reference = DateTime.Now.Ticks.ToString(), ShowButton = false });
+
+ var myListViewList = this.FindByName<ListView>("MyListViewList");
+
+ foreach (var item in myListViewList.ItemTemplate.Values)
+ {
+ System.Diagnostics.Debug.WriteLine("item: {0}", item);
+ }
+
+ if (myListViewList != null)
+ {
+ myListViewList.ItemTapped += (sender, args) =>
+ {
+ DisplayAlert("Item Tapped", "Item Tapped", "Ok");
+ };
+ }
+
+ BindingContext = this;
+ }
+
+ List<MyItem> _myItems;
+ public List<MyItem> MyItems
+ {
+ get
+ {
+ if (_myItems == null) {
+ _myItems = new List<MyItem> ();
+ }
+ return _myItems;
+ }
+ }
+
+ public void OnButtonClicked(object sender, EventArgs e)
+ {
+ DisplayAlert("Button Tapped", "Button Tapped", "Ok");
+ }
+ }
+
+ public class MyItem
+ {
+ public string Reference { get; set; }
+ public bool ShowButton { get; set; }
+ }
+#endif
+
+}
+
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1769.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1769.cs
new file mode 100644
index 00000000..3eabf8e2
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1769.cs
@@ -0,0 +1,81 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 1769, "PushAsync with Switch produces NRE", PlatformAffected.Android)]
+ public class Issue1769
+ : ContentPage
+ {
+ public Issue1769()
+ {
+ var button = new Button()
+ {
+ Text = "Go To Page 2"
+ };
+
+ var switchDemo = new SwitchDemoPage();
+
+ button.Clicked += async (sender, args) => {
+ await ((Button)sender).Navigation.PushAsync(switchDemo);
+ };
+
+ Content = button;
+ }
+
+ class SwitchDemoPage : ContentPage
+ {
+ Label _label;
+
+ public SwitchDemoPage()
+ {
+ Label header = new Label
+ {
+ Text = "Switch",
+ Font = Font.BoldSystemFontOfSize(50),
+ HorizontalOptions = LayoutOptions.Center
+ };
+
+ Switch switcher = new Switch
+ {
+ HorizontalOptions = LayoutOptions.Center,
+ VerticalOptions = LayoutOptions.CenterAndExpand
+ };
+ switcher.Toggled += switcher_Toggled;
+
+ _label = new Label
+ {
+ Text = "Switch is now False",
+ Font = Font.SystemFontOfSize(NamedSize.Large),
+ HorizontalOptions = LayoutOptions.Center,
+ VerticalOptions = LayoutOptions.CenterAndExpand
+ };
+
+ // Accomodate iPhone status bar.
+ Padding = new Thickness(10, Device.OnPlatform(20, 0, 0), 10, 5);
+
+ // Build the page.
+ Content = new StackLayout
+ {
+ Children =
+ {
+ header,
+ switcher,
+ _label
+ }
+ };
+ }
+
+ void switcher_Toggled(object sender, ToggledEventArgs e)
+ {
+ _label.Text = string.Format("Switch is now {0}", e.Value);
+ }
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1777.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1777.cs
new file mode 100644
index 00000000..31d4345c
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1777.cs
@@ -0,0 +1,66 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls.TestCasesPages
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 1777, "Adding picker items when picker is in a ViewCell breaks", PlatformAffected.WinPhone)]
+ public class Issue1777 : ContentPage
+ {
+ Picker _pickerTable = null;
+ Picker _pickerNormal = null;
+
+ public Issue1777 ()
+ {
+ StackLayout stackLayout = new StackLayout();
+ Content = stackLayout;
+
+ TableView tableView = new TableView();
+ stackLayout.Children.Add( tableView);
+
+ TableRoot tableRoot = new TableRoot();
+ tableView.Root = tableRoot;
+
+ TableSection tableSection = new TableSection("Table");
+ tableRoot.Add(tableSection);
+
+ ViewCell viewCell = new ViewCell ();
+ tableSection.Add (viewCell);
+
+ ContentView contentView = new ContentView ();
+ contentView.HorizontalOptions = LayoutOptions.FillAndExpand;
+ viewCell.View = contentView;
+
+ _pickerTable = new Picker ();
+ _pickerTable.HorizontalOptions = LayoutOptions.FillAndExpand;
+ contentView.Content = _pickerTable;
+
+ Label label = new Label ();
+ label.Text = "Normal";
+ stackLayout.Children.Add (label);
+
+ _pickerNormal = new Picker ();
+ stackLayout.Children.Add (_pickerNormal);
+
+ Button button = new Button ();
+ button.Clicked += button_Clicked;
+ button.Text = "do magic";
+ stackLayout.Children.Add (button);
+
+ //button_Clicked(button, EventArgs.Empty);
+ _pickerTable.SelectedIndex = 0;
+ _pickerNormal.SelectedIndex = 0;
+ }
+
+ void button_Clicked (object sender, EventArgs e)
+ {
+ _pickerTable.Items.Add ("test " + _pickerTable.Items.Count);
+ _pickerNormal.Items.Add ("test " + _pickerNormal.Items.Count);
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue181.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue181.cs
new file mode 100644
index 00000000..e290c4a6
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue181.cs
@@ -0,0 +1,41 @@
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using NUnit.Framework;
+using Xamarin.UITest;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 181, "Color not initialized for Label", PlatformAffected.Android, NavigationBehavior.PushModalAsync)]
+ public class Issue181 : TestContentPage
+ {
+ protected override void Init ()
+ {
+ Title = "Issue 181";
+ Content = new Frame {
+ OutlineColor = Color.Red,
+ BackgroundColor = new Color (1.0, 1.0, 0.0),
+ Content = new Label {
+ Text = "I should have red text",
+ TextColor = Color.Red,
+ BackgroundColor = new Color (0.5, 0.5, 0.5),
+ XAlign = TextAlignment.Center,
+ YAlign = TextAlignment.Center
+ }
+ };
+ }
+
+#if UITEST
+ [Test]
+ [Category ("ManualReview")]
+ [UiTest (typeof(Label), "TextColor")]
+ public void Issue181TestsLabelShouldHaveRedText ()
+ {
+ RunningApp.WaitForElement (q => q.Marked ("I should have red text"));
+ RunningApp.Screenshot ("Label should have red text");
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1851.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1851.cs
new file mode 100644
index 00000000..608bec6f
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1851.cs
@@ -0,0 +1,92 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls.TestCasesPages
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 1851, "ObservableCollection in ListView gets Index out of range when removing item", PlatformAffected.Android)]
+ public class Issue1851 : ContentPage
+ {
+ public Issue1851 ()
+ {
+ var grouping = new Grouping<string, string>("number", new List<string> { "1", "2", "3", "4", "5", "6", "7", "8", "9" });
+ var groupings = new ObservableCollection<Grouping<string, string>>
+ {
+ new Grouping<string, string>("letters", new List<string> {"a", "b", "c", "d", "e", "f", "g", "h", "i"}),
+ new Grouping<string, string>("colours", new List<string> {"red", "green", "blue", "white", "orange", "purple", "grey", "mauve", "pink"}),
+ grouping,
+ };
+
+ var listview = new ListView
+ {
+ HasUnevenRows = true,
+ IsGroupingEnabled = true,
+ ItemsSource = groupings,
+ ItemTemplate = new DataTemplate(typeof(CellTemplate)),
+ GroupDisplayBinding = new Binding("Key")
+ };
+ var groupbtn = new Button() { Text = "add/remove group" };
+ bool group = true;
+ groupbtn.Clicked += (sender, args) =>
+ {
+ listview.GroupShortNameBinding = new Binding ("Key");
+ if (group)
+ {
+ group = false;
+
+ // ***** Crashes here
+ groupings.Remove(grouping);
+ }
+ else
+ {
+ group = true;
+ groupings.Add(grouping);
+ }
+ };
+
+ Content = new StackLayout
+ {
+ Children =
+ {
+ groupbtn,
+ listview,
+ }
+ };
+ }
+ }
+
+ public class CellTemplate : ViewCell
+ {
+ protected override void OnBindingContextChanged()
+ {
+ base.OnBindingContextChanged();
+
+ var text = BindingContext as string;
+ if (text == null)
+ return;
+
+ View = new Label { Text = text };
+ }
+ }
+
+ public class Grouping<TKey, TElement> : ObservableCollection<TElement>
+ {
+ public Grouping(TKey key, IEnumerable<TElement> items)
+ {
+ Key = key;
+ foreach (var item in items)
+ Items.Add(item);
+ }
+
+ public TKey Key { get; private set; }
+
+
+ }
+}
+ \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1875.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1875.cs
new file mode 100644
index 00000000..0391ef4d
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1875.cs
@@ -0,0 +1,105 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 1875, "NSRangeException adding items through ItemAppearing", PlatformAffected.iOS)]
+ public class Issue1875
+ : ContentPage
+ {
+ public Issue1875()
+ {
+ Button loadData = new Button { Text = "Load", HorizontalOptions = LayoutOptions.FillAndExpand };
+ ListView mainList = new ListView {
+ VerticalOptions = LayoutOptions.FillAndExpand,
+ HorizontalOptions = LayoutOptions.FillAndExpand
+ };
+
+ mainList.SetBinding (ListView.ItemsSourceProperty, "Items");
+
+ _viewModel = new MainViewModel ();
+ BindingContext = _viewModel;
+ loadData.Clicked += async (sender, e) => {
+ await LoadData ();
+ };
+
+ mainList.ItemAppearing += OnItemAppearing;
+
+ Content = new StackLayout {
+ Children = {
+ loadData,
+ mainList
+ }
+ };
+ }
+
+ readonly MainViewModel _viewModel;
+ int _start = 0;
+ const int NumberOfRecords = 15;
+
+ async void OnItemAppearing(object sender, ItemVisibilityEventArgs e)
+ {
+ var item = (int)e.Item;
+ if (!_viewModel.IsLoading && item == _viewModel.Items.Last())
+ await LoadData();
+ }
+
+ async Task LoadData ()
+ {
+ await _viewModel.LoadData (_start, NumberOfRecords);
+ _start = _start + NumberOfRecords;
+ }
+
+ public class MainViewModel : INotifyPropertyChanged
+ {
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ public MainViewModel ()
+ {
+ }
+
+ ObservableCollection<int> _items;
+ public ObservableCollection<int> Items {
+ get {
+ if (_items == null)
+ _items = new ObservableCollection<int> ();
+
+ return _items;
+ }
+ set {
+ _items = value;
+ PropertyChanged (this, new PropertyChangedEventArgs ("Items"));
+ }
+ }
+
+ bool _isLoading;
+ public bool IsLoading {
+ get {
+ return _isLoading;
+ }
+ set {
+ if (_isLoading != value) {
+ _isLoading = value;
+ PropertyChanged (this, new PropertyChangedEventArgs ("IsLoading"));
+ }
+ }
+ }
+
+ public async Task LoadData (int start, int numberOfRecords)
+ {
+ IsLoading = true;
+ for (int counter = 0; counter < numberOfRecords; counter++)
+ Items.Add (start + counter);
+
+ IsLoading = false;
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1888.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1888.cs
new file mode 100644
index 00000000..b415fbfd
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1888.cs
@@ -0,0 +1,36 @@
+using System;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 1888, "Fix image resources not being freed after page is navigated away from ", PlatformAffected.iOS)]
+ public class Issue1888: ContentPage
+ {
+ public Issue1888 ()
+ {
+ var btn = new Button
+ {
+ Text = "Click!"
+ };
+ btn.Clicked += (sender, e) => Navigation.PushAsync(new LeakPage());
+ Content = btn;
+ }
+ }
+
+ public class LeakPage : ContentPage
+ {
+ public LeakPage ()
+ {
+ var img = new Image
+ {
+ Source = new FileImageSource
+ {
+ File = "Default-568h@2x.png"
+ }
+ };
+ Content = img;
+ }
+ }
+}
+
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1891.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1891.cs
new file mode 100644
index 00000000..5ffd34f0
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1891.cs
@@ -0,0 +1,81 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using NUnit.Framework;
+using Xamarin.UITest;
+#endif
+
+namespace Xamarin.Forms.Controls {
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 1891, "Modal dialog scrolls to far when focusing input boxes", PlatformAffected.iOS)]
+ public class Issue1891 : TestContentPage
+ {
+ protected override void Init ()
+ {
+ var entry = new Entry {
+ Text = "Email Address",
+ VerticalOptions = LayoutOptions.End,
+ HorizontalOptions = LayoutOptions.FillAndExpand,
+ HeightRequest = 60
+ };
+ var btn = new Button { Text = "focus entry" };
+ btn.Clicked += async (object sender, EventArgs e) => {
+ await Navigation.PushModalAsync (new ModalWithInputPage ());
+ };
+
+ Content = new ScrollView {
+ Content = new StackLayout {
+ VerticalOptions = LayoutOptions.End,
+ HorizontalOptions = LayoutOptions.FillAndExpand,
+ Children = {
+ new StackLayout{ Children = { btn, entry } }
+ }
+ }
+ };
+ }
+ public class ModalWithInputPage : ContentPage
+ {
+ public ModalWithInputPage()
+ {
+ Content = BuildLayout();
+ }
+
+ static Layout BuildLayout()
+ {
+ return new ScrollView
+ {
+ Content = new StackLayout
+ {
+ VerticalOptions = LayoutOptions.End,
+ HorizontalOptions = LayoutOptions.FillAndExpand,
+ Children = {
+ new Entry {
+ Placeholder = "Email Address",
+ VerticalOptions = LayoutOptions.End,
+ HorizontalOptions = LayoutOptions.FillAndExpand,
+ HeightRequest = 60
+ }
+ }
+ }
+ };
+ }
+ }
+
+#if UITEST
+ [Test]
+ [UiTest (typeof(TabbedPage))]
+ public void Issue1891Tests ()
+ {
+ // TODO
+ // Please redo, invalid test
+ Assert.Inconclusive ("Needs test");
+ }
+#endif
+
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1895.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1895.cs
new file mode 100644
index 00000000..1e65ecf9
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1895.cs
@@ -0,0 +1,80 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls.TestCasesPages
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 1895, "ListView with static BindingContext somehow leaks memory", PlatformAffected.iOS | PlatformAffected.Android)]
+ public class Issue1895
+ : ContentPage
+ {
+ public Issue1895()
+ {
+ var button = new Button { Text = "Push weak page" };
+ button.Clicked += async (sender, args) => await Navigation.PushAsync (CreateWeakReferencedPage());
+ Content = button;
+ }
+
+ static List<WeakReference> s_pageRefs = new List<WeakReference>();
+ static FakeProvider s_fakeProvider = new FakeProvider();
+
+ static Page CreateWeakReferencedPage()
+ {
+ GC.Collect();
+ GC.WaitForPendingFinalizers();
+ GC.Collect();
+
+ var result = CreatePage();
+ s_pageRefs.Add(new WeakReference(result));
+
+ return result;
+ }
+
+ class WeakReferencedPage : ContentPage
+ {
+
+ }
+
+ static Page CreatePage()
+ {
+ var page = new WeakReferencedPage();
+ var contents = new StackLayout();
+
+ contents.Children.Add (new Button {
+ Text = "Next Page",
+ Command = new Command(() => page.Navigation.PushAsync(CreateWeakReferencedPage()))
+ });
+
+ contents.Children.Add (new Label {
+ Text = string.Format ("References alive at time of creation: {0}", s_pageRefs.Count(p => p.IsAlive)),
+ HorizontalOptions = LayoutOptions.CenterAndExpand
+ });
+
+ var listView = new ListView { BindingContext = s_fakeProvider };
+ listView.SetBinding (ListView.ItemsSourceProperty, "Items");
+ contents.Children.Add (listView);
+
+ page.Content = contents;
+ return page;
+ }
+
+ class FakeProvider
+ {
+ public ObservableCollection<string> Items { get; private set; }
+
+ public FakeProvider()
+ {
+ Items = new ObservableCollection<string>();
+ Items.Add("Item 1");
+ Items.Add("Item 2");
+ Items.Add("Item 3");
+ Items.Add("Item 4");
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1898.xaml b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1898.xaml
new file mode 100644
index 00000000..3b5b096e
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1898.xaml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+ x:Class="Xamarin.Forms.Controls.Issue1898"
+ xmlns:local="clr-namespace:Xamarin.Forms.Controls;assembly=Xamarin.Forms.Controls">
+ <ContentPage x:Name="Issue1898PageOne" Title="Title 1" Icon="bank.png">
+ <StackLayout>
+ <Button Text="Change Title 1" Command="{Binding ChangeTitleOneCommand}" />
+ <Button Text="Change Icon 1" Command="{Binding ChangeIconOneCommand}" />
+ <Button Text="Change Icon other page 1" Command="{Binding ChangeIconOtherPageOneCommand}" />
+ </StackLayout>
+ </ContentPage>
+ <ContentPage x:Name="Issue1898PageTwo" Title="Title 2" Icon="calculator.png">
+ <StackLayout>
+ <Button Text="Change Title 2" Command="{Binding ChangeTitleTwoCommand}" />
+ <Button Text="Change Icon 2" Command="{Binding ChangeIconTwoCommand}" />
+ <Button Text="Change Icon other page 2" Command="{Binding ChangeIconOtherPageTwoCommand}" />
+ </StackLayout>
+ </ContentPage>
+</TabbedPage> \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1898.xaml.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1898.xaml.cs
new file mode 100644
index 00000000..2e0b615d
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1898.xaml.cs
@@ -0,0 +1,47 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Diagnostics;
+using System.Linq;
+using System.Runtime.CompilerServices;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Input;
+
+using Xamarin.Forms;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+#if APP
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 1898, "TabbedPage Page not watching icon changes", PlatformAffected.iOS, NavigationBehavior.PushAsync)]
+ public partial class Issue1898 : TabbedPage
+ {
+ public Issue1898()
+ {
+ InitializeComponent();
+ var vm = new Isseu1898Vm {
+ ChangeTitleOneCommand = new Command (() => Issue1898PageOne.Title = "Changed 1"),
+ ChangeIconOneCommand = new Command (() => Issue1898PageOne.Icon = "coffee.png"),
+ ChangeIconOtherPageOneCommand = new Command (() => Issue1898PageTwo.Icon = "coffee.png"),
+ ChangeTitleTwoCommand = new Command (() => Issue1898PageTwo.Title = "Changed 2"),
+ ChangeIconTwoCommand = new Command (() => Issue1898PageTwo.Icon = "bank.png"),
+ ChangeIconOtherPageTwoCommand = new Command (() => Issue1898PageOne.Icon = "calculator.png"),
+ };
+ BindingContext = vm;
+ }
+ }
+
+ public class Isseu1898Vm
+ {
+ public ICommand ChangeTitleOneCommand { get; set; }
+ public ICommand ChangeIconOneCommand { get; set; }
+ public ICommand ChangeIconOtherPageOneCommand { get; set; }
+
+ public ICommand ChangeTitleTwoCommand { get; set; }
+ public ICommand ChangeIconTwoCommand { get; set; }
+ public ICommand ChangeIconOtherPageTwoCommand { get; set; }
+ }
+#endif
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1905.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1905.cs
new file mode 100644
index 00000000..b315cb11
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1905.cs
@@ -0,0 +1,31 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls.TestCasesPages {
+
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 1905, "AlertView doesn't scroll when text is to large", PlatformAffected.iOS | PlatformAffected.Android)]
+ public class Issue1905 : ContentPage {
+
+ public Issue1905 () {
+ var btn = new Button { Text="Show alert" };
+ btn.Clicked += async (object sender, EventArgs e) => {
+ await DisplayAlert ("Long Message", "Start - kajsd;lfkjals;kddfjkl;asdadjsf;lkasjdfl;kasjdf;lkajsd;flkjasd;flkjasd;lkdfjkakls;dfjkl;asdjfkl;asdjfl;kasdjadsfkl;asjdfl;kajadjs;flkjasdl;fklf;jas;dlkjf;alskdjdfakl;sddfjsakls;djfjl;aksdadfjsl;kasdjadsfl;kasdadfjskl;asjdfl;kasdjfl;kasdjfl;kasjdfl;kasjdfkl;asjdfl;kasjdfl;kasjdfl;kasjdfkl;ajsdl;kfkl;jsadkl;fjklasl;dkfjals;kdfjals;kdjfals;kdfalksjdflkajsd;lkfjasl;dkdfjk;alskdjdfjal;skjdfl;askjdfl;aksjdfakl;sdjfkl;asjdfkl;asjdfl;kajsdfl;kajsdfl;kajsdl;ffkl;jasdl;kkl;dfjadls;kdfjkals;kdjkadfsal;ksdjdfal;skddfjal;skdfjal;skdjfal;ksdfjakls;djdfakls;dfjl;askdfjal;skdjfakls;dfjkajsd;lfkjals;kddfjkl;asdadjsf;lkasjdfl;kasjdf;lkajsd;flkjasd;flkjasd;lkdfjkakls;dfjkl;asdjfkl;asdjfl;kasdjadsfkl;asjdfl;kajadjs;flkjasdl;fklf;jas;dlkjf;alskdjdfakl;sddfjsakls;djfjl;aksdadfjsl;kasdjadsfl;kasdadfjskl;asjdfl;kasdjfl;kasdjfl;kasjdfl;kasjdfkl;asjdfl;kasjdfl;kasjdfl;kasjdfkl;ajsdl;kfkl;jsadkl;fjklasl;dkfjals;kdfjals;kdjfals;kdfalksjdflkajsd;lkfjasl;dkdfjk;alskdjdfjal;skjdfl;askjdfl;aksjdfakl;sdjfkl;asjdfkl;asjdfl;kajsdfl;kajsdfl;kajsdl;ffkl;jasdl;kkl;dfjadls;kdfjkals;kdjkadfsal;ksdjdfal;skddfjal;skdfjal;skdjfal;ksdfjakls;djdfakls;dfjl;askdfjal;skdjfakls;dfjkajsd;lfkjals;kddfjkl;asdadjsf;lkasjdfl;kasjdf;lkajsd;flkjasd;flkjasd;lkdfjkakls;dfjkl;asdjfkl;asdjfl;kasdjadsfkl;asjdfl;kajadjs;flkjasdl;fklf;jas;dlkjf;alskdjdfakl;sddfjsakls;djfjl;aksdadfjsl;kasdjadsfl;kasdadfjskl;asjdfl;kasdjfl;kasdjfl;kasjdfl;kasjdfkl;asjdfl;kasjdfl;kasjdfl;kasjdfkl;ajsdl;kfkl;jsadkl;fjklasl;dkfjals;kdfjals;kdjfals;kdfalksjdflkajsd;lkfjasl;dkdfjk;alskdjdfjal;skjdfl;askjdfl;aksjdfakl;sdjfkl;asjdfkl;asjdfl;kajsdfl;kajsdfl;kajsdl;ffkl;jasdl;kkl;dfjadls;kdfjkals;kdjkadfsal;ksdjdfal;skddfjal;skdfjal;skdjfal;ksdfjakls;djdfakls;dfjl;askdfjal;skdjfakls;dfjkajsd;lfkjals;kddfjkl;asdadjsf;lkasjdfl;kasjdf;lkajsd;flkjasd;flkjasd;lkdfjkakls;dfjkl;asdjfkl;asdjfl;kasdjadsfkl;asjdfl;kajadjs;flkjasdl;fklf;jas;dlkjf;alskdjdfakl;sddfjsakls;djfjl;aksdadfjsl;kasdjadsfl;kasdadfjskl;asjdfl;kasdjfl;kasdjfl;kasjdfl;kasjdfkl;asjdfl;kasjdfl;kasjdfl;kasjdfkl;ajsdl;kfkl;jsadkl;fjklasl;dkfjals;kdfjals;kdjfals;kdfalksjdflkajsd;lkfjasl;dkdfjk;alskdjdfjal;skjdfl;askjdfl;aksjdfakl;sdjfkl;asjdfkl;asjdfl;kajsdfl;kajsdfl;kajsdl;ffkl;jasdl;kkl;dfjadls;kdfjkals;kdjkadfsal;ksdjdfal;skddfjal;skdfjal;skdjfal;ksdfjakls;djdfakls;dfjl;askdfjal;skdjfakls;dfjkajsd;lfkjals;kddfjkl;asdadjsf;lkasjdfl;kasjdf;lkajsd;flkjasd;flkjasd;lkdfjkakls;dfjkl;asdjfkl;asdjfl;kasdjadsfkl;asjdfl;kajadjs;flkjasdl;fklf;jas;dlkjf;alskdjdfakl;sddfjsakls;djfjl;aksdadfjsl;kasdjadsfl;kasdadfjskl;asjdfl;kasdjfl;kasdjfl;kasjdfl;kasjdfkl;asjdfl;kasjdfl;kasjdfl;kasjdfkl;ajsdl;kfkl;jsadkl;fjklasl;dkfjals;kdfjals;kdjfals;kdfalksjdflkajsd;lkfjasl;dkdfjk;alskdjdfjal;skjdfl;askjdfl;aksjdfakl;sdjfkl;asjdfkl;asjdfl;kajsdfl;kajsdfl;kajsdl;ffkl;jasdl;kkl;dfjadls;kdfjkals;kdjkadfsal;ksdjdfal;skddfjal;skdfjal;skdjfal;ksdfjakls;djdfakls;dfjl;askdfjal;skdjfakls;dfjkajsd;lfkjals;kddfjkl;asdadjsf;lkasjdfl;kasjdf;lkajsd;flkjasd;flkjasd;lkdfjkakls;dfjkl;asdjfkl;asdjfl;kasdjadsfkl;asjdfl;kajadjs;flkjasdl;fklf;jas;dlkjf;alskdjdfakl;sddfjsakls;djfjl;aksdadfjsl;kasdjadsfl;kasdadfjskl;asjdfl;kasdjfl;kasdjfl;kasjdfl;kasjdfkl;asjdfl;kasjdfl;kasjdfl;kasjdfkl;ajsdl;kfkl;jsadkl;fjklasl;dkfjals;kdfjals;kdjfals;kdfalksjdflkajsd;lkfjasl;dkdfjk;alskdjdfjal;skjdfl;askjdfl;aksjdfakl;sdjfkl;asjdfkl;asjdfl;kajsdfl;kajsdfl;kajsdl;ffkl;jasdl;kkl;dfjadls;kdfjkals;kdjkadfsal;ksdjdfal;skddfjal;skdfjal;skdjfal;ksdfjakls;djdfakls;dfjl;askdfjal;skdjfakls;dfjkajsd;lfkjals;kddfjkl;asdadjsf;lkasjdfl;kasjdf;lkajsd;flkjasd;flkjasd;lkdfjkakls;dfjkl;asdjfkl;asdjfl;kasdjadsfkl;asjdfl;kajadjs;flkjasdl;fklf;jas;dlkjf;alskdjdfakl;sddfjsakls;djfjl;aksdadfjsl;kasdjadsfl;kasdadfjskl;asjdfl;kasdjfl;kasdjfl;kasjdfl;kasjdfkl;asjdfl;kasjdfl;kasjdfl;kasjdfkl;ajsdl;kfkl;jsadkl;fjklasl;dkfjals;kdfjals;kdjfals;kdfalksjdflkajsd;lkfjasl;dkdfjk;alskdjdfjal;skjdfl;askjdfl;aksjdfakl;sdjfkl;asjdfkl;asjdfl;kajsdfl;kajsdfl;kajsdl;ffkl;jasdl;kkl;dfjadls;kdfjkals;kdjkadfsal;ksdjdfal;skddfjal;skdfjal;skdjfal;ksdfjakls;djdfakls;dfjl;askdfjal;skdjfakls;dfjkajsd;lfkjals;kddfjkl;asdadjsf;lkasjdfl;kasjdf;lkajsd;flkjasd;flkjasd;lkdfjkakls;dfjkl;asdjfkl;asdjfl;kasdjadsfkl;asjdfl;kajadjs;flkjasdl;fklf;jas;dlkjf;alskdjdfakl;sddfjsakls;djfjl;aksdadfjsl;kasdjadsfl;kasdadfjskl;asjdfl;kasdjfl;kasdjfl;kasjdfl;kasjdfkl;asjdfl;kasjdfl;kasjdfl;kasjdfkl;ajsdl;kfkl;jsadkl;fjklasl;dkfjals;kdfjals;kdjfals;kdfalksjdflkajsd;lkfjasl;dkdfjk;alskdjdfjal;skjdfl;askjdfl;aksjdfakl;sdjfkl;asjdfkl;asjdfl;kajsdfl;kajsdfl;kajsdl;ffkl;jasdl;kkl;dfjadls;kdfjkals;kdjkadfsal;ksdjdfal;skddfjal;skdfjal;skdjfal;ksdfjakls;djdfakls;dfjl;askdfjal;skdjfakls;dfjkajsd;lfkjals;kddfjkl;asdadjsf;lkasjdfl;kasjdf;lkajsd;flkjasd;flkjasd;lkdfjkakls;dfjkl;asdjfkl;asdjfl;kasdjadsfkl;asjdfl;kajadjs;flkjasdl;fklf;jas;dlkjf;alskdjdfakl;sddfjsakls;djfjl;aksdadfjsl;kasdjadsfl;kasdadfjskl;asjdfl;kasdjfl;kasdjfl;kasjdfl;kasjdfkl;asjdfl;kasjdfl;kasjdfl;kasjdfkl;ajsdl;kfkl;jsadkl;fjklasl;dkfjals;kdfjals;kdjfals;kdfalksjdflkajsd;lkfjasl;dkdfjk;alskdjdfjal;skjdfl;askjdfl;aksjdfakl;sdjfkl;asjdfkl;asjdfl;kajsdfl;kajsdfl;kajsdl;ffkl;jasdl;kkl;dfjadls;kdfjkals;kdjkadfsal;ksdjdfal;skddfjal;skdfjal;skdjfal;ksdfjakls;djdfakls;dfjl;askdfjal;skdjfakls;dfj - End", "Ok", "Cancel");
+ };
+
+ Content = btn;
+ }
+
+
+
+ protected override void OnAppearing () {
+
+ base.OnAppearing ();
+ }
+
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1914.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1914.cs
new file mode 100644
index 00000000..ebdbbd23
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1914.cs
@@ -0,0 +1,27 @@
+using System;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 1914, "Android rotation ignores anchor", PlatformAffected.Android)]
+ public class Issue1914 : ContentPage
+ {
+ public Issue1914 ()
+ {
+ Content = new Rotator ();
+ }
+
+ class Rotator : AbsoluteLayout
+ {
+ public Rotator ()
+ {
+ var image = new Image {Aspect = Aspect.AspectFit, Source = "bank.png"};
+ Children.Add (image, new Rectangle (.5,0,100,100), AbsoluteLayoutFlags.All);
+ VerticalOptions = HorizontalOptions = LayoutOptions.Center;
+ image.RotateTo (3600, 10000);
+ }
+ }
+ }
+}
+
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue194.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue194.cs
new file mode 100644
index 00000000..d53becb7
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue194.cs
@@ -0,0 +1,72 @@
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 194, "iOS tab edit has no done button to return", PlatformAffected.iOS)]
+ public class Issue194 : TabbedPage
+ {
+ public Issue194 ()
+ {
+ Title = "Issue 194";
+
+ var leavePageBtn = new Button {
+ Text = "Leave"
+ };
+
+ // May have unexpected behavior but navigation page is needed to replicate the bug.
+ leavePageBtn.Clicked += (s, e) => Navigation.PopModalAsync ();
+
+ var pageOne = new ContentPage {
+ Title = "Page 1",
+ Content = leavePageBtn
+ };
+ var pageTwo = new ContentPage {
+ Title = "Page 2"
+ };
+ var pageThree = new ContentPage {
+ Title = "Page 3"
+ };
+ var pageFour = new ContentPage {
+ Title = "Page 4"
+ };
+ var pageFive = new ContentPage {
+ Title = "Page 5"
+ };
+ var pageSix = new ContentPage {
+ Title = "Page 6"
+ };
+ var pageSeven = new ContentPage {
+ Title = "Page 7"
+ };
+ var pageEight = new ContentPage {
+ Title = "Page 8"
+ };
+ var pageNine = new ContentPage {
+ Title = "Page 9"
+ };
+
+ Device.OnPlatform (iOS: () => {
+ // Create an overflow amount of tabs depending on device
+ if (Device.Idiom == TargetIdiom.Tablet) {
+ Children.Add (pageOne);
+ Children.Add (pageTwo);
+ Children.Add (pageThree);
+ Children.Add (pageFour);
+ Children.Add (pageFive);
+ Children.Add (pageSix);
+ Children.Add (pageSeven);
+ Children.Add (pageEight);
+ Children.Add (pageNine);
+ } else {
+ Children.Add (pageOne);
+ Children.Add (pageTwo);
+ Children.Add (pageThree);
+ Children.Add (pageFour);
+ Children.Add (pageFive);
+ Children.Add (pageSix);
+ }
+ });
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue198.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue198.cs
new file mode 100644
index 00000000..099ea3f9
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue198.cs
@@ -0,0 +1,78 @@
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using NUnit.Framework;
+using Xamarin.UITest;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 198, "TabbedPage shouldn't proxy content of NavigationPage", PlatformAffected.iOS)]
+ public class Issue198 : TestTabbedPage
+ {
+ protected override void Init ()
+ {
+ Title = "Tabbed Navigation Page";
+
+ var leavePageBtn = new Button {
+ Text = "Leave"
+ };
+
+ // Should work as expected, however, causes NRE
+ leavePageBtn.Clicked += (s, e) => Navigation.PopModalAsync ();
+
+ var navigationPageOne = new NavigationPage (new ContentPage {
+ Icon = "calculator.png",
+ Content = leavePageBtn
+ }) {
+ Title = "Page One",
+ };
+ var navigationPageTwo = new NavigationPage (new ContentPage {
+ Icon = "calculator.png",
+ }) {
+ Title = "Page Two",
+ };
+ var navigationPageThree = new NavigationPage (new ContentPage {
+ Title = "No Crash",
+ }) {
+ Title = "Page Three",
+ Icon = "calculator.png"
+ };
+ var navigationPageFour = new NavigationPage (new ContentPage ()) {
+ Title = "Page Four",
+ Icon = "calculator.png"
+ };
+
+ Children.Add (navigationPageOne);
+ Children.Add (navigationPageTwo);
+ Children.Add (navigationPageThree);
+ Children.Add (navigationPageFour);
+ }
+
+#if UITEST
+ [Test]
+ [UiTest (typeof(TabbedPage))]
+ public void Issue198TestsNREWithPopModal ()
+ {
+ RunningApp.WaitForElement (q => q.Marked ("Page One"));
+ RunningApp.WaitForElement (q => q.Button ("Leave"));
+ RunningApp.Screenshot ("All Elements Present");
+
+ RunningApp.Tap (q => q.Marked ("Leave"));
+ RunningApp.Screenshot ("Clicked Leave");
+
+ RunningApp.WaitForElement (q => q.Marked ("Bug Repro's"));
+ RunningApp.Tap (q => q.Marked ("SearchButton"));
+ RunningApp.Screenshot ("Navigate into gallery again");
+
+ RunningApp.WaitForElement (q => q.Marked ("Page Three"));
+ RunningApp.Tap (q => q.Marked ("Page Three"));
+
+ RunningApp.WaitForElement (q => q.Marked ("No Crash"));
+ RunningApp.Screenshot ("App did not crash");
+ }
+#endif
+
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue206.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue206.cs
new file mode 100644
index 00000000..96ab9095
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue206.cs
@@ -0,0 +1,143 @@
+using System.ComponentModel;
+using System.Diagnostics;
+using System.Linq;
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using NUnit.Framework;
+using Xamarin.UITest;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 206, "ViewCell with Label's text does not resize when value is changed", PlatformAffected.iOS)]
+ public class Issue206 : TestContentPage
+ {
+ protected override void Init ()
+ {
+ _listScreen = new Issue206ListScreen ();
+ Title = "Click 9";
+ Content = _listScreen.View;
+ }
+
+ Issue206ListScreen _listScreen;
+
+#if UITEST
+ [Test]
+ [NUnit.Framework.Category ("ManualReview")]
+ [UiTest (typeof(ViewCell))]
+ public void Issue206TestsTextInTextCellResizes ()
+ {
+ RunningApp.WaitForElement (q => q.Marked ("Click 9"));
+ RunningApp.WaitForElement (q => q.Marked ("0"));
+ RunningApp.WaitForElement (q => q.Marked ("1"));
+ RunningApp.WaitForElement (q => q.Marked ("2"));
+
+ RunningApp.Screenshot ("All elements exist");
+
+ var scrollRect = RunningApp.Query (q => q.Raw ("* index:0"))[0].Rect;
+ Xamarin.Forms.Core.UITests.Gestures.ScrollForElement (RunningApp, "* marked:'9'", new Xamarin.Forms.Core.UITests.Drag (scrollRect, Xamarin.Forms.Core.UITests.Drag.Direction.BottomToTop, Xamarin.Forms.Core.UITests.Drag.DragLength.Long));
+ RunningApp.Screenshot ("I see 9");
+
+ RunningApp.Tap (q => q.Marked ("9"));
+ RunningApp.WaitForNoElement (q => q.Marked ("9"));
+
+ RunningApp.Screenshot ("The text should not be cropped");
+ }
+#endif
+
+ }
+
+ [Preserve (AllMembers = true)]
+ public class Issue206ListScreen
+ {
+ public ListView View { get; private set; }
+
+ internal class A : INotifyPropertyChanged
+ {
+ string _text;
+ public string Text {
+ get {
+ return _text;
+ }
+ set {
+ _text = value;
+ if(PropertyChanged != null)
+ PropertyChanged(this, new PropertyChangedEventArgs("Text"));
+ }
+ }
+
+ #region INotifyPropertyChanged implementation
+
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ #endregion
+ }
+
+ [Preserve (AllMembers = true)]
+ internal class ViewCellTest : ViewCell
+ {
+ static int s_inc = 0;
+
+ public ViewCellTest ()
+ {
+ var stackLayout = new StackLayout {
+ Orientation = StackOrientation.Horizontal
+ };
+
+ var label = new Label ();
+ label.SetBinding (Label.TextProperty, "Text");
+
+ var box = new BoxView {WidthRequest = 100, HeightRequest = 10, Color = Color.Red};
+
+ stackLayout.Children.Add (label);
+ stackLayout.Children.Add (box);
+
+ View = stackLayout;
+ }
+
+ protected override void OnAppearing ()
+ {
+ base.OnAppearing ();
+ Debug.WriteLine ("Appearing: " + ((A)BindingContext).Text + " : " + s_inc);
+ s_inc++;
+ }
+
+ protected override void OnDisappearing ()
+ {
+ base.OnDisappearing ();
+ Debug.WriteLine ("Disappearing: " + ((A)BindingContext).Text + " : " + s_inc);
+ s_inc++;
+ }
+ }
+
+ public Issue206ListScreen ()
+ {
+
+ View = new ListView ();
+
+ View.RowHeight = 30;
+
+ var n = 50;
+ var items = Enumerable.Range (0, n).Select (i => new A {Text = i.ToString ()}).ToList ();
+ View.ItemsSource = items;
+
+ View.ItemTemplate = new DataTemplate (typeof (ViewCellTest));
+
+ View.ItemSelected += (sender, e) => {
+ var cell = (e.SelectedItem as A);
+ if (cell == null)
+ return;
+ var x = int.Parse (cell.Text);
+ if (x == 5) {
+ n += 10;
+ View.ItemsSource = Enumerable.Range (0, n).Select (i => new A { Text = i.ToString () }).ToList ();
+ } else {
+ cell.Text = (x + 1).ToString ();
+ }
+ };
+
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue214.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue214.cs
new file mode 100644
index 00000000..bb18f5f2
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue214.cs
@@ -0,0 +1,36 @@
+using System;
+using System.Linq;
+
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 214, "TextCell DetailColor change not immediate", PlatformAffected.iOS)]
+ public class Issue214 : ContentPage
+ {
+ public Issue214 ()
+ {
+ var items = Enumerable.Range (0, 50).Select (i => new TextCell {
+ Text = i.ToString (),
+ Detail = i.ToString ()
+ }).ToList ();
+
+ var tableSection = new TableSection("First Section");
+ foreach (TextCell cell in items) {
+ tableSection.Add (cell);
+ }
+
+ var tableRoot = new TableRoot () {
+ tableSection
+ };
+
+ var tableLayout = new TableView {
+ Root = tableRoot
+ };
+
+ tableLayout.Intent = TableIntent.Data;
+ Content = tableLayout;
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2143.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2143.cs
new file mode 100644
index 00000000..8bad724e
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2143.cs
@@ -0,0 +1,55 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls.TestCasesPages
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 2143, "Picker on windows phone",PlatformAffected.WinPhone)]
+ public class Issue2143 : ContentPage
+ {
+ public Issue2143 ()
+ {
+ var table = GetTableView ();
+ var list = GetListView ();
+ Content = list;
+ }
+
+ static ListView GetListView ()
+ {
+ var listView = new ListView ();
+ listView.ItemTemplate = new DataTemplate (typeof (PickerCell));
+ listView.ItemsSource = new[] { "one", "two", "three" }; ;
+ return listView;
+ }
+
+ static TableView GetTableView ()
+ {
+ var tableSection = new TableSection ("Picker");
+ tableSection.Add (new PickerCell ());
+ var root = new TableRoot ("Root");
+ root.Add (tableSection);
+ var table = new TableView (root);
+ return table;
+ }
+ }
+
+ internal class PickerCell : ViewCell
+ {
+ public PickerCell ()
+ {
+ var picker = new Picker { Title ="Select Level of Activity." };
+ picker.Items.Add ("Sedentary");
+ picker.Items.Add ("Moderate");
+ picker.Items.Add ("Active");
+ picker.Items.Add ("None");
+ picker.SelectedIndex = 0;
+ View = picker;
+ }
+ }
+
+
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2191.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2191.cs
new file mode 100644
index 00000000..b334030f
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2191.cs
@@ -0,0 +1,51 @@
+using System;
+
+using Xamarin.Forms;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 2191, "ToolBarItem not showing as disabled when CanExecute is set to false", PlatformAffected.Android)]
+ public class Issue2191 : ContentPage
+ {
+ public Issue2191 ()
+ {
+ var stackPanel = new StackLayout { VerticalOptions = LayoutOptions.End };
+ var button = new Button { Text = "Disable" };
+ var button1 = new Button { Text = "Enable" };
+ button1.Clicked+= (sender, e) => {
+ _dummyResult = true;
+ PunchSubmitCommand.ChangeCanExecute();
+ };
+ var tbItem = new ToolbarItem { Icon = "menuIcon.png" };
+ var tbItem2 = new ToolbarItem { Icon = "menuIcon.png", Text="submit" };
+ button.SetBinding (Button.CommandProperty, new Binding ("PunchSubmitCommand"));
+ tbItem.SetBinding (MenuItem.CommandProperty, new Binding ("PunchSubmitCommand"));
+ tbItem2.SetBinding (MenuItem.CommandProperty, new Binding ("PunchSubmitCommand"));
+ button.BindingContext = tbItem.BindingContext = tbItem2.BindingContext = this;
+ ToolbarItems.Add(tbItem);
+ var toolbar = new Toolbar { BackgroundColor = Color.Red };
+ toolbar.Add (tbItem2);
+ stackPanel.Children.Add (toolbar);
+ stackPanel.Children.Add (button);
+ stackPanel.Children.Add (button1);
+ Content = stackPanel;
+ }
+
+ bool _dummyResult = true;
+
+ Command _punchSubmitCommand;
+ public Command PunchSubmitCommand
+ {
+ get
+ {
+ return _punchSubmitCommand ?? (_punchSubmitCommand = new Command(() => {
+ _dummyResult = !_dummyResult;
+ PunchSubmitCommand.ChangeCanExecute();
+ },
+ () => _dummyResult));
+ }
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2222.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2222.cs
new file mode 100644
index 00000000..aa4e19e8
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2222.cs
@@ -0,0 +1,49 @@
+using System;
+using Xamarin.Forms;
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using NUnit.Framework;
+using Xamarin.UITest;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 2222, "NavigationBar.ToolbarItems.Add() crashes / breaks app in iOS7. works fine in iOS8", PlatformAffected.iOS)]
+ public class Issue2222 : TestNavigationPage
+ {
+ protected override void Init ()
+ {
+ var tbItem = new ToolbarItem { Text = "hello", Icon="wrongName" };
+ ToolbarItems.Add(tbItem);
+
+ PushAsync (new Issue22221 ());
+ }
+
+ [Preserve (AllMembers = true)]
+ public class Issue22221 : ContentPage
+ {
+ public Issue22221 ()
+ {
+ Content = new StackLayout {
+ Children = {
+ new Label { Text = "Hello Toolbaritem" }
+ }
+ };
+ }
+ }
+
+#if UITEST
+ [Test]
+ public void TestItDoesntCrashWithWrongIconName ()
+ {
+ RunningApp.WaitForElement(c=>c.Marked("Hello Toolbaritem"));
+ RunningApp.Screenshot ("Was label on page shown");
+ }
+#endif
+
+ }
+}
+
+
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue22246_BZ.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue22246_BZ.cs
new file mode 100644
index 00000000..30985085
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue22246_BZ.cs
@@ -0,0 +1,49 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls.TestCasesPages
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Bugzilla, 22246, "Entry in Grid nested in ViewCell isn't expanding", PlatformAffected.WinPhone, NavigationBehavior.PushModalAsync)]
+ public class Issue22246Bz : ContentPage
+ {
+ public Issue22246Bz()
+ {
+ var table = new TableView {
+ Root = new TableRoot {
+ new TableSection("Testing Section") {
+ new ViewCell {
+ View = CreateBugView()
+ }
+ }
+ }
+ };
+
+ var layout = new StackLayout {
+ Children = {
+ CreateBugView(),
+ table
+ }
+ };
+
+ Content = layout;
+ }
+
+ View CreateBugView()
+ {
+ return new StackLayout {
+ Orientation = StackOrientation.Horizontal,
+ Spacing = 10,
+ Children = {
+ new Entry {Placeholder = "Entry", HorizontalOptions = LayoutOptions.FillAndExpand},
+ new Button {Text = "Button"}
+ }
+ };
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2241.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2241.cs
new file mode 100644
index 00000000..5bd750b3
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2241.cs
@@ -0,0 +1,58 @@
+using System;
+
+using Xamarin.Forms;
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using NUnit.Framework;
+using Xamarin.UITest;
+using Xamarin.UITest.Android;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 2241, "ScrollView content can become stuck on orientation change (iOS)", PlatformAffected.iOS)]
+ public class Issue2241 : TestContentPage
+ {
+ protected override void Init ()
+ {
+ ScrollView scrollView = new ScrollView () {
+ HorizontalOptions = LayoutOptions.FillAndExpand,
+ VerticalOptions = LayoutOptions.FillAndExpand,
+ Padding = new Thickness (20),
+ Content = new BoxView () {
+ Color = Color.Red,
+ HeightRequest = 400,
+ HorizontalOptions = LayoutOptions.FillAndExpand
+ }
+ };
+
+ Content = scrollView;
+ }
+
+#if UITEST
+ [Test]
+ [Ignore("Fails intermittently on TestCloud")]
+ public void ChangeOrientationCheckScroll ()
+ {
+ var isAndroid = RunningApp is AndroidApp;
+ var className = "Xamarin_Forms_Platform_iOS_BoxRenderer";
+ if (isAndroid) {
+ className = "BoxRenderer";
+ }
+ var box1 = RunningApp.Query (c => c.Class (className)) [0];
+ RunningApp.SetOrientationLandscape ();
+ RunningApp.ScrollDown ();
+ RunningApp.SetOrientationPortrait ();
+ var box2 = RunningApp.Query (c => c.Class (className)) [0];
+ RunningApp.Screenshot ("Did it resize ok? Do you see some white on the bottom?");
+ if (!isAndroid) {
+ Assert.AreEqual (box1.Rect.CenterY, box2.Rect.CenterY);
+ }
+ }
+#endif
+ }
+}
+
+
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2248.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2248.cs
new file mode 100644
index 00000000..3d224f65
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2248.cs
@@ -0,0 +1,74 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls.TestCasesPages
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 2248, "ListView.ScrollTo crashes app", PlatformAffected.WinPhone)]
+ public class Issue2248 : ContentPage
+ {
+ ObservableCollection<Item> _items;
+
+ public Issue2248()
+ {
+ _items = new ObservableCollection<Item>()
+ {
+ new Item() {Id = 1, Name = "First"},
+ new Item() {Id = 2, Name = "Second"},
+ new Item() {Id = 3, Name = "Third"},
+ new Item() {Id = 4, Name = "Fourth"},
+ new Item() {Id = 5, Name = "Fifth"}
+ };
+
+
+ var listView = new ListView()
+ {
+ ItemsSource = _items,
+ ItemTemplate = new DataTemplate(typeof (ItemCell))
+ };
+
+ Content = listView;
+ }
+
+ public void RemoveItemFromCollection(Item item)
+ {
+ _items.Remove(item);
+ }
+ public class Item
+ {
+ public int Id { get; set; }
+ public string Name { get; set; }
+ }
+
+ public class ItemCell : ViewCell
+ {
+ public ItemCell()
+ {
+ var nameLabel = new Label();
+ nameLabel.SetBinding(Label.TextProperty, "Name");
+ nameLabel.GestureRecognizers.Add(new TapGestureRecognizer()
+ {
+ Command = new Command(DeleteItem),
+ NumberOfTapsRequired = 1
+ });
+
+ View = nameLabel;
+ }
+
+ void DeleteItem()
+ {
+ var parent = Parent.Parent as Issue2248;
+
+ if (parent != null)
+ {
+ parent.RemoveItemFromCollection((Item) BindingContext);
+ }
+ }
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2259.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2259.cs
new file mode 100644
index 00000000..125f1a60
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2259.cs
@@ -0,0 +1,156 @@
+using System;
+using System.Collections.ObjectModel;
+
+using Xamarin.Forms;
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using NUnit.Framework;
+using Xamarin.UITest;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 2259, "ListView.ScrollTo crashes app", PlatformAffected.iOS)]
+ public class Issue2259 : TestContentPage
+ {
+ [Preserve (AllMembers = true)]
+ public class Person
+ {
+ public string Name { private set; get; }
+
+ public DateTime Birthday { private set; get; }
+
+ public Color FavoriteColor { private set; get; }
+
+ public Person (string name, DateTime birthday, Color favoriteColor)
+ {
+ Name = name;
+ Birthday = birthday;
+ FavoriteColor = favoriteColor;
+ }
+ };
+
+ int _count = 1;
+
+ protected override void Init ()
+ {
+ var people = new ObservableCollection<Person> {
+ new Person ("Abigail", new DateTime (1975, 1, 15), Color.Aqua),
+ new Person ("Bob", new DateTime (1976, 2, 20), Color.Black),
+ new Person ("Cathy", new DateTime (1977, 3, 10), Color.Blue),
+ new Person ("David", new DateTime (1978, 4, 25), Color.Fuschia),
+ };
+
+ var buttonAdd = new Button {
+ Text = "Add",
+ HorizontalOptions = LayoutOptions.Start,
+ VerticalOptions = LayoutOptions.Center,
+ };
+
+ var buttonRemove = new Button {
+ Text = "Remove",
+ HorizontalOptions = LayoutOptions.Center,
+ VerticalOptions = LayoutOptions.Center,
+ };
+
+ var buttonScrollToBottom = new Button {
+ Text = "Bottom",
+ HorizontalOptions = LayoutOptions.Start,
+ VerticalOptions = LayoutOptions.Center,
+ };
+
+ var buttonStack = new StackLayout {
+ Orientation = StackOrientation.Horizontal,
+ Children = {
+ buttonAdd,
+ buttonRemove,
+ buttonScrollToBottom,
+ }
+ };
+
+ var listView = new ListView {
+ HorizontalOptions = LayoutOptions.FillAndExpand,
+ VerticalOptions = LayoutOptions.FillAndExpand,
+ ItemsSource = people,
+ ItemTemplate = new DataTemplate (() =>
+ {
+ var nameLabel = new Label ();
+ var birthdayLabel = new Label ();
+ var boxView = new BoxView ();
+
+ var stack = new StackLayout {
+ Padding = new Thickness (0, 5),
+ Orientation = StackOrientation.Horizontal,
+ BackgroundColor = Color.Black,
+ Children = {
+ boxView,
+ new StackLayout {
+ VerticalOptions = LayoutOptions.Center,
+ Spacing = 0,
+ Children = {
+ nameLabel,
+ birthdayLabel
+ }
+ }
+ }
+ };
+
+ nameLabel.SetBinding (Label.TextProperty, "Name");
+ birthdayLabel.SetBinding (Label.TextProperty, new Binding ("Birthday", BindingMode.OneWay, null, null, "Born {0:d}"));
+ boxView.SetBinding (BoxView.ColorProperty, "FavoriteColor");
+ stack.SetBinding (BackgroundColorProperty, "BackgroundColor");
+
+ return new ViewCell {
+ View = stack
+ };
+ })
+ };
+
+ buttonAdd.Clicked += (sender, e) =>
+ {
+ var person = new Person (string.Format ("Name {0}", _count++), DateTime.Today, Color.Blue);
+
+ people.Add (person);
+
+ listView.ScrollTo (person, ScrollToPosition.End, true);
+
+ };
+
+ buttonRemove.Clicked += (sender, e) => people.RemoveAt (people.Count - 1);
+
+ buttonScrollToBottom.Clicked += (sender, e) =>
+ {
+ var person = people[people.Count - 1];
+
+ listView.ScrollTo (person, ScrollToPosition.End, true);
+ };
+
+ Padding = new Thickness (10, Device.OnPlatform (20, 0, 0), 10, 5);
+
+ Content = new StackLayout {
+ Orientation = StackOrientation.Vertical,
+ Children = {
+ buttonStack,
+ listView,
+ }
+ };
+ }
+
+#if UITEST
+ [Test]
+ [UiTest (typeof(ListView), "ScrollTo")]
+ public void Issue2259Tests ()
+ {
+ for (int i = 0; i < 20; i++) {
+ RunningApp.Tap (q => q.Button ("Add"));
+ RunningApp.WaitForElement (q => q.Marked ("Name " + (i + 1).ToString ()));
+ RunningApp.Screenshot ("Added Cell");
+ }
+ }
+#endif
+ }
+}
+
+
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2266.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2266.cs
new file mode 100644
index 00000000..06330460
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2266.cs
@@ -0,0 +1,162 @@
+using System;
+using Xamarin.Forms;
+using Xamarin.Forms.CustomAttributes;
+using System.Collections.Generic;
+
+namespace Xamarin.Forms.Controls
+{
+#if APP
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 2266, "Setting a different Detail page from a MasterDetailPage after 2nd time on MainPage", PlatformAffected.iOS, NavigationBehavior.SetApplicationRoot)]
+ public class Issue2266 : ContentPage
+ {
+ public Issue2266 ()
+ {
+ InitPageContent ();
+ }
+
+ void InitPageContent ()
+ {
+ var labelHeader = new Label {
+ Text = "Select a test",
+ FontSize = 30,
+ FontAttributes = FontAttributes.Bold,
+ VerticalOptions = LayoutOptions.Center,
+ HorizontalOptions = LayoutOptions.CenterAndExpand
+ };
+
+ string[] listItems = {
+ "MasterDetail Navigation",
+ "MasterDetail Navigation ->> Page 1",
+ "MasterDetail Navigation ->> Page 2",
+ "MasterDetail Navigation ->> Page 3"
+ };
+
+ var listView = new ListView {
+ ItemsSource = listItems
+ };
+
+ Content = new StackLayout {
+ Padding = new Thickness (0, 20, 0, 0),
+ Children = {
+ labelHeader,
+ listView
+ }
+ };
+
+ listView.ItemSelected += delegate(object sender, SelectedItemChangedEventArgs e) {
+ if (e.SelectedItem == null)
+ return;
+ if (e.SelectedItem.Equals (listItems [0])) {
+ Application.Current.MainPage = MasterDetailHost;
+ } else if (e.SelectedItem.Equals (listItems [1]) || e.SelectedItem.Equals (listItems [2]) || e.SelectedItem.Equals (listItems [3])) {
+ // MasterDetail Navigation - direct page open
+ var item = e.SelectedItem.ToString ();
+ var index = int.Parse (item.Substring (item.Length - 1)) - 1;
+ Application.Current.MainPage = MasterDetailHost;
+ MasterDetailHost.OpenPage (index);
+ }
+
+ listView.SelectedItem = null;
+ };
+ }
+
+ static MasterDetailNavigation s_masterDetailHost;
+
+ public static MasterDetailNavigation MasterDetailHost {
+ get {
+ if (s_masterDetailHost == null)
+ s_masterDetailHost = new MasterDetailNavigation ();
+ return s_masterDetailHost;
+ }
+ }
+
+ }
+
+ public class MasterDetailNavigation : MasterDetailPage
+ {
+ List<NavigationPage> _pages;
+
+ public MasterDetailNavigation ()
+ {
+ InitPages ();
+
+ var menuList = new ListView {
+ BackgroundColor = Color.Transparent,
+ ItemsSource = _pages,
+ ItemTemplate = new DataTemplate (typeof(TextCell))
+ };
+ menuList.ItemTemplate.SetBinding (TextCell.TextProperty, "Title");
+
+ Master = new ContentPage {
+ BackgroundColor = Color.FromHex ("363636"),
+ Title = "Menu",
+ Content = menuList
+ };
+
+ Detail = new NavigationPage (new ContentPage {
+ Padding = new Thickness (20, 20),
+ Content = new StackLayout {
+ Children = {
+ new Label { Text = "Select a menu item" }
+ }
+ }
+ });
+
+ menuList.ItemSelected += (sender, e) => {
+ var page = e.SelectedItem as NavigationPage;
+ if (page != null) {
+ Detail = page;
+ IsPresented = false;
+ }
+ };
+ }
+
+ void InitPages ()
+ {
+ _pages = new List<NavigationPage> ();
+
+ for (int i = 1; i <= 10; i++) {
+ var btnSubPage = new Button {
+ Text = string.Format ("Open sub-page"),
+ };
+ btnSubPage.Clicked += delegate {
+ OpenSubPage (string.Format ("Sub for page: {0}", i));
+ };
+ var page = new ContentPage {
+ Padding = new Thickness (20, 20),
+ Title = string.Format ("Page {0}", i),
+ Content = new StackLayout {
+ Children = {
+ new Label { Text = string.Format ("Page {0}", i) },
+ btnSubPage
+ }
+ }
+ };
+ page.ToolbarItems.Add (new ToolbarItem ("START", null, delegate {
+ Application.Current.MainPage = App.MenuPage;
+ }));
+ _pages.Add (new NavigationPage (page) { Title = page.Title });
+ }
+ }
+
+ public void OpenPage (int index)
+ {
+ if (index >= _pages.Count) {
+ // Index out of range
+ return;
+ }
+ Detail = _pages [index];
+ }
+
+ async void OpenSubPage (string text)
+ {
+ await Detail.Navigation.PushAsync (new ContentPage {
+ Content = new Label { Text = text }
+ });
+ }
+ }
+#endif
+}
+
+
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2270.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2270.cs
new file mode 100644
index 00000000..1c2a3a33
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2270.cs
@@ -0,0 +1,77 @@
+using System.Collections.ObjectModel;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls.TestCasesPages
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 2270, "NSInternalCOnsistencyException when bound to ObservableCollection", PlatformAffected.iOS)]
+ public class Issue2270 : ContentPage
+ {
+ public Issue2270()
+ {
+ BindingContext = new TestListViewModel();
+
+ Padding = new Thickness(0, 40, 0, 0);
+
+ var btn = new Button {
+ Text = "Load Data",
+ BorderWidth = 1,
+ BorderColor = Color.Gray,
+ };
+ btn.SetBinding (Button.CommandProperty, "LoadDataCommand");
+
+ var lv = new ListView();// { IsGroupingEnabled = true };
+
+ var dt = new DataTemplate (typeof(TextCell));
+ dt.SetBinding (TextCell.TextProperty, "Name");
+
+ lv.ItemTemplate = dt;
+ lv.SetBinding (ListView.ItemsSourceProperty, "Rows");
+
+ Content = new StackLayout {
+ Children = {
+ btn,
+ lv
+ }
+ };
+
+ }
+
+ public class TestListViewModel
+ {
+ //public ObservableCollection<ObservableCollection<Row>> Rows {
+ public ObservableCollection<Row> Rows {
+ get;
+ set;
+ }
+
+ public TestListViewModel ()
+ {
+ //Rows = new ObservableCollection<ObservableCollection<Row>>();
+ Rows = new ObservableCollection<Row>();
+ }
+
+ Command _command;
+
+ public Command LoadDataCommand {
+ get {
+ return _command ?? (_command = new Command (LoadData));
+ }
+ }
+
+ void LoadData() {
+ Rows.Clear ();
+
+ foreach (var row in new[] { new Row { Name = "one" }, new Row { Name = "Two" } }) {
+ Rows.Add (row);
+ }
+ }
+
+ }
+
+ public class Row
+ {
+ public string Name { get; set; }
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2272.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2272.cs
new file mode 100644
index 00000000..7f6c50ad
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2272.cs
@@ -0,0 +1,54 @@
+using System;
+
+using Xamarin.Forms;
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using NUnit.Framework;
+using Xamarin.UITest.Android;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 2272, "Entry text updating set focus on the beginning of text not the end of it", PlatformAffected.Android)]
+ public class Issue2272 : TestContentPage
+ {
+ protected override void Init ()
+ {
+ var userNameEditor = new Entry () { Text = "userNameEditorEmptyString" };
+ userNameEditor.Focused += (sender, args) => {
+ userNameEditor.Text = "focused";
+ };
+
+ Content = new StackLayout {
+ Spacing = 10,
+ VerticalOptions = LayoutOptions.Start,
+ Children = { userNameEditor }
+ };
+ }
+
+#if UITEST
+ [Test]
+ public void TestFocusIsOnTheEndAfterSettingText ()
+ {
+ RunningApp.Tap (c => c.Marked ("userNameEditorEmptyString"));
+ RunningApp.EnterText ("1");
+ PressEnter ();
+ Assert.Greater (RunningApp.Query (c => c.Marked ("focused1")).Length, 0);
+ }
+
+ void PressEnter ()
+ {
+ var androidApp = RunningApp as AndroidApp;
+ if (androidApp != null) {
+ androidApp.PressUserAction (UserAction.Done);
+ }
+ else {
+ RunningApp.PressEnter ();
+ }
+ }
+#endif
+ }
+}
+
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2282.xaml b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2282.xaml
new file mode 100644
index 00000000..32850bed
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2282.xaml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+ x:Class="Xamarin.Forms.Controls.TestCasesPages.Issue2282">
+ <Grid>
+
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="*" />
+ </Grid.ColumnDefinitions>
+
+ <Grid.RowDefinitions>
+ <RowDefinition Height="*" />
+ <RowDefinition Height="100" />
+ </Grid.RowDefinitions>
+ <ListView x:Name="MyListView"
+ RowHeight="80"
+ ItemsSource="{Binding }">
+ <ListView.ItemTemplate>
+ <DataTemplate>
+ <ViewCell>
+ <ViewCell.View>
+ <Label Text="{Binding }"
+ TextColor="Green"
+ Font="28" />
+ </ViewCell.View>
+ </ViewCell>
+ </DataTemplate>
+ </ListView.ItemTemplate>
+ </ListView>
+ <Label Grid.Row="1" x:Name="LogLabel" Font="28" Text="XXX" TextColor="Red" />
+ </Grid>
+</ContentPage> \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2282.xaml.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2282.xaml.cs
new file mode 100644
index 00000000..63b134ff
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2282.xaml.cs
@@ -0,0 +1,42 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+using Xamarin.Forms;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls.TestCasesPages
+{
+#if APP
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 2282, "ListView ItemTapped issue on Windows phone", PlatformAffected.WinPhone)]
+ public partial class Issue2282 : ContentPage
+ {
+ public Issue2282 ()
+ {
+ Items = new ObservableCollection<string>();
+ InitializeComponent();
+
+ BindingContext = Items;
+ MyListView.ItemTapped += (sender, e) => {
+ LogLabel.Text = string.Format("{0} - Item {1} Tapped!", _counter++, (string)e.Item);
+ };
+ }
+
+ public ObservableCollection<string> Items { get; set; }
+
+ int _counter = 0;
+
+ protected override void OnAppearing()
+ {
+ Items.Add("First");
+ Items.Add("Second");
+ Items.Add("Third");
+ base.OnAppearing();
+ }
+ }
+#endif
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2288.xaml b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2288.xaml
new file mode 100644
index 00000000..40f4b833
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2288.xaml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="Xamarin.Forms.Controls.Issue2288">
+ <ContentPage.ToolbarItems>
+ <ToolbarItem Text="{Binding MainText}" Command="{Binding MainTextCommand}" />
+ <ToolbarItem Text="{Binding MainText}" Command="{Binding MainTextCommand}" Order="Secondary"/>
+ </ContentPage.ToolbarItems>
+ <StackLayout>
+ <Label Text="{Binding MainText}" VerticalOptions="Center" HorizontalOptions="Center" />
+ </StackLayout>
+</ContentPage> \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2288.xaml.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2288.xaml.cs
new file mode 100644
index 00000000..fa9d45c9
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2288.xaml.cs
@@ -0,0 +1,40 @@
+using System;
+using System.Collections.Generic;
+
+using Xamarin.Forms;
+using System.ComponentModel;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+#if APP
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 2288, "ToolbarItem.Text change", PlatformAffected.iOS | PlatformAffected.Android)]
+ public partial class Issue2288 : ContentPage
+ {
+ int _count = 0;
+ public Issue2288 ()
+ {
+ InitializeComponent ();
+ MainText = "initial";
+ MainTextCommand = new Command(o =>
+ {
+ MainText = "changed " + _count++;
+ });
+
+ BindingContext = this;
+ }
+
+ string _mainText;
+ public string MainText {
+ get { return _mainText; }
+ set {
+ _mainText = value;
+ OnPropertyChanged ();
+ }
+ }
+
+ public Command MainTextCommand { get; set; }
+ }
+#endif
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2289.xaml b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2289.xaml
new file mode 100644
index 00000000..c4d45742
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2289.xaml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<local:TestContentPage xmlns="http://xamarin.com/schemas/2014/forms"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+ xmlns:local="clr-namespace:Xamarin.Forms.Controls"
+ x:Class="Xamarin.Forms.Controls.Issue2289">
+ <local:TestContentPage.Content>
+ <TableView HasUnevenRows="true">
+ <TableView.Root>
+ <TableSection Title="TextCell Disable">
+ <TextCell Text="txtCellDisable1" Detail="test" IsEnabled="false" />
+ <TextCell Text="txtCellDisable2" Height="25" IsEnabled="false" />
+ </TableSection>
+ <TableSection Title="TextCell Enable">
+ <TextCell Text="txtCellEnable1" Detail="test" IsEnabled="true" />
+ <TextCell Text="txtCellEnable2" Height="25" IsEnabled="true" />
+ </TableSection>
+ <TableSection Title="TextCell ContextActions Disable">
+ <TextCell Text="txtCellDisableContextActions1" Detail="test" IsEnabled="false">
+ <TextCell.ContextActions>
+ <MenuItem Command="{Binding MoreCommand}" Text="More" />
+ <MenuItem Command="{Binding DeleteCommand}" Text="Delete" />
+ </TextCell.ContextActions>
+ </TextCell>
+ </TableSection>
+ <TableSection Title="TextCell ContextActions Enable">
+ <TextCell Text="txtCellEnabledContextActions1" Detail="test" IsEnabled="true">
+ <TextCell.ContextActions>
+ <MenuItem Command="{Binding MoreCommand}" Text="More" />
+ <MenuItem Command="{Binding DeleteCommand}" Text="Delete" IsDestructive="true" />
+ </TextCell.ContextActions>
+ </TextCell>
+ </TableSection>
+ </TableView.Root>
+ </TableView>
+ </local:TestContentPage.Content>
+</local:TestContentPage> \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2289.xaml.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2289.xaml.cs
new file mode 100644
index 00000000..7a1cb70d
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2289.xaml.cs
@@ -0,0 +1,119 @@
+using System;
+using System.Collections.Generic;
+
+using Xamarin.Forms;
+using Xamarin.Forms.CustomAttributes;
+using System.Windows.Input;
+using System.Diagnostics;
+
+#if UITEST
+using NUnit.Framework;
+using Xamarin.UITest;
+using Xamarin.UITest.iOS;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 2289, "TextCell IsEnabled property not disabling element in TableView", PlatformAffected.iOS)]
+ public partial class Issue2289 : TestContentPage
+ {
+
+#if APP
+ public Issue2289 ()
+ {
+ InitializeComponent ();
+ }
+#endif
+
+ protected override void Init ()
+ {
+ MoreCommand = new Command<MenuItem> ((menuItem) => {
+ Debug.WriteLine ("More! Command Called!");
+ });
+
+ DeleteCommand = new Command<MenuItem> ((menuItem) => {
+ Debug.WriteLine ("Delete Command Called!");
+ });
+ BindingContext = this;
+ }
+
+ public ICommand MoreCommand { get; protected set; }
+
+ public ICommand DeleteCommand { get; protected set; }
+
+#if UITEST
+ [Test]
+ [Ignore("Fails sometimes on XTC")]
+ public void TestIsEnabledFalse ()
+ {
+ if (RunningApp is iOSApp) {
+ var disable1 = RunningApp.Query (c => c.Marked ("txtCellDisable1")) [0];
+ Assert.IsFalse (disable1.Enabled);
+ var disable2 = RunningApp.Query (c => c.Marked ("txtCellDisable2")) [0];
+ Assert.IsFalse (disable2.Enabled);
+ }
+ }
+
+ [Test]
+ [Ignore("Fails sometimes on XTC")]
+ public void TestIsEnabledFalseContextActions ()
+ {
+ if (RunningApp is iOSApp) {
+ var disable1 = RunningApp.Query (c => c.Marked ("txtCellDisableContextActions1")) [0];
+ Assert.IsFalse (disable1.Enabled);
+
+ var screenBounds = RunningApp.Query (q => q.Raw ("* index:0")) [0].Rect;
+
+ if (RunningApp is iOSApp) {
+ RunningApp.DragCoordinates (screenBounds.Width - 10, disable1.Rect.CenterY, 10, disable1.Rect.CenterY);
+ } else {
+ disable1 = RunningApp.Query (c => c.Marked ("txtCellDisableContextActions1")) [0];
+ RunningApp.TouchAndHoldCoordinates (disable1.Rect.CenterX, disable1.Rect.CenterY);
+ }
+ RunningApp.Screenshot ("Not showing context menu");
+ RunningApp.WaitForNoElement (c => c.Marked ("More"));
+ RunningApp.TapCoordinates (screenBounds.CenterX, screenBounds.CenterY);
+ }
+ }
+
+ [Test]
+ [Ignore("Fails sometimes on XTC")]
+ public void TestIsEnabledTrue ()
+ {
+ if (RunningApp is iOSApp) {
+ var disable1 = RunningApp.Query (c => c.Marked ("txtCellEnable1")) [0];
+ Assert.IsTrue (disable1.Enabled);
+ var disable2 = RunningApp.Query (c => c.Marked ("txtCellEnable2")) [0];
+ Assert.IsTrue (disable2.Enabled);
+ }
+
+ }
+
+ [Test]
+ [Ignore("Fails sometimes on XTC")]
+ public void TestIsEnabledTrueContextActions ()
+ {
+ if (RunningApp is iOSApp) {
+ var disable1 = RunningApp.Query (c => c.Marked ("txtCellEnabledContextActions1")) [0];
+ Assert.IsTrue (disable1.Enabled);
+
+ var screenBounds = RunningApp.Query (q => q.Raw ("* index:0")) [0].Rect;
+
+ if (RunningApp is iOSApp) {
+ RunningApp.DragCoordinates (screenBounds.Width - 10, disable1.Rect.CenterY, 10, disable1.Rect.CenterY);
+ } else {
+ disable1 = RunningApp.Query (c => c.Marked ("txtCellEnabledContextActions1")) [0];
+ RunningApp.TouchAndHoldCoordinates (disable1.Rect.CenterX, disable1.Rect.CenterY);
+ }
+
+ RunningApp.Screenshot ("Showing context menu");
+ RunningApp.WaitForElement (c => c.Marked ("More"));
+ }
+
+ }
+#endif
+
+ }
+}
+
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue229.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue229.cs
new file mode 100644
index 00000000..d0c36ac2
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue229.cs
@@ -0,0 +1,29 @@
+using System;
+using System.Diagnostics;
+
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 229, "ToolbarItems broken", PlatformAffected.Android)]
+ public class Issue229 : ContentPage
+ {
+ public Issue229 ()
+ {
+ Title = "I am a navigation page.";
+
+ var label = new Label {
+ Text = "I should have a toolbar item",
+ XAlign = TextAlignment.Center,
+ YAlign = TextAlignment.Center
+ };
+
+ var refreshBtn = new ToolbarItem ("Refresh", null, () => label.Text = "Clicking it works");
+
+ ToolbarItems.Add (refreshBtn);
+
+ Content = label;
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2291.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2291.cs
new file mode 100644
index 00000000..febdc51b
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2291.cs
@@ -0,0 +1,36 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls.TestCasesPages
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 2291, "DatePicker.IsVisible = false issue", PlatformAffected.WinPhone)]
+ public class Issue2291 : ContentPage
+ {
+ public Issue2291 ()
+ {
+ var btnTest = new Button {
+ Text = "Fundo"
+ };
+
+ var dtPicker = new DatePicker {
+ IsVisible = false
+ };
+
+ Content = new StackLayout {
+ Children = {
+ btnTest,
+ dtPicker
+ }
+ };
+
+ btnTest.Clicked += (s, e) => {
+ dtPicker.Focus ();
+ };
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2292.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2292.cs
new file mode 100644
index 00000000..491d5fdd
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2292.cs
@@ -0,0 +1,39 @@
+using System.Diagnostics;
+
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 2292, "DatePicker not shown when .Focus() is called", PlatformAffected.WinPhone)]
+ public class Issue2292 : ContentPage
+ {
+ public Issue2292 ()
+ {
+ var datePicker = new DatePicker ();
+ var datePickerBtn = new Button {
+ Text = "Click me to call .Focus on DatePicker"
+ };
+
+ datePickerBtn.Clicked += (sender, args) => {
+ datePicker.Focus ();
+ };
+
+ var datePickerBtn2 = new Button {
+ Text = "Click me to call .Unfocus on DatePicker"
+ };
+
+ datePickerBtn2.Clicked += (sender, args) => {
+ datePicker.Unfocus ();
+ };
+
+ Content = new StackLayout {
+ Children = {
+ datePickerBtn,
+ datePickerBtn2,
+ datePicker,
+ }
+ };
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2294.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2294.cs
new file mode 100644
index 00000000..1f8bcf39
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2294.cs
@@ -0,0 +1,60 @@
+using System;
+using Xamarin.Forms;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 2294, "Scrolling view causes timer to stop incrementing", PlatformAffected.iOS)]
+ public class Issue2294 : ContentPage
+ {
+ public Issue2294 ()
+ {
+ var labelUpdatedByTimer = new Label{ };
+ var layout = new StackLayout {
+ Children = {
+ new Label {Text = "lots of content to scroll"},
+ new Label {Text = "lots of content to scroll"},
+ new Label {Text = "lots of content to scroll"},
+ new Label {Text = "lots of content to scroll"},
+ new Label {Text = "lots of content to scroll"},
+ new Label {Text = "lots of content to scroll"},
+ new Label {Text = "lots of content to scroll"},
+ new Label {Text = "lots of content to scroll"},
+ labelUpdatedByTimer,
+ new Label {Text = "lots of content to scroll"},
+ new Label {Text = "lots of content to scroll"},
+ new Label {Text = "lots of content to scroll"},
+ new Label {Text = "lots of content to scroll"},
+ new Label {Text = "lots of content to scroll"},
+ new Label {Text = "lots of content to scroll"},
+ new Label {Text = "lots of content to scroll"},
+ new Label {Text = "lots of content to scroll"},
+ new Label {Text = "lots of content to scroll"},
+ new Label {Text = "lots of content to scroll"},
+ new Label {Text = "lots of content to scroll"},
+ new Label {Text = "lots of content to scroll"},
+ new Label {Text = "lots of content to scroll"},
+ new Label {Text = "lots of content to scroll"},
+ new Label {Text = "lots of content to scroll"},
+ new Label {Text = "lots of content to scroll"},
+ new Label {Text = "lots of content to scroll"},
+ new Label {Text = "lots of content to scroll"},
+ new Label {Text = "lots of content to scroll"},
+ },
+ };
+ var scroll = new ScrollView {
+ Content = layout,
+ };
+ double counter = 0.0;
+ Device.StartTimer (TimeSpan.FromSeconds (0.02), () => {
+ counter += 0.02;
+ labelUpdatedByTimer.Text = counter.ToString();
+ return true;
+ });
+ Content = scroll;
+ }
+ }
+}
+
+
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2333.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2333.cs
new file mode 100644
index 00000000..74329676
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2333.cs
@@ -0,0 +1,39 @@
+using System.Diagnostics;
+
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 2333, "TimePicker not shown when .Focus() is called", PlatformAffected.WinPhone)]
+ public class Issue2333 : ContentPage
+ {
+ public Issue2333 ()
+ {
+ var timePicker = new TimePicker ();
+ var timePickerBtn = new Button {
+ Text = "Click me to call .Focus on TimePicker"
+ };
+
+ timePickerBtn.Clicked += (sender, args) => {
+ timePicker.Focus ();
+ };
+
+ var timePickerBtn2 = new Button {
+ Text = "Click me to call .Unfocus on TimePicker"
+ };
+
+ timePickerBtn2.Clicked += (sender, args) => {
+ timePicker.Unfocus ();
+ };
+
+ Content = new StackLayout {
+ Children = {
+ timePickerBtn,
+ timePickerBtn2,
+ timePicker,
+ }
+ };
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2339.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2339.cs
new file mode 100644
index 00000000..aa958607
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2339.cs
@@ -0,0 +1,66 @@
+using System.Diagnostics;
+using System.Threading.Tasks;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 2339, "Picker not shown when .Focus() is called", PlatformAffected.WinPhone)]
+ public class Issue2339 : ContentPage
+ {
+ public Issue2339 ()
+ {
+ var picker = new Picker { Items = {"One", "Two", "Three"} };
+ var pickerBtn = new Button {
+ Text = "Click me to call .Focus on Picker"
+ };
+
+ pickerBtn.Clicked += (sender, args) => {
+ picker.Focus ();
+ };
+
+ var pickerBtn2 = new Button {
+ Text = "Click me to call .Unfocus on Picker"
+ };
+
+ pickerBtn2.Clicked += (sender, args) => {
+ picker.Unfocus ();
+ };
+
+ var pickerBtn3 = new Button {
+ Text = "Click me to .Focus () picker, wait 2 seconds, and .Unfocus () picker",
+ Command = new Command (async () => {
+ picker.Focus ();
+ await Task.Delay (2000);
+ picker.Unfocus ();
+ })
+ };
+
+ var focusFiredCount = 0;
+ var unfocusFiredCount = 0;
+
+ var focusFiredLabel = new Label { Text = "Picker Focused: " + focusFiredCount };
+ var unfocusedFiredLabel = new Label { Text = "Picker UnFocused: " + unfocusFiredCount };
+
+ picker.Focused += (s, e) => {
+ focusFiredCount++;
+ focusFiredLabel.Text = "Picker Focused: " + focusFiredCount;
+ };
+ picker.Unfocused += (s, e) => {
+ unfocusFiredCount++;
+ unfocusedFiredLabel.Text = "Picker UnFocused: " + unfocusFiredCount;
+ };
+
+ Content = new StackLayout {
+ Children = {
+ focusFiredLabel,
+ unfocusedFiredLabel,
+ pickerBtn,
+ pickerBtn2,
+ pickerBtn3,
+ picker
+ }
+ };
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2354.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2354.cs
new file mode 100644
index 00000000..1e676f12
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2354.cs
@@ -0,0 +1,116 @@
+using System;
+
+using Xamarin.Forms;
+using System.Collections.Generic;
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using NUnit.Framework;
+using Xamarin.UITest;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue(IssueTracker.Github, 2354, "ListView, ImageCell and disabled source cache and same image url",PlatformAffected.iOS | PlatformAffected.Android)]
+ public class Issue2354 : TestContentPage
+ {
+ protected override void Init ()
+ {
+ var presidents = new List<President> ();
+ for (int i = 0; i < 10; i++) {
+ presidents.Add (new President ($"Presidente {44 - i}", 1, $"http://static.c-span.org/assets/images/series/americanPresidents/{43 - i}_400.png"));
+ }
+
+ var header = new Label {
+ Text = "Presidents",
+ HorizontalOptions = LayoutOptions.Center
+ };
+
+ var cell = new DataTemplate (typeof(CustomCell));
+
+ var listView = new ListView {
+ ItemsSource = presidents,
+ ItemTemplate = cell,
+ RowHeight = 200
+ };
+
+
+ Content = new StackLayout {
+ Children = {
+ header,
+ listView
+ }
+ };
+ }
+
+ public class President
+ {
+ public President (string name, int position, string image)
+ {
+ Name = name;
+ Position = position;
+ Image = image;
+ }
+
+ public string Name { private set; get; }
+
+ public int Position { private set; get; }
+
+ public string Image { private set; get; }
+ }
+
+
+ [Preserve (AllMembers = true)]
+ public class CustomCell : ViewCell
+ {
+ public CustomCell()
+ {
+ var image = new Image
+ {
+ HorizontalOptions = LayoutOptions.Start,
+ Aspect = Aspect.AspectFill
+ };
+
+ var source = new UriImageSource {
+ CachingEnabled = false,
+ };
+
+ source.SetBinding(UriImageSource.UriProperty, new Binding("Image", converter: new UriConverter()));
+
+ image.Source = source;
+
+
+ View = image;
+ }
+ }
+
+ public class UriConverter : IValueConverter
+ {
+
+ public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
+ {
+ return new Uri((string) value);
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+
+ }
+
+#if UITEST
+ [Test]
+ public void TestDoesntCrashWithCachingDisable ()
+ {
+ RunningApp.ScrollDown ();
+ RunningApp.ScrollDown ();
+ }
+#endif
+
+ }
+
+}
+
+
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2357.xaml b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2357.xaml
new file mode 100644
index 00000000..b01a5ccf
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2357.xaml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<MasterDetailPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="Xamarin.Forms.Controls.Issue2357" IsBusy="{Binding IsBusy}">
+ <MasterDetailPage.Master>
+ <ContentPage Title="Menu" Icon="menuIcon.png">
+ <StackLayout Spacing="0">
+ <ContentView Padding="10,36,0,5" BackgroundColor="Transparent">
+ <Label Text="MENU" Font="Medium">
+ </Label>
+ </ContentView>
+ <ListView ItemsSource="{Binding MainMenuItems}" ItemTapped="ListViewOnItemTapped">
+ <ListView.ItemTemplate>
+ <DataTemplate>
+ <TextCell Text="{Binding Title}">
+ </TextCell>
+ </DataTemplate>
+ </ListView.ItemTemplate>
+ </ListView>
+ </StackLayout>
+ </ContentPage>
+ </MasterDetailPage.Master>
+</MasterDetailPage> \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2357.xaml.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2357.xaml.cs
new file mode 100644
index 00000000..54c8e0b3
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2357.xaml.cs
@@ -0,0 +1,418 @@
+using System;
+using System.Collections.Generic;
+
+using Xamarin.Forms;
+using System.Collections.ObjectModel;
+using System.Diagnostics;
+using System.Threading.Tasks;
+using System.Linq;
+using System.ComponentModel;
+using System.Text;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+#if APP
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 2357, "Webview waits to load the content until webviews on previous pages are loaded", PlatformAffected.iOS | PlatformAffected.Android)]
+ public partial class Issue2357 : MasterDetailPage
+ {
+ public Issue2357 ()
+ {
+ MasterViewModel = new MasterViewModel ();
+ MasterViewModel.PageSelectionChanged += MasterViewModelOnPageSelectionChanged;
+ BindingContext = MasterViewModel;
+
+ Detail = new NavigationPage (new ContentPage {
+ Title = "Home",
+ Content = new Label {
+ Text = "Hello, Forms !",
+ VerticalOptions = LayoutOptions.CenterAndExpand,
+ HorizontalOptions = LayoutOptions.CenterAndExpand
+ }
+ });
+ InitializeComponent ();
+ }
+
+ public MasterViewModel MasterViewModel { get; set; }
+
+ async void MasterViewModelOnPageSelectionChanged (object sender, NavigationEventArgs eventArgs)
+ {
+ Debug.WriteLine ("MasterViewModelOnPageSelectionChanged");
+ IsPresented = false;
+ var page = eventArgs.Page;
+ await Detail.Navigation.PushAsync (page, true);
+ }
+
+ protected override async void OnAppearing ()
+ {
+ await TryInitializeMasterViewModel ();
+ base.OnAppearing ();
+ }
+
+ protected override void OnDisappearing ()
+ {
+ //MasterViewModel.PageSelectionChanged -= MasterViewModelOnPageSelectionChanged;
+ base.OnDisappearing ();
+ }
+
+ async Task TryInitializeMasterViewModel ()
+ {
+ while (true) {
+ string errorMessage;
+ try {
+ await MasterViewModel.InitializeAsync ();
+ break;
+ } catch (Exception ex) {
+ Insights.Report (ex, Insights.Severity.Error);
+ errorMessage = ex.Message;
+ }
+
+ if (!string.IsNullOrWhiteSpace (errorMessage)) {
+ var retry = await DisplayAlert ("Error", errorMessage, "Retry", "Close Application");
+ if (retry) {
+ continue;
+ }
+
+ }
+
+ break;
+ }
+ }
+
+ protected void ListViewOnItemTapped (object sender, ItemTappedEventArgs e)
+ {
+ Debug.WriteLine ("ListViewOnItemTapped");
+
+ if (((ListView)sender).SelectedItem == null)
+ return;
+
+ var menuItem = e.Item as MainMenuItem;
+
+ if (menuItem != null) {
+ switch (menuItem.MenuType) {
+ case MenuType.Login:
+ {
+ break;
+ }
+
+ case MenuType.WebView:
+ {
+ var webViewViewModel = new WebViewViewModel (menuItem);
+ MasterViewModel.CurrentDetailPage = new CustomWebView (webViewViewModel);
+ break;
+ }
+
+ default:
+ {
+ //MenuType Standard
+ break;
+ }
+ }
+
+ ((ListView)sender).SelectedItem = null;
+ }
+ }
+ }
+
+ internal class CustomWebView : ContentPage
+ {
+ WebView _titledWebView;
+
+ public CustomWebView ()
+ {
+ _titledWebView = new WebView ();
+ _titledWebView.SetBinding (WebView.SourceProperty, new Binding ("Url"));
+ _titledWebView.Navigating += WebView_OnNavigating;
+ this.SetBinding (TitleProperty, "Title");
+ Content = _titledWebView;
+ }
+
+ public CustomWebView (WebViewViewModel webViewViewModel) : this ()
+ {
+ Debug.WriteLine ("New WebView");
+
+ _titledWebView.BindingContext = webViewViewModel;
+ }
+
+ static void WebView_OnNavigating (object sender, WebNavigatingEventArgs e)
+ {
+ Debug.WriteLine ("OS: " + Device.OS + " Current Url: " + GetSourceUrl (((WebView)sender).Source) + "Destination Url: " + e.Url + " " + DateTime.Now);
+
+ if (e.Url.IsValidAbsoluteUrl ()) {
+ var destinationUri = new Uri (e.Url);
+ var sourceUri = GetSourceUrl (((WebView)sender).Source);
+ if (sourceUri.HasSameHost (destinationUri)) {
+ if (destinationUri == sourceUri) {
+ //Do nothing. This happens on webview load
+ Debug.WriteLine ("WebView_OnNavigating Same URI");
+ return;
+ }
+
+ //If it reaches here, A link could have been clicked.
+ e.Cancel = true;
+ Debug.WriteLine ("WebView_OnNavigating Same Host but different Uri");
+ } else {
+ //if external link is clicked
+ Debug.WriteLine ("WebView_OnNavigating, DIfferent Uri, so open in Native Browser");
+ e.Cancel = true;
+ Device.OpenUri (new Uri (e.Url));
+ }
+ }
+ }
+
+ static Uri GetSourceUrl (WebViewSource source)
+ {
+ Debug.Assert (source != null, "source cannot be null.");
+
+ var urlWebViewSource = source as UrlWebViewSource;
+ if (urlWebViewSource != null) {
+ if (urlWebViewSource.Url.IsValidAbsoluteUrl ()) {
+ return new Uri (urlWebViewSource.Url);
+ }
+ }
+
+ throw new InvalidOperationException ("WebViewSource is Invalid. Only UrlWebViewSource is accepted.");
+ }
+ }
+
+ public static class UriExtensions
+ {
+ public static bool HasSameHost (this Uri sourceUri, Uri destinationUri, UriFormat uriFormat = UriFormat.Unescaped)
+ {
+ Debug.Assert (sourceUri != null, "sourceUri cannot be null.");
+ Debug.Assert (destinationUri != null, "destinationUri cannot be null.");
+
+ return destinationUri.GetComponents (UriComponents.Host, uriFormat) ==
+ sourceUri.GetComponents (UriComponents.Host, uriFormat);
+ }
+ }
+
+ public static class StringExtensions
+ {
+ public static bool IsValidAbsoluteUrl (this string stringValue)
+ {
+ Uri result;
+ return !string.IsNullOrWhiteSpace (stringValue) && Uri.TryCreate (stringValue, UriKind.Absolute, out result) && (result.Scheme == "http" || result.Scheme == "https");
+ }
+ }
+ public delegate void PageSelectionChanged (object sender, NavigationEventArgs e);
+
+ public class MasterViewModel : ViewModelBase1
+ {
+ public static event PageSelectionChanged PageSelectionChanged;
+
+ ObservableCollection<MainMenuItem> _mainMenuItems;
+ Page _currentDetailPage;
+
+ public MasterViewModel ()
+ {
+ _mainMenuItems = new ObservableCollection<MainMenuItem> (Enumerable.Empty<MainMenuItem> ());
+ }
+
+ public async Task InitializeAsync ()
+ {
+ var items = new List<MainMenuItem> ();
+ items.Add (new MainMenuItem {
+ Title = "SHORT",
+ MenuType = MenuType.WebView,
+ Uri = new Uri ("http://api.morgans.bluearc-uat.com/mobile/SamplePage.aspx?page=Portfolio")
+ });
+ items.Add (new MainMenuItem {
+ Title = "LONG",
+ MenuType = MenuType.WebView,
+ Uri = new Uri ("http://api.morgans.bluearc-uat.com/mobile/SamplePage.aspx?page=long")
+ });
+
+ MainMenuItems = new ObservableCollection<MainMenuItem> (items);
+ }
+
+ public ObservableCollection<MainMenuItem> MainMenuItems {
+ get { return _mainMenuItems; }
+ set {
+ _mainMenuItems = value;
+ OnPropertyChanged ("MainMenuItems");
+ }
+ }
+
+ public Page CurrentDetailPage {
+ get { return _currentDetailPage; }
+ set {
+ _currentDetailPage = value;
+
+ var handler = PageSelectionChanged;
+ if (handler != null) {
+ handler (null, new NavigationEventArgs (value));
+ }
+ }
+ }
+ }
+
+ public class WebViewViewModel : ViewModelBase1
+ {
+ string _title;
+ string _url;
+
+ public WebViewViewModel (MainMenuItem menuItem)
+ {
+ Debug.WriteLine ("New WebViewViewModel");
+ _title = menuItem.Title;
+ _url = menuItem.Uri.AbsoluteUri;
+ }
+
+ public string Title {
+ get { return _title; }
+ set {
+ _title = value;
+ OnPropertyChanged ("Title");
+ }
+ }
+
+ public string Url {
+ get { return _url; }
+ set {
+ Debug.WriteLine ("WebViewViewModel Url Changed");
+ _url = value;
+ OnPropertyChanged ("Url");
+ }
+ }
+ }
+
+ public interface IMenuService
+ {
+ Task<IEnumerable<MainMenuItem>> GetMenuItemsAsync ();
+ }
+
+ public class MainMenuItem
+ {
+ public object Id { get; set; }
+
+ public MenuType MenuType { get; set; }
+
+ public string Title { get; set; }
+
+ public Uri Uri { get; set; }
+ }
+
+ public enum MenuType
+ {
+ Login,
+ WebView,
+ Standard
+ }
+
+ public class ViewModelBase1 : INotifyPropertyChanged
+ {
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ /// <summary>
+ /// Event for when IsBusy changes
+ /// </summary>
+ public event EventHandler IsBusyChanged;
+
+ /// <summary>
+ /// Event for when IsValid changes
+ /// </summary>
+ public event EventHandler IsValidChanged;
+
+ readonly List<string> _errors = new List<string> ();
+ bool _isBusy;
+
+ /// <summary>
+ /// Default constructor
+ /// </summary>
+ public ViewModelBase1 ()
+ {
+ //Make sure validation is performed on startup
+ Validate ();
+ }
+
+ /// <summary>
+ /// Returns true if the current state of the ViewModel is valid
+ /// </summary>
+ public bool IsValid {
+ get { return _errors.Count == 0; }
+ }
+
+ /// <summary>
+ /// A list of errors if IsValid is false
+ /// </summary>
+ protected List<string> Errors {
+ get { return _errors; }
+ }
+
+ /// <summary>
+ /// An aggregated error message
+ /// </summary>
+ public string Error {
+ get {
+ return _errors.Aggregate (new StringBuilder (), (b, s) => b.AppendLine (s)).ToString ().Trim ();
+ }
+ }
+
+ /// <summary>
+ /// Protected method for validating the ViewModel
+ /// - Fires PropertyChanged for IsValid and Errors
+ /// </summary>
+ protected void Validate ()
+ {
+ OnPropertyChanged ("IsValid");
+ OnPropertyChanged ("Errors");
+
+ var method = IsValidChanged;
+ if (method != null)
+ method (this, EventArgs.Empty);
+ }
+
+ /// <summary>
+ /// Other viewmodels should call this when overriding Validate, to validate each property
+ /// </summary>
+ /// <param name="validate">Func to determine if a value is valid</param>
+ /// <param name="error">The error message to use if not valid</param>
+ protected void ValidateProperty (Func<bool> validate, string error)
+ {
+ if (validate ()) {
+ if (!Errors.Contains (error))
+ Errors.Add (error);
+ } else {
+ Errors.Remove (error);
+ }
+ }
+
+ /// <summary>
+ /// Value indicating if a spinner should be shown
+ /// </summary>
+ public bool IsBusy {
+ get { return _isBusy; }
+ set {
+ if (_isBusy != value) {
+ _isBusy = value;
+
+ OnPropertyChanged ("IsBusy");
+ OnIsBusyChanged ();
+ }
+ }
+ }
+
+ /// <summary>
+ /// Other viewmodels can override this if something should be done when busy
+ /// </summary>
+ protected void OnIsBusyChanged ()
+ {
+ var ev = IsBusyChanged;
+ if (ev != null) {
+ ev (this, EventArgs.Empty);
+ }
+ }
+
+ protected void OnPropertyChanged (string name)
+ {
+ var ev = PropertyChanged;
+ if (ev != null) {
+ ev (this, new PropertyChangedEventArgs (name));
+ }
+ }
+ }
+#endif
+}
+
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2411.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2411.cs
new file mode 100644
index 00000000..9221803b
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2411.cs
@@ -0,0 +1,276 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Diagnostics;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using NUnit.Framework;
+using Xamarin.UITest;
+#endif
+
+namespace Xamarin.Forms.Controls.TestCasesPages
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 2411, "ListView.ScrollTo not working in TabbedPage", PlatformAffected.Android)]
+ public class Issue2411 : TestTabbedPage
+ {
+ protected override void Init ()
+ {
+ Children.Add (new XamarinListViewScrollToBugPage1 ());
+ Children.Add (new XamarinListViewScrollToBugPage2 ());
+ Children.Add (new XamarinListViewScrollToBugPage3 ());
+ }
+
+#if UITEST
+ [Test]
+#if __ANDROID__
+ [Ignore ("Appearing event is tied to virtualization in TabbedPage for Material")]
+#endif
+ [Issue (IssueTracker.Github, 2411, "ScrollToPositon.MakeVisible not called every time TabbedPage", PlatformAffected.Android)]
+ public void Issue2411ScrollToPositionMakeVisible ()
+ {
+ RunningApp.WaitForElement (q => q.Marked ("99 99 99 99 99 99"));
+ RunningApp.Screenshot ("ScrollTo working correctly");
+ RunningApp.Tap (q => q.Marked ("Crash in ScrollToPosition.End"));
+ RunningApp.Screenshot ("On Second Tab");
+ RunningApp.WaitForElement (q => q.Marked ("2 0 0 0 0 0 0"));
+ RunningApp.Tap (q => q.Marked ("Scroll To in OnAppearing"));
+ RunningApp.Screenshot ("On First Tab");
+ RunningApp.WaitForElement (q => q.Marked ("99 99 99 99 99 99"));
+
+ var listViewBound = RunningApp.Query (q => q.Marked ("listView"))[0].Rect;
+ Xamarin.Forms.Core.UITests.Gestures.ScrollForElement (RunningApp, "* marked:'0 0 0 0 0 0'", new Xamarin.Forms.Core.UITests.Drag (listViewBound, Xamarin.Forms.Core.UITests.Drag.Direction.TopToBottom, Xamarin.Forms.Core.UITests.Drag.DragLength.Long));
+ RunningApp.Screenshot ("Scrolled to Top");
+
+ RunningApp.Tap (q => q.Marked ("Crash in ScrollToPosition.End"));
+ RunningApp.Screenshot ("On Second Tab");
+ RunningApp.WaitForElement (q => q.Marked ("2 0 0 0 0 0 0"));
+ RunningApp.Tap (q => q.Marked ("Scroll To in OnAppearing"));
+ RunningApp.Screenshot ("On First Tab");
+ RunningApp.WaitForElement (q => q.Marked ("99 99 99 99 99 99"));
+ }
+
+ [Test]
+ [Issue (IssueTracker.Github, 2411, "ScrollToPositon.End crashing in TabbedPage", PlatformAffected.Android)]
+ public void Issue2411ScrollToPositionEndCrash ()
+ {
+ RunningApp.Tap (q => q.Marked ("Crash in ScrollToPosition.End"));
+ RunningApp.Screenshot ("On Second Tab");
+ RunningApp.Tap (q => q.Marked ("Scroll To in OnAppearing"));
+ RunningApp.Screenshot ("On First Tab");
+ RunningApp.Tap (q => q.Marked ("Crash in ScrollToPosition.End"));
+ RunningApp.Screenshot ("On Second Tab Again");
+ RunningApp.Tap (q => q.Marked ("ScrollToPosition.End End - Not animated"));
+ RunningApp.WaitForElement (q => q.Marked ("2 99 99 99 99 99 99"));
+ }
+
+ [Test]
+ [Issue (IssueTracker.Github, 2411, "ScrollToPositon.End crashing in TabbedPage", PlatformAffected.Android)]
+ public void Issue2411ScrollToPositionWrongOnUneven ()
+ {
+ RunningApp.Tap (q => q.Marked ("Crash in ScrollToPosition.End"));
+ RunningApp.Tap (q => q.Marked ("Scroll To in OnAppearing Uneven"));
+ RunningApp.Screenshot ("On Third Tab");
+ RunningApp.WaitForElement (q => q.Marked ("99 99 99 99 99 99"));
+ }
+#endif
+ }
+
+ [Preserve (AllMembers = true)]
+ internal class ListObj
+ {
+ public string Name { get; set; }
+ }
+
+ [Preserve (AllMembers = true)]
+ public class CellTemplateScrollTo : ViewCell
+ {
+ public CellTemplateScrollTo ()
+ {
+ Label cellLabel = new Label () {
+ HorizontalOptions = LayoutOptions.FillAndExpand,
+ };
+
+ cellLabel.SetBinding (Label.TextProperty, new Binding ("Name", BindingMode.OneWay));
+
+ StackLayout root = new StackLayout () {
+ Children = {
+ cellLabel
+ }
+ };
+
+ View = root;
+ }
+ }
+
+ [Preserve (AllMembers = true)]
+ public class CellTemplateScrollToUneven : CellTemplateScrollTo
+ {
+ public CellTemplateScrollToUneven ()
+ {
+
+ Height = 60 + new Random().Next(10, 100);
+ }
+ }
+
+ [Preserve (AllMembers = true)]
+ public class XamarinListViewScrollToBugPage1 : ContentPage
+ {
+ ListView _listView;
+ ObservableCollection<ListObj> _collection = new ObservableCollection<ListObj> ();
+
+ public XamarinListViewScrollToBugPage1 ()
+ {
+ Title = "Scroll To in OnAppearing";
+
+ for (int i = 0; i < 100; i++) {
+ var item = new ListObj { Name = string.Format ("{0} {0} {0} {0} {0} {0}", i) };
+ _collection.Add (item);
+ }
+
+ _listView = new ListView {
+ ItemsSource = _collection,
+ ItemTemplate = new DataTemplate (typeof(CellTemplateScrollTo))
+ };
+
+ _listView.AutomationId = "listView";
+
+ Content = new StackLayout {
+ Children = {
+ _listView
+ }
+ };
+ }
+
+ protected override void OnAppearing ()
+ {
+ base.OnAppearing ();
+ _listView.ScrollTo (_collection.Last(), ScrollToPosition.MakeVisible, false);
+ }
+ }
+
+ [Preserve (AllMembers = true)]
+ public class XamarinListViewScrollToBugPage2 : ContentPage
+ {
+ ListView _listView;
+ ObservableCollection<ListObj> _collection = new ObservableCollection<ListObj> ();
+
+ public XamarinListViewScrollToBugPage2 ()
+ {
+ Title = "Crash in ScrollToPosition.End";
+
+ for (int i = 0; i < 100; i++) {
+ var item = new ListObj { Name = string.Format ("2 {0} {0} {0} {0} {0} {0}", i) };
+ _collection.Add (item);
+ }
+
+ _listView = new ListView {
+ ItemsSource = _collection,
+ ItemTemplate = new DataTemplate (typeof(CellTemplateScrollTo))
+ };
+
+ var endButton = new Button {
+ Text = "ScrollToPosition.End End - Not animated",
+ Command = new Command (() => {
+ _listView.ScrollTo (_collection.Last(), ScrollToPosition.End, false);
+ })
+ };
+
+ var endButtonAnimated = new Button {
+ Text = "ScrollToPosition.MakeVisible End - Animated",
+ Command = new Command (() => {
+ _listView.ScrollTo (_collection.Last(), ScrollToPosition.MakeVisible, true);
+ })
+ };
+
+ Content = new StackLayout {
+ Children = {
+ endButton,
+ endButtonAnimated,
+ _listView
+ }
+ };
+ }
+ }
+
+ public class XamarinListViewScrollToBugPage3 : ContentPage
+ {
+ ListView _listView;
+ ObservableCollection<ListObj> _collection = new ObservableCollection<ListObj> ();
+ int _i =0;
+ public XamarinListViewScrollToBugPage3 ()
+ {
+ Title = "Scroll To in OnAppearing Uneven";
+
+ for (_i = 0; _i < 100; _i++) {
+ var item = new ListObj { Name = string.Format ("{0} {0} {0} {0} {0} {0}", _i) };
+ _collection.Add (item);
+ }
+
+ var btnAdd = new Button {
+ Text = "Add item",
+ WidthRequest = 100
+ };
+ btnAdd.Clicked += BtnAddOnClicked;
+
+ var btnBottom = new Button {
+ Text = "Scroll to end",
+ WidthRequest = 100
+ };
+ btnBottom.Clicked += BtnBottomOnClicked;
+
+ var btnPanel = new StackLayout {
+ Orientation = StackOrientation.Horizontal,
+ HorizontalOptions = LayoutOptions.Center,
+ Children = {
+ btnAdd,
+ btnBottom
+ }
+ };
+
+ _listView = new ListView {
+ ItemsSource = _collection,
+ BackgroundColor = Color.Transparent,
+ VerticalOptions = LayoutOptions.FillAndExpand,
+ HasUnevenRows = true,
+ ItemTemplate = new DataTemplate (typeof(CellTemplateScrollToUneven))
+ };
+ _listView.TakePerformanceHit = true;
+ _listView.ItemTapped += (sender, e) => ((ListView)sender).SelectedItem = null;
+
+ _listView.AutomationId = "listView";
+
+ Content = new StackLayout {
+ Children = {
+ btnPanel,
+ _listView
+ }
+ };
+ }
+
+ protected override void OnAppearing ()
+ {
+ base.OnAppearing ();
+ _listView.ScrollTo (_collection.Last(), ScrollToPosition.MakeVisible, false);
+ }
+
+ void BtnBottomOnClicked(object sender, EventArgs e)
+ {
+ var item = _collection.Last();
+ _listView.ScrollTo(item, ScrollToPosition.End, true);
+ }
+
+ void BtnAddOnClicked(object sender, EventArgs eventArgs)
+ {
+ var str = string.Format("Item {0}", _i++);
+ var item = new ListObj { Name = string.Format ("{0} {0} {0} {0} {0} {0}", _i) };
+ _collection.Add(item);
+
+ _listView.ScrollTo(item, ScrollToPosition.End, true);
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2414.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2414.cs
new file mode 100644
index 00000000..894d0d6c
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2414.cs
@@ -0,0 +1,97 @@
+using System;
+
+using Xamarin.Forms;
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using NUnit.Framework;
+using Xamarin.UITest.iOS;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 2414, "NullReferenceException when swiping over Context Actions", PlatformAffected.WinPhone)]
+ public class Issue2414 : TestContentPage
+ {
+ protected override void Init ()
+ {
+ var tableView = new TableView
+ {
+ Intent = TableIntent.Settings,
+ Root = new TableRoot("TableView Title")
+ {
+ new TableSection("Table Section 2")
+ {
+ new TextCell
+ {
+ Text = "Swipe ME",
+ Detail = "And I will crash!",
+ ContextActions = {
+ new MenuItem
+ {
+ Text = "Text0"
+ },new MenuItem
+ {
+ Text = "Text1"
+ },
+ new MenuItem
+ {
+ Text = "Text2"
+ },
+ new MenuItem
+ {
+ Text = "Text3"
+ },
+ new MenuItem
+ {
+ Text = "Text4",
+ IsDestructive = true,
+ }}
+ },
+ }
+ }
+ };
+ Content = tableView;
+ }
+
+#if UITEST
+ [Test]
+ public void TestDoesntCrashShowingContextMenu ()
+ {
+ var screenBounds = RunningApp.Query (q => q.Raw ("* index:0"))[0].Rect;
+
+ var cell = RunningApp.Query (c => c.Marked ("Swipe ME")) [0];
+ if (RunningApp is iOSApp) {
+ RunningApp.DragCoordinates (screenBounds.Width - 10, cell.Rect.CenterY, 0, cell.Rect.CenterY);
+ //TODO: fix this when context menu bug is fixed
+ RunningApp.WaitForElement (c => c.Marked ("Text4"));
+ }
+ else {
+ RunningApp.TouchAndHoldCoordinates (cell.Rect.CenterX, cell.Rect.CenterY);
+ RunningApp.WaitForElement (c => c.Marked ("Text0"));
+ }
+ RunningApp.Screenshot ("Didn't crash");
+ RunningApp.TapCoordinates (screenBounds.CenterX, screenBounds.CenterY);
+ }
+
+ [Test]
+ public void TestShowContextMenuItemsInTheRightOrder ()
+ {
+ var screenBounds = RunningApp.Query (q => q.Raw ("* index:0"))[0].Rect;
+
+ var cell = RunningApp.Query (c => c.Marked ("Swipe ME")) [0];
+ if (RunningApp is iOSApp)
+ RunningApp.DragCoordinates (screenBounds.Width -10, cell.Rect.CenterY, 0, cell.Rect.CenterY);
+ else
+ RunningApp.TouchAndHoldCoordinates (cell.Rect.CenterX, cell.Rect.CenterY);
+ RunningApp.WaitForElement (c => c.Marked ("Text0"));
+ RunningApp.Screenshot ("Are the menuitems in the right order?");
+
+ }
+#endif
+
+ }
+}
+
+
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2470.xaml b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2470.xaml
new file mode 100644
index 00000000..b462f8ba
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2470.xaml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<local:TestTabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+ xmlns:local="clr-namespace:Xamarin.Forms.Controls"
+ x:Class="Xamarin.Forms.Controls.Issue2470">
+ <local:TestTabbedPage.Children>
+ <ContentPage Title="Generate">
+ <StackLayout>
+ <Label Text="Bug" FontSize="Large"/>
+ <Label Text="We have a TabbedPage with a ListView bound to an ObservableCollection."/>
+ <Label Text="If the switch is off, there should be 2 items in the Results tab."/>
+ <Label Text="If the switch is on, there should be 5 items in the Results tab."/>
+ <Label Text="Flip the switch, go to the Results tab, notice the wrong data. If the data is correct, come back here and flip the switch and try it again. After a few tries, you should see the bug."/>
+ <Label Text="Then swipe the data down and notice it gets better."/>
+ <Label Text="This bug only happens on Android."/>
+ <Switch IsToggled="{Binding TwoOrFive}" AutomationId="Switch" />
+ </StackLayout>
+ </ContentPage>
+ <ContentPage Title="Results">
+ <ListView ItemsSource="{Binding Entries}">
+ <ListView.ItemTemplate>
+ <DataTemplate>
+ <SwitchCell Text="{Binding Name}" On="{Binding Selected}"/>
+ </DataTemplate>
+ </ListView.ItemTemplate>
+ </ListView>
+ </ContentPage>
+ </local:TestTabbedPage.Children>
+</local:TestTabbedPage> \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2470.xaml.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2470.xaml.cs
new file mode 100644
index 00000000..4cb0a3e8
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2470.xaml.cs
@@ -0,0 +1,155 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel;
+using System.Linq;
+using System.Runtime.CompilerServices;
+using System.Text;
+using System.Threading.Tasks;
+using Xamarin.Forms;
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using NUnit.Framework;
+using Xamarin.UITest;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ public class Issue2470ViewModelBase : INotifyPropertyChanged
+ {
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
+ {
+ PropertyChangedEventHandler handler = PropertyChanged;
+ if (handler != null) handler(this, new PropertyChangedEventArgs(propertyName));
+ }
+ }
+
+ [Preserve (AllMembers = true)]
+ public class EntryViewModel : ViewModelBase
+ {
+ string _name;
+ public string Name
+ {
+ get { return _name; }
+ set { _name = value; OnPropertyChanged (); }
+ }
+
+ bool _selected;
+ public bool Selected
+ {
+ get { return _selected; }
+ set { _selected = value; OnPropertyChanged (); }
+ }
+ }
+
+ [Preserve (AllMembers = true)]
+ public class Issue2470MainViewModel : Issue2470ViewModelBase
+ {
+ public ObservableCollection<EntryViewModel> Entries { get; private set; }
+
+ double _desiredCount;
+ public double DesiredCount
+ {
+ get { return _desiredCount; }
+ set
+ {
+ _desiredCount = value;
+ OnPropertyChanged ();
+ GenerateEntries ();
+ }
+ }
+
+ bool _twoOrFive;
+ public bool TwoOrFive
+ {
+ get { return _twoOrFive; }
+ set
+ {
+ _twoOrFive = value;
+ OnPropertyChanged ();
+ DesiredCount = _twoOrFive ? 5 : 2;
+ }
+ }
+
+ public Issue2470MainViewModel ()
+ {
+ Entries = new ObservableCollection<EntryViewModel> ();
+ TwoOrFive = false; // prime
+ }
+
+ void GenerateEntries ()
+ {
+ Entries.Clear ();
+ for (var i = 0; i < DesiredCount; i++) {
+ Entries.Add (new EntryViewModel { Name = "Entry " + i + " of " + DesiredCount });
+ }
+ }
+ }
+
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 2470, "ObservableCollection changes do not update ListView", PlatformAffected.Android)]
+ public partial class Issue2470 : TestTabbedPage
+ {
+ protected override void Init ()
+ {
+ var mainViewModel = new Issue2470MainViewModel ();
+ BindingContext = mainViewModel;
+ }
+
+#if APP
+ [Preserve (AllMembers = true)]
+ public Issue2470 ()
+ {
+ InitializeComponent ();
+ }
+#endif
+
+#if UITEST
+ [Test]
+ public void OnservableCollectionChangeListView ()
+ {
+ // Tab 1
+ RunningApp.Tap (q => q.Marked ("Switch"));
+ RunningApp.Screenshot ("Switch On");
+ RunningApp.Tap (q => q.Marked ("Results"));
+
+ // Tab 2
+ RunningApp.WaitForElement (q => q.Marked ("Entry 0 of 5"));
+ RunningApp.WaitForElement (q => q.Marked ("Entry 1 of 5"));
+ RunningApp.WaitForElement (q => q.Marked ("Entry 2 of 5"));
+ RunningApp.WaitForElement (q => q.Marked ("Entry 3 of 5"));
+ RunningApp.WaitForElement (q => q.Marked ("Entry 4 of 5"));
+ RunningApp.Screenshot ("Should be 5 elements");
+ RunningApp.Tap (q => q.Marked ("Generate"));
+
+ // Tab 1
+ RunningApp.Tap (q => q.Marked ("Switch"));
+ RunningApp.Screenshot ("Switch Off");
+ RunningApp.Tap (q => q.Marked ("Results"));
+
+ // Tab 2
+ RunningApp.WaitForElement (q => q.Marked ("Entry 0 of 2"));
+ RunningApp.WaitForElement (q => q.Marked ("Entry 1 of 2"));
+ RunningApp.Screenshot ("Should be 2 elements");
+
+ // Tab 1
+ RunningApp.Tap (q => q.Marked ("Generate"));
+ RunningApp.Tap (q => q.Marked ("Switch"));
+ RunningApp.Screenshot ("Switch On");
+ RunningApp.Tap (q => q.Marked ("Results"));
+
+ // Tab 2
+ RunningApp.WaitForElement (q => q.Marked ("Entry 0 of 5"));
+ RunningApp.WaitForElement (q => q.Marked ("Entry 1 of 5"));
+ RunningApp.WaitForElement (q => q.Marked ("Entry 2 of 5"));
+ RunningApp.WaitForElement (q => q.Marked ("Entry 3 of 5"));
+ RunningApp.WaitForElement (q => q.Marked ("Entry 4 of 5"));
+ RunningApp.Screenshot ("Should be 5 elements");
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2563.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2563.cs
new file mode 100644
index 00000000..538d1553
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2563.cs
@@ -0,0 +1,41 @@
+using System;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 2563, "NavigationPage should support queuing of navigation events", PlatformAffected.Android | PlatformAffected.WinPhone | PlatformAffected.iOS)]
+ public class Issue2563 : ContentPage
+ {
+ public Issue2563 ()
+ {
+ var button = new Button {
+ Text = "Click Me",
+ VerticalOptions = LayoutOptions.Center,
+ HorizontalOptions = LayoutOptions.Center
+ };
+
+ Content = button;
+
+ var random = new Random ();
+ button.Clicked += (sender, args) => {
+ for (int i = 0; i < 10; i++) {
+ button.Navigation.PushAsync (new ContentPage {
+ Title = "Page " + i,
+ Content = new Label {
+ Text = "Page " + i,
+ XAlign = TextAlignment.Center,
+ YAlign = TextAlignment.Center
+ }
+ }, random.NextDouble () > 0.5);
+ }
+
+ for (int i = 0; i < 6; i++) {
+ button.Navigation.PopAsync (random.NextDouble () > 0.5);
+ }
+
+ button.Navigation.PopToRootAsync (random.NextDouble () > 0.5);
+ };
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2594.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2594.cs
new file mode 100644
index 00000000..c4658a5f
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2594.cs
@@ -0,0 +1,33 @@
+using Xamarin.Forms.CustomAttributes;
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 2594, "StackLayout produces overlapping layouts on some phones with specific screen sizes", PlatformAffected.Android | PlatformAffected.iOS | PlatformAffected.WinPhone)]
+ public class Issue2594 : ContentPage
+ {
+ public Issue2594 ()
+ {
+ var layout = new StackLayout {
+ Children = {
+ new StackLayout {
+ BackgroundColor = Color.Red,
+ Orientation = StackOrientation.Horizontal,
+ Children = {
+ new StackLayout {
+ BackgroundColor = Color.Gray,
+ Children = {
+ new Label {Text = "LONG TEXT. LONG TEXT. LONG TEXT. LONG TEXT. LONG TEXT.", TextColor = Color.Olive},
+ }
+ },
+ new Label {Text = "Some other text"}
+ }
+ },
+ new Label {Text = "Overlapped text.", TextColor = Color.Red}
+ }
+ };
+
+ Padding = new Thickness (0, 20, 0, 0);
+ Content = layout;
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2597.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2597.cs
new file mode 100644
index 00000000..7d925018
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2597.cs
@@ -0,0 +1,61 @@
+using System;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 2597, "Stepper control .IsEnabled doesn't work", PlatformAffected.Android)]
+ public class Issue2597 : ContentPage
+ {
+ Label _label;
+
+ public Issue2597()
+ {
+ Label header = new Label
+ {
+ Text = "Stepper",
+ HorizontalOptions = LayoutOptions.Center
+ };
+
+ Stepper stepper = new Stepper
+ {
+ Minimum = 0,
+ Maximum = 10,
+ Increment = 0.1,
+ HorizontalOptions = LayoutOptions.Center,
+ VerticalOptions = LayoutOptions.CenterAndExpand,
+ IsEnabled = false
+ };
+ stepper.ValueChanged += OnStepperValueChanged;
+
+ _label = new Label
+ {
+ Text = "Stepper value is 0",
+ Font = Font.SystemFontOfSize(NamedSize.Large),
+ HorizontalOptions = LayoutOptions.Center,
+ VerticalOptions = LayoutOptions.CenterAndExpand
+ };
+
+ // Accomodate iPhone status bar.
+ Padding = new Thickness(10, Device.OnPlatform(20, 0, 0), 10,
+ 5);
+
+ // Build the page.
+ Content = new StackLayout
+ {
+ Children =
+ {
+ header,
+ stepper,
+ _label
+ }
+ };
+ }
+
+ void OnStepperValueChanged(object sender, ValueChangedEventArgs e)
+ {
+ _label.Text = string.Format("Stepper value is {0:F1}", e.NewValue);
+ }
+ }
+}
+
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue260.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue260.cs
new file mode 100644
index 00000000..cd53a95d
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue260.cs
@@ -0,0 +1,41 @@
+using System;
+using System.Linq;
+
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 260, "Layout issue for TableView", PlatformAffected.WinPhone)]
+ public class Issue260 : ContentPage
+ {
+ // Issue: #229
+ // ToolbarItems broken on Android
+
+ // Doesn't seem to working on All Platforms
+
+ public Issue260 ()
+ {
+ var items = Enumerable.Range (0, 50).Select (i => new TextCell {
+ Text = i.ToString (),
+ Detail = i.ToString ()
+ }).ToList ();
+
+ var tableSection = new TableSection("First Section");
+ foreach (TextCell cell in items) {
+ tableSection.Add (cell);
+ }
+
+ var tableRoot = new TableRoot () {
+ tableSection
+ };
+
+ var tableLayout = new TableView {
+ Root = tableRoot
+ };
+
+ tableLayout.Intent = TableIntent.Data;
+ Content = tableLayout;
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2615.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2615.cs
new file mode 100644
index 00000000..211b5be6
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2615.cs
@@ -0,0 +1,80 @@
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 2615, "iOS Cell Reuse screws up when cells are both ViewCell with different children", PlatformAffected.iOS)]
+ public class Issue2615 : ContentPage
+ {
+ public Issue2615 ()
+ {
+ Title = "Test Blank Rows";
+
+ var tableView = new TableView ();
+ tableView.HasUnevenRows = true;
+
+ var tableHeaderSection = new TableSection ();
+
+ var viewHeaderCell = new ViewCell ();
+
+ var headerCellLayout = new StackLayout ();
+ headerCellLayout.Orientation = StackOrientation.Vertical;
+ headerCellLayout.Spacing = 6;
+ headerCellLayout.HorizontalOptions = LayoutOptions.Fill;
+ headerCellLayout.VerticalOptions = LayoutOptions.Fill;
+
+ var largeNumberLabel = new Label ();
+ largeNumberLabel.FontFamily = "HelveticaNeue-Light";
+ largeNumberLabel.FontSize = 52;
+ largeNumberLabel.Text = "90";
+ largeNumberLabel.TextColor = Color.FromRgb(0.00392156885936856, 0.47843137383461, 0.996078431606293);
+ largeNumberLabel.HorizontalOptions = LayoutOptions.Center;
+ largeNumberLabel.VerticalOptions = LayoutOptions.Fill;
+ headerCellLayout.Children.Add(largeNumberLabel);
+
+ var nameLabel = new Label ();
+ nameLabel.FontFamily = "HelveticaNeue-Light";
+ nameLabel.FontSize = 17;
+ nameLabel.Text = "Name: John Doe";
+ nameLabel.HorizontalOptions = LayoutOptions.CenterAndExpand;
+ nameLabel.VerticalOptions = LayoutOptions.Center;
+ headerCellLayout.Children.Add(nameLabel);
+
+ viewHeaderCell.Height = 100;
+ viewHeaderCell.View = headerCellLayout;
+ tableHeaderSection.Add (viewHeaderCell);
+ tableView.Root.Add (tableHeaderSection);
+
+ for (int sectionNumber = 1; sectionNumber < 11; sectionNumber++) {
+ var tableSection = new TableSection ("Section #" + sectionNumber);
+
+ for (int cellNumber = 1; cellNumber < 11; cellNumber++) {
+
+ var viewCell = new ViewCell ();
+ var viewCellLayout = new StackLayout ();
+ viewCellLayout.Orientation = StackOrientation.Horizontal;
+ viewCellLayout.Spacing = 6;
+ viewCellLayout.Padding = new Thickness (20, 10);
+ viewCellLayout.HorizontalOptions = LayoutOptions.Center;
+ viewCellLayout.VerticalOptions = LayoutOptions.Center;
+
+ var titleLabel = new Label ();
+ titleLabel.FontFamily = "HelveticaNeue-Light";
+ titleLabel.FontSize = 17;
+ titleLabel.Text = "Cell #" + cellNumber;
+ viewCellLayout.Children.Add(titleLabel);
+
+ viewCell.View = viewCellLayout;
+
+ tableSection.Add (viewCell);
+ }
+
+ tableView.Root.Add (tableSection);
+
+ }
+
+ Content = tableView;
+
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2628.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2628.cs
new file mode 100644
index 00000000..136c7054
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2628.cs
@@ -0,0 +1,31 @@
+using System;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 2628, "Unable to change page BackgroundImage from code", PlatformAffected.Android)]
+ public class Issue2628 : ContentPage
+ {
+ public Issue2628 ()
+ {
+ var button1 = new Button { Text = "Click !!!!!!!!!!"};
+ BackgroundImage="bank.png";
+ button1.Clicked += ButtonAction;
+
+ Content = new StackLayout {
+ Spacing = 10,
+ VerticalOptions = LayoutOptions.Center,
+ Children = {
+ button1
+ }
+ };
+ }
+
+ public void ButtonAction(object sender, EventArgs args)
+ {
+ BackgroundImage="calculator.png";
+ }
+ }
+}
+
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2634.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2634.cs
new file mode 100644
index 00000000..992b342f
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2634.cs
@@ -0,0 +1,333 @@
+using System;
+
+using Xamarin.Forms;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 2634, "Keyboard causes view to scroll incorrectly", PlatformAffected.iOS)]
+ public class Issue2634 : ContentPage
+ {
+ public Issue2634 ()
+ {
+ Content = new AddPatientView ();
+ }
+
+ public class AddPatientView : ContentView
+ {
+ Entry _firstNameEntry;
+
+ public AddPatientView ()
+ {
+ var bvBackground = new Frame {
+ Content = new Label { Text = "" },
+ OutlineColor = Color.FromRgb (0x06, 0x68, 0xCF),
+ BackgroundColor = Color.FromRgba (0f, 0f, 0f, 0.4f),
+ HasShadow = true
+ };
+
+ var addGrid = new Grid {
+ VerticalOptions = LayoutOptions.FillAndExpand,
+ RowDefinitions = {
+ new RowDefinition { Height = new GridLength (10, GridUnitType.Absolute) },
+ new RowDefinition { Height = GridLength.Auto },
+ new RowDefinition { Height = GridLength.Auto },
+ new RowDefinition { Height = GridLength.Auto },
+ new RowDefinition { Height = new GridLength (1, GridUnitType.Star) },
+ new RowDefinition { Height = new GridLength (10, GridUnitType.Absolute) },
+ },
+ ColumnDefinitions = {
+ new ColumnDefinition { Width = new GridLength (10, GridUnitType.Absolute) },
+ new ColumnDefinition { Width = new GridLength (1, GridUnitType.Star) },
+ new ColumnDefinition { Width = new GridLength (10, GridUnitType.Absolute) },
+ },
+ ColumnSpacing = 1,
+ RowSpacing = 1,
+ Padding = 0
+ };
+
+
+ #region QuickAdd Data Entry
+ var gridAddData = new Grid {
+ RowDefinitions = {
+ new RowDefinition { Height = new GridLength (0, GridUnitType.Absolute) },
+ new RowDefinition { Height = GridLength.Auto },
+ new RowDefinition { Height = new GridLength (15, GridUnitType.Absolute) },
+ new RowDefinition { Height = GridLength.Auto },
+ new RowDefinition { Height = new GridLength (15, GridUnitType.Absolute) },
+ new RowDefinition { Height = GridLength.Auto },
+ new RowDefinition { Height = new GridLength (15, GridUnitType.Absolute) },
+ new RowDefinition { Height = GridLength.Auto },
+ new RowDefinition { Height = new GridLength (15, GridUnitType.Absolute) },
+ new RowDefinition { Height = GridLength.Auto },
+ new RowDefinition { Height = new GridLength (20, GridUnitType.Absolute) },
+ },
+ ColumnDefinitions = {
+ new ColumnDefinition { Width = new GridLength (60, GridUnitType.Absolute) },
+ new ColumnDefinition { Width = GridLength.Auto },
+ new ColumnDefinition { Width = new GridLength (10, GridUnitType.Absolute) },
+ new ColumnDefinition { Width = new GridLength (1, GridUnitType.Star) },
+ new ColumnDefinition { Width = new GridLength (60, GridUnitType.Absolute) }
+ },
+ BackgroundColor = Color.Transparent,
+ ColumnSpacing = 1,
+ RowSpacing = 1,
+ Padding = 0
+ };
+ Color textColor = Color.Blue;
+ Color dataColor = Color.Black;
+
+ var slFirstName = new StackLayout { Orientation = StackOrientation.Vertical };
+ var lblFirstNameLabel = new Label {
+ Text = "First Name",
+ Font = Font.SystemFontOfSize (NamedSize.Medium, FontAttributes.Bold),
+ TextColor = textColor
+ };
+ _firstNameEntry = new Entry {
+ Keyboard = Keyboard.Default,
+ TextColor = dataColor,
+ Placeholder = "First Name (required)",
+ };
+ slFirstName.Children.Add (lblFirstNameLabel);
+ slFirstName.Children.Add (_firstNameEntry);
+ gridAddData.Children.Add (slFirstName, 1, 4, 1, 2);
+
+ var slMiddleName = new StackLayout { Orientation = StackOrientation.Vertical };
+ var lblMiddleNameLabel = new Label {
+ Text = "Middle Name",
+ Font = Font.SystemFontOfSize (NamedSize.Medium, FontAttributes.Bold),
+ TextColor = textColor
+ };
+ var entMiddleName = new Entry {
+ Keyboard = Keyboard.Default,
+ TextColor = dataColor,
+ Placeholder = "Middle Name",
+ };
+ slMiddleName.Children.Add (lblMiddleNameLabel);
+ slMiddleName.Children.Add (entMiddleName);
+ gridAddData.Children.Add (slMiddleName, 1, 4, 3, 4);
+
+ var slLastName = new StackLayout { Orientation = StackOrientation.Vertical };
+ var lblLastNameLabel = new Label {
+ Text = "Last Name",
+ Font = Font.SystemFontOfSize (NamedSize.Medium, FontAttributes.Bold),
+ TextColor = textColor
+ };
+ var entLastName = new Entry {
+ Keyboard = Keyboard.Default,
+ TextColor = dataColor,
+ Placeholder = "Last Name (required)",
+ };
+ slLastName.Children.Add (lblLastNameLabel);
+ slLastName.Children.Add (entLastName);
+ gridAddData.Children.Add (slLastName, 1, 4, 5, 6);
+
+ var slDob = new StackLayout { Orientation = StackOrientation.Vertical };
+ var lblDobLabel = new Label {
+ Text = "Date of Birth",
+ Font = Font.SystemFontOfSize (NamedSize.Medium, FontAttributes.Bold),
+ TextColor = textColor,
+ XAlign = TextAlignment.Start
+ };
+ var entDob = new Entry {
+ TextColor = dataColor,
+ Placeholder = "mm/dd/yyyy (required)",
+ Keyboard = Keyboard.Numeric
+ };
+ slDob.Children.Add (lblDobLabel);
+ slDob.Children.Add (entDob);
+ gridAddData.Children.Add (slDob, 1, 7);
+
+ var slGender = new StackLayout { Orientation = StackOrientation.Vertical };
+ var lblGenderLabel = new Label {
+ Text = "Gender",
+ Font = Font.SystemFontOfSize (NamedSize.Medium, FontAttributes.Bold),
+ TextColor = textColor,
+ XAlign = TextAlignment.Start
+ };
+ slGender.Children.Add (lblGenderLabel);
+
+
+ gridAddData.Children.Add (slGender, 3, 7);
+
+ var slHomePhone = new StackLayout { Orientation = StackOrientation.Vertical };
+ var lblHomePhoneLabel = new Label {
+ Text = "Home Phone",
+ Font = Font.SystemFontOfSize (NamedSize.Medium, FontAttributes.Bold),
+ TextColor = textColor,
+ XAlign = TextAlignment.Start
+ };
+ var entHomePhone = new Entry {
+ TextColor = dataColor,
+ Keyboard = Keyboard.Telephone,
+ Placeholder = "888-888-8888",
+ //MaxLength = 12
+ };
+ entHomePhone.TextChanged += (object sender, TextChangedEventArgs e) => {
+ };
+ slHomePhone.Children.Add (lblHomePhoneLabel);
+ slHomePhone.Children.Add (entHomePhone);
+ gridAddData.Children.Add (slHomePhone, 1, 9);
+
+ var slMobilePhone = new StackLayout { Orientation = StackOrientation.Vertical };
+ var lblMobilePhoneLabel = new Label {
+ Text = "Mobile Phone",
+ Font = Font.SystemFontOfSize (NamedSize.Medium, FontAttributes.Bold),
+ TextColor = textColor,
+ XAlign = TextAlignment.Start
+ };
+ var entMobilePhone = new Entry {
+ TextColor = dataColor,
+ Keyboard = Keyboard.Telephone,
+ Placeholder = "888-888-8888",
+ };
+ entMobilePhone.TextChanged += (object sender, TextChangedEventArgs e) => {
+ };
+ slMobilePhone.Children.Add (lblMobilePhoneLabel);
+ slMobilePhone.Children.Add (entMobilePhone);
+ gridAddData.Children.Add (slMobilePhone, 3, 9);
+ #endregion
+
+ string breakText = "_______________________________________________________________________________________________________________________________________________________________________________";
+ var lblBreakLine = new Label { LineBreakMode = LineBreakMode.NoWrap, TextColor = Color.Red };
+ lblBreakLine.Text = breakText;
+ addGrid.Children.Add (lblBreakLine, 0, 3, 2, 3);
+
+ var slFrameContent = new StackLayout { Orientation = StackOrientation.Vertical };
+ slFrameContent.Children.Add (addGrid);
+ var svAddData = new ScrollView { Content = gridAddData, IsClippedToBounds = true, IsVisible = true };
+ slFrameContent.Children.Add (svAddData);
+
+ var addFrame = new Frame {
+ Content = slFrameContent,
+ Padding = 5,
+ HasShadow = true
+ };
+
+ var rl = new RelativeLayout ();
+ rl.Children.Add (bvBackground, Forms.Constraint.Constant (0), Forms.Constraint.Constant (0),
+ Forms.Constraint.RelativeToParent ((parent) =>
+ parent.Width),
+ Forms.Constraint.RelativeToParent ((parent) =>
+ parent.Height));
+
+ rl.Children.Add (addFrame,
+ Forms.Constraint.RelativeToParent ((parent) =>
+ (parent.Width * .25) / 2),
+ Forms.Constraint.Constant (Device.OnPlatform (60, 40, 40)),
+ Forms.Constraint.RelativeToParent ((parent) =>
+ parent.Width * .75));
+
+ Content = rl;
+ }
+
+ void cancelButton_Clicked (object sender, EventArgs e)
+ {
+ _firstNameEntry.Focus ();
+ _firstNameEntry.Unfocus (); // done to remove focus from an entry field so keyboard will go away
+ }
+
+ void doneButton_Clicked (object sender, EventArgs e)
+ {
+ _firstNameEntry.Focus ();
+ _firstNameEntry.Unfocus (); // done to remove focus from an entry field so keyboard will go away
+ }
+
+ DataTemplate CreateDtForList ()
+ {
+ var dt = new DataTemplate (() => {
+ // grid for one row definition
+ var grid = new Grid {
+ RowDefinitions = {
+ new RowDefinition { Height = new GridLength (84, GridUnitType.Absolute) },
+ },
+ ColumnDefinitions = {
+ new ColumnDefinition { Width = new GridLength (15, GridUnitType.Absolute) },
+ new ColumnDefinition { Width = new GridLength (1, GridUnitType.Star) },
+ new ColumnDefinition { Width = new GridLength (3, GridUnitType.Absolute) }
+ },
+ ColumnSpacing = 1,
+ RowSpacing = 1,
+ Padding = 0,
+ VerticalOptions = LayoutOptions.Center
+ };
+
+ Color txtColor = Color.Blue;
+ Font dataFont = Font.SystemFontOfSize (NamedSize.Medium);
+ var nameData = new Label {
+ TextColor = txtColor,
+ Font = dataFont,
+ XAlign = TextAlignment.Start,
+ YAlign = TextAlignment.Center,
+ VerticalOptions = LayoutOptions.Center
+ };
+ nameData.SetBinding (Label.TextProperty, "Name");
+ var genderData = new Label {
+ TextColor = txtColor,
+ Font = dataFont,
+ XAlign = TextAlignment.Start,
+ YAlign = TextAlignment.Center,
+ VerticalOptions = LayoutOptions.Center
+ };
+ genderData.SetBinding (Label.TextProperty, "Gender");
+ var slNameGender = new StackLayout { Orientation = StackOrientation.Horizontal };
+ var lblGender1 = new Label { Text = " (", Font = dataFont };
+ var lblGender2 = new Label { Text = ")", Font = dataFont };
+ slNameGender.Children.Add (nameData);
+ slNameGender.Children.Add (lblGender1);
+ slNameGender.Children.Add (genderData);
+ slNameGender.Children.Add (lblGender2);
+
+
+ var lblDob = new Label {
+ TextColor = txtColor,
+ Text = "DOB: ",
+ Font = Font.SystemFontOfSize (NamedSize.Medium, FontAttributes.Bold)
+ };
+ var dobData = new Label {
+ TextColor = txtColor,
+ Font = dataFont,
+ XAlign = TextAlignment.Start,
+ YAlign = TextAlignment.Center,
+ VerticalOptions = LayoutOptions.Center
+ };
+ dobData.SetBinding (Label.TextProperty, "DateOfBirth");
+ var slDobPhone = new StackLayout { Orientation = StackOrientation.Horizontal };
+ slDobPhone.Children.Add (lblDob);
+ slDobPhone.Children.Add (dobData);
+
+ var lblSpacer = new Label { Text = " ", Font = dataFont };
+ slDobPhone.Children.Add (lblSpacer);
+
+ var lblPhone = new Label {
+ TextColor = txtColor,
+ Text = "PHONE: ",
+ Font = Font.SystemFontOfSize (NamedSize.Medium, FontAttributes.Bold)
+ };
+ var phoneData = new Label {
+ TextColor = txtColor,
+ Font = dataFont,
+ XAlign = TextAlignment.Start,
+ YAlign = TextAlignment.Center,
+ VerticalOptions = LayoutOptions.Center
+ };
+ phoneData.SetBinding (Label.TextProperty, "PrimaryPhone");
+ slDobPhone.Children.Add (lblPhone);
+ slDobPhone.Children.Add (phoneData);
+
+ var slTotal = new StackLayout { Orientation = StackOrientation.Vertical };
+ slTotal.Children.Add (slNameGender);
+ slTotal.Children.Add (slDobPhone);
+
+ grid.Children.Add (slTotal, 1, 0);
+ return new ViewCell {
+ View = grid
+ };
+
+ });
+ return dt;
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue264.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue264.cs
new file mode 100644
index 00000000..4f1f3ae2
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue264.cs
@@ -0,0 +1,75 @@
+using System;
+using System.Linq;
+
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using NUnit.Framework;
+using Xamarin.UITest;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 264, "PopModal NRE", PlatformAffected.Android | PlatformAffected.iOS)]
+ public class Issue264 : TestContentPage
+ {
+ Page _current;
+
+ protected override void Init ()
+ {
+ var aboutBtn = new Button {
+ Text = "About"
+ };
+
+ aboutBtn.Clicked += (s, e) => Navigation.PushModalAsync (new AboutPage ());
+
+ var popButton = new Button {
+ Text = "Pop me",
+ Command = new Command (async () => await Navigation.PopAsync ())
+ };
+
+ Content = new StackLayout {
+ Children = {
+ new Label {Text = "Home"},
+ aboutBtn,
+ popButton
+ }
+ };
+ }
+
+ // Pop modal null reference exception
+
+#if UITEST
+ [Test]
+ public void Issue264TestsPushAndPopModal ()
+ {
+ RunningApp.WaitForElement (q => q.Marked ("Home"));
+ RunningApp.WaitForElement (q => q.Button ("About"));
+ RunningApp.Screenshot ("All elements present");
+
+ RunningApp.Tap (q => q.Button ("About"));
+ RunningApp.WaitForElement (q => q.Button ("Close"));
+ RunningApp.Screenshot ("Modal pushed");
+
+ RunningApp.Tap (q => q.Button ("Close"));
+ RunningApp.WaitForElement (q => q.Button ("About"));
+ RunningApp.Screenshot ("Modal popped");
+
+ RunningApp.Tap (q => q.Button ("Pop me"));
+ RunningApp.WaitForElement (q => q.Marked ("Bug Repro's"));
+ RunningApp.Screenshot ("No crash");
+ }
+#endif
+ }
+
+ public class AboutPage : ContentPage
+ {
+ public AboutPage()
+ {
+ BackgroundColor = Color.Black;
+ Content = new Button { Text = "Close", Command = new Command (() => Navigation.PopModalAsync ()) };
+
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2659.xaml b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2659.xaml
new file mode 100644
index 00000000..05e2b4dc
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2659.xaml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+ x:Class="Xamarin.Forms.Controls.Issue2659">
+ <ContentPage.Resources>
+ <ResourceDictionary>
+ <Style x:Key="buttonStyle" TargetType="Button">
+ <Setter Property="HorizontalOptions" Value="Center" />
+ <Setter Property="VerticalOptions" Value="CenterAndExpand" />
+ <Setter Property="FontSize" Value="Large" />
+ <Setter Property="TextColor" Value="Blue" />
+ <Setter Property="FontAttributes" Value="Italic" />
+ </Style>
+ </ResourceDictionary>
+ </ContentPage.Resources>
+
+ <StackLayout x:Name="stackLayout">
+ <Button Text="Set Style from Resource"
+ Clicked="OnSetStyleButtonClicked"
+ x:Name="button0"/>
+
+ <Button Text="Set Style to null"
+ Clicked="OnUnsetStyleButtonClicked"
+ x:Name="button1"/>
+
+ <Button Text="Set Local Properties"
+ Clicked="OnSetLocalButtonClicked"
+ x:Name="button2"/>
+
+ <Button Text="Clear Local Properties"
+ Clicked="OnClearLocalButtonClicked"
+ x:Name="button3"/>
+ </StackLayout>
+</ContentPage> \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2659.xaml.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2659.xaml.cs
new file mode 100644
index 00000000..e1d36f72
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2659.xaml.cs
@@ -0,0 +1,64 @@
+using System;
+using System.Collections.Generic;
+
+using Xamarin.Forms;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+#if APP
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 2659, "", PlatformAffected.Android | PlatformAffected.iOS)]
+ public partial class Issue2659 : ContentPage
+ {
+ public Issue2659 ()
+ {
+ try {
+ InitializeComponent ();
+ }catch (Exception e){
+ System.Diagnostics.Debug.WriteLine (e.Message);
+ }
+ }
+
+ internal void OnSetStyleButtonClicked(object sender, EventArgs args)
+ {
+ Style style = (Style)Resources["buttonStyle"];
+ SetButtonStyle(style);
+ }
+
+ internal void OnUnsetStyleButtonClicked(object sender, EventArgs args)
+ {
+ SetButtonStyle (null);
+ }
+
+ internal void OnSetLocalButtonClicked(object sender, EventArgs args)
+ {
+ EnumerateButtons ((Button button) => {
+ button.TextColor = Color.Red;
+ button.FontAttributes = FontAttributes.Bold;
+ });
+ }
+
+ internal void OnClearLocalButtonClicked(object sender, EventArgs args)
+ {
+ EnumerateButtons ((Button button) => {
+ button.ClearValue (Button.TextColorProperty);
+ button.ClearValue (Button.FontAttributesProperty);
+ });
+ }
+
+ void SetButtonStyle(Style style)
+ {
+ EnumerateButtons (button => {
+ button.Style = style;
+ });
+ }
+
+ void EnumerateButtons(Action<Button> action)
+ {
+ foreach (View view in stackLayout.Children)
+ action ((Button)view);
+ }
+ }
+#endif
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2775.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2775.cs
new file mode 100644
index 00000000..f0ea174a
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2775.cs
@@ -0,0 +1,116 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+using System.Collections.Generic;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 2775, "ViewCell background conflicts with ListView Semi-Transparent and Transparent backgrounds")]
+ public class Issue2775 : TestContentPage // or TestMasterDetailPage, etc ...
+ {
+ protected override void Init ()
+ {
+ var list = new ListView {
+ ItemsSource = GetList ("Normal BG Blue"),
+ BackgroundColor = Color.Blue,
+ ItemTemplate = new DataTemplate (typeof(NormalCell))
+ };
+
+ var listTransparent = new ListView {
+ ItemsSource = GetList ("Normal BG Transparent"),
+ BackgroundColor = Color.Transparent,
+ ItemTemplate = new DataTemplate (typeof(NormalCell))
+ };
+
+ var listSemiTransparent = new ListView {
+ ItemsSource = GetList ("Normal BG SEMI Transparent"),
+ BackgroundColor = Color.FromHex("#801B2A39"),
+ ItemTemplate = new DataTemplate (typeof(NormalCell))
+ };
+
+ var listContextActions = new ListView {
+ ItemsSource = GetList ("ContextActions BG PINK"),
+ BackgroundColor = Color.Pink,
+ ItemTemplate = new DataTemplate (typeof(ContextActionsCell))
+ };
+
+ var listContextActionsTransparent = new ListView {
+ ItemsSource = GetList ("ContextActions BG Transparent"),
+ BackgroundColor = Color.Transparent,
+ ItemTemplate = new DataTemplate (typeof(ContextActionsCell))
+ };
+
+ var listContextActionsSemiTransparent = new ListView {
+ ItemsSource = GetList ("ContextActions BG Semi Transparent"),
+ BackgroundColor = Color.FromHex("#801B2A39"),
+ ItemTemplate = new DataTemplate (typeof(ContextActionsCell))
+ };
+
+ Content = new StackLayout {
+ Children = {
+ list,
+ listTransparent,
+ listSemiTransparent,
+ listContextActions,
+ listContextActionsTransparent,
+ listContextActionsSemiTransparent
+ },
+ BackgroundColor = Color.Red
+ };
+ }
+
+ [Preserve (AllMembers = true)]
+ internal class ContextActionsCell : ViewCell
+ {
+ public ContextActionsCell ()
+ {
+ ContextActions.Add (new MenuItem{ Text = "action" });
+ var label = new Label ();
+ label.SetBinding (Label.TextProperty, "Name");
+ View = label;
+ }
+ }
+
+ [Preserve (AllMembers = true)]
+ internal class NormalCell : ViewCell
+ {
+ public NormalCell ()
+ {
+ var label = new Label ();
+ label.SetBinding (Label.TextProperty, "Name");
+ View = label;
+ }
+ }
+
+ List<ListItemViewModel> GetList (string description)
+ {
+ var itemList = new List<ListItemViewModel> ();
+ for (var i = 1; i < 3; i++) {
+ itemList.Add (new ListItemViewModel () { Name = description });
+ }
+ return itemList;
+ }
+
+ [Preserve (AllMembers = true)]
+ public class ListItemViewModel
+ {
+ public string Name { get; set; }
+ }
+
+#if UITEST
+ [Test]
+ public void Issue2775Test ()
+ {
+ RunningApp.Screenshot ("I am at Issue 2775");
+ //RunningApp.WaitForElement (q => q.Marked ("IssuePageLabel"));
+ RunningApp.Screenshot ("I see the Label");
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2777.xaml b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2777.xaml
new file mode 100644
index 00000000..b5959511
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2777.xaml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<local:TestContentPage xmlns="http://xamarin.com/schemas/2014/forms"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+ xmlns:local="clr-namespace:Xamarin.Forms.Controls"
+ x:Class="Xamarin.Forms.Controls.Issue2777">
+ <local:TestContentPage.Content>
+ <ListView x:Name="itemListView" IsGroupingEnabled="true" ItemTapped="OnItemTapped">
+ <ListView.GroupHeaderTemplate>
+ <DataTemplate>
+ <ViewCell>
+ <Label Text="{Binding LongTitle}" TextColor="Blue" />
+ </ViewCell>
+ </DataTemplate>
+ </ListView.GroupHeaderTemplate>
+ <ListView.ItemTemplate>
+ <DataTemplate>
+ <TextCell Text="{Binding Name}">
+ </TextCell>
+ </DataTemplate>
+ </ListView.ItemTemplate>
+ </ListView>
+ </local:TestContentPage.Content>
+</local:TestContentPage> \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2777.xaml.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2777.xaml.cs
new file mode 100644
index 00000000..545600c1
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2777.xaml.cs
@@ -0,0 +1,132 @@
+using System;
+using System.Collections.Generic;
+using Xamarin.Forms;
+using System.Collections.ObjectModel;
+using System.Linq;
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 2777, "When add GroupHeaderTemplate in XAML the group header does not show up")]
+ public partial class Issue2777 : TestContentPage
+ {
+ public Issue2777 ()
+ {
+ #if APP
+ InitializeComponent ();
+ var list = SetupList ();
+ itemListView.ItemsSource = list;
+ #endif
+
+ }
+
+ protected override void Init ()
+ {
+
+ }
+
+ internal void OnItemTapped (object sender, ItemTappedEventArgs ea)
+ {
+ var listItem = (ListItemValue)ea.Item;
+ DisplayAlert (listItem.Name, "You tapped " + listItem.Name, "OK", "Cancel");
+ }
+
+ ObservableCollection<ListItemCollection> SetupList ()
+ {
+ var allListItemGroups = new ObservableCollection<ListItemCollection> ();
+
+ foreach (var item in ListItemCollection.GetSortedData()) {
+ // Attempt to find any existing groups where theg group title matches the first char of our ListItem's name.
+ var listItemGroup = allListItemGroups.FirstOrDefault (g => g.Title == item.Label);
+
+ // If the list group does not exist, we create it.
+ if (listItemGroup == null) {
+ listItemGroup = new ListItemCollection (item.Label);
+ listItemGroup.Add (item);
+ allListItemGroups.Add (listItemGroup);
+ } else { // If the group does exist, we simply add the demo to the existing group.
+ listItemGroup.Add (item);
+ }
+ }
+ return allListItemGroups;
+ }
+
+ // Represents a group of items in our list.
+ [Preserve (AllMembers = true)]
+ public class ListItemCollection : ObservableCollection<ListItemValue>
+ {
+ public string Title { get; private set; }
+
+ public string LongTitle { get { return "The letter " + Title; } }
+
+ public ListItemCollection (string title)
+ {
+ Title = title;
+ }
+
+ public static List<ListItemValue> GetSortedData ()
+ {
+ var items = ListItems;
+ items.Sort ();
+ return items;
+ }
+
+ // Data used to populate our list.
+ static readonly List<ListItemValue> ListItems = new List<ListItemValue> () {
+ new ListItemValue ("Babbage"),
+ new ListItemValue ("Boole"),
+ new ListItemValue ("Berners-Lee"),
+ new ListItemValue ("Atanasoff"),
+ new ListItemValue ("Allen"),
+ new ListItemValue ("Cormack"),
+ new ListItemValue ("Cray"),
+ new ListItemValue ("Dijkstra"),
+ new ListItemValue ("Dix"),
+ new ListItemValue ("Dewey"),
+ new ListItemValue ("Erdős"),
+ };
+ }
+
+ // Represents one item in our list.
+ [Preserve (AllMembers = true)]
+ public class ListItemValue : IComparable<ListItemValue>
+ {
+ public string Name { get; private set; }
+
+
+ public ListItemValue (string name)
+ {
+ Name = name;
+ }
+
+ int IComparable<ListItemValue>.CompareTo (ListItemValue value)
+ {
+ return Name.CompareTo (value.Name);
+ }
+
+ public string Label {
+ get {
+ return Name [0].ToString ();
+ }
+ }
+ }
+
+
+ #if UITEST
+ [Test]
+ public void Issue2777Test ()
+ {
+ RunningApp.Screenshot ("I am at Issue 2965");
+ RunningApp.WaitForElement (q => q.Marked ("The letter A"));
+ }
+ #endif
+ }
+}
+
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2783.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2783.cs
new file mode 100644
index 00000000..5ff83c1c
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2783.cs
@@ -0,0 +1,36 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 2783, "MemoryLeak in FrameRenderer", PlatformAffected.Android, NavigationBehavior.PushModalAsync)]
+ public class Issue2783 : ContentPage
+ {
+ public Issue2783 ()
+ {
+ Frame frPatientInfo = new Frame
+ {
+ OutlineColor = Color.Black,
+ BackgroundColor = Color.White,
+ HasShadow = true,
+ HorizontalOptions = LayoutOptions.Center,
+ VerticalOptions = LayoutOptions.Center,
+ Padding = 5,
+ Content = new AbsoluteLayout {
+ BackgroundColor = Color.Red,
+ HeightRequest = 1000,
+ WidthRequest = 2000,
+ }
+ };
+
+ Content = frPatientInfo;
+
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2794.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2794.cs
new file mode 100644
index 00000000..6eaf2b45
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2794.cs
@@ -0,0 +1,48 @@
+using Xamarin.Forms;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 2794, "TableView does not react on underlying collection change", PlatformAffected.Android)]
+ public class Issue2794 : ContentPage
+ {
+ TableSection _dataSection;
+
+ public Issue2794 ()
+ {
+
+ var tableView = new TableView ();
+ _dataSection = new TableSection ();
+ var cell1 = new TextCell { Text = "Cell1" };
+ cell1.ContextActions.Add (new MenuItem {
+ Text = "Delete me after",
+ IsDestructive = true,
+ Command = new Command (Delete),
+ CommandParameter = 0
+ });
+
+ var cell2 = new TextCell { Text = "Cell2" };
+ cell2.ContextActions.Add (new MenuItem {
+ Text = "Delete me first",
+ IsDestructive = true,
+ Command = new Command (Delete),
+ CommandParameter = 1
+ });
+
+ _dataSection.Add (cell1);
+ _dataSection.Add (cell2);
+ tableView.Root.Add (_dataSection);
+
+ Content = tableView;
+ }
+
+ protected void Delete(object parameters)
+ {
+ int rowId = (int)parameters;
+ _dataSection.RemoveAt (rowId);
+ }
+ }
+}
+
+
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2809.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2809.cs
new file mode 100644
index 00000000..44746217
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2809.cs
@@ -0,0 +1,50 @@
+using System;
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using NUnit.Framework;
+using Xamarin.UITest;
+using Xamarin.UITest.Android;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 2809, "Secondary ToolbarItems cause app to hang during PushAsync", PlatformAffected.iOS)]
+ public class Issue2809: TestContentPage
+ {
+ protected override void Init ()
+ {
+ ToolbarItems.Add(new ToolbarItem("Item 1", string.Empty,
+ DummyAction, ToolbarItemOrder.Secondary));
+
+ ToolbarItems.Add(new ToolbarItem("Item 2", string.Empty,
+ DummyAction, ToolbarItemOrder.Secondary));
+ }
+
+ public void DummyAction()
+ {
+ }
+
+#if UITEST
+ [Test]
+ public void TestPageDoesntCrash ()
+ {
+ ShouldShowMenu();
+ RunningApp.Tap (c => c.Marked ("Item 1"));
+ RunningApp.Screenshot ("Didn't crash");
+ }
+
+ void ShouldShowMenu ()
+ {
+ if (RunningApp is AndroidApp) {
+ //show secondary menu
+ RunningApp.Tap (c => c.Class ("android.support.v7.widget.ActionMenuPresenter$OverflowMenuButton"));
+ }
+ }
+
+#endif
+
+ }
+}
+
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2883.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2883.cs
new file mode 100644
index 00000000..12ed2006
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2883.cs
@@ -0,0 +1,125 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+using System.Collections.Generic;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+using Xamarin.UITest.iOS;
+
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 2883, "ViewCell IsEnabled set to false does not disable a cell in a TableView")]
+ public class Issue2883 : TestContentPage
+ {
+ protected override void Init ()
+ {
+ var btnCustom1 = new Button () {
+ AutomationId = "btnCustomCellTable",
+ Text = "Custom Table Cell" ,
+ HorizontalOptions = LayoutOptions.Start
+ };
+ var btnCustom1Enabled = new Button () {
+ AutomationId = "btnCustomCellTableEnabled",
+ Text = "Custom Table Cell Enabled" ,
+ HorizontalOptions = LayoutOptions.Start
+ };
+
+ var btnCustom = new Button () {
+ AutomationId = "btnCustomCellListView",
+ Text = "Custom Cell" ,
+ HorizontalOptions = LayoutOptions.Start
+ };
+
+ var btnCustomEnabled = new Button () {
+ AutomationId = "btnCustomCellListViewEnabled",
+ Text = "Custom Cell Enabled" ,
+ HorizontalOptions = LayoutOptions.Start
+ };
+
+ btnCustom.Clicked += (object sender, EventArgs e) => {
+ DisplayAlert ("Clicked", "I was clicked even disabled", "ok");
+ };
+ btnCustom1.Clicked += (object sender, EventArgs e) => {
+ DisplayAlert ("Clicked", "I was clicked even disabled", "ok");
+ };
+
+ btnCustom1Enabled.Clicked += (object sender, EventArgs e) => {
+ DisplayAlert ("Clicked", "I was clicked", "ok");
+ };
+ btnCustomEnabled.Clicked += (object sender, EventArgs e) => {
+ DisplayAlert ("Clicked", "I was clicked", "ok");
+ };
+
+ var customCell = new ViewCell () {
+ IsEnabled = false,
+ View = new StackLayout { Children = { btnCustom } }
+ };
+
+ var customCellEnabled = new ViewCell () {
+ View = new StackLayout { Children = { btnCustomEnabled } }
+ };
+
+ var customTableCell = new ViewCell () {
+ IsEnabled = false,
+ View = new StackLayout { Children = { btnCustom1 } }
+ };
+
+ var customTableCellEnabled = new ViewCell () {
+ View = new StackLayout { Children = { btnCustom1Enabled } }
+ };
+
+ var tableview = new TableView () {
+ Intent = TableIntent.Form,
+ Root = new TableRoot (),
+ VerticalOptions = LayoutOptions.Start
+ };
+
+ tableview.Root.Add (new TableSection () { customTableCell, customTableCellEnabled });
+
+ var listview = new ListView { VerticalOptions = LayoutOptions.Start };
+ var listview2 = new ListView { VerticalOptions = LayoutOptions.Start };
+
+ listview.ItemTemplate = new DataTemplate (() => customCell);
+ listview2.ItemTemplate = new DataTemplate (() => customCellEnabled);
+ listview2.ItemsSource = listview.ItemsSource = new List<string> () { "1" };
+
+ Content = new StackLayout {
+ Orientation = StackOrientation.Vertical,
+ VerticalOptions = LayoutOptions.Start,
+ Children = { tableview, listview, listview2 }
+ };
+ }
+
+ #if UITEST
+ [Test]
+ public void Issue2883TestDisabled ()
+ {
+ RunningApp.Screenshot ("I am at Issue 2883");
+ RunningApp.Tap( c=> c.Marked("btnCustomCellTable"));
+ RunningApp.WaitForNoElement( c=> c.Marked("Clicked"));
+ RunningApp.Screenshot ("I dont see the disable cell");
+ RunningApp.Tap( c=> c.Marked("btnCustomCellListView"));
+ RunningApp.WaitForNoElement( c=> c.Marked("Clicked"));
+ RunningApp.Screenshot ("I dont see the disable cell");
+ }
+
+ [Test]
+ public void Issue2883TestEnabled ()
+ {
+
+ RunningApp.Tap( c=> c.Marked("btnCustomCellTableEnabled"));
+ RunningApp.Screenshot ("I see the cell that is enabled");
+ RunningApp.WaitForElement( c=> c.Marked("Clicked"));
+ RunningApp.Tap (c => c.Marked ("ok"));
+ RunningApp.Tap( c=> c.Marked("btnCustomCellListViewEnabled"));
+ RunningApp.WaitForElement( c=> c.Marked("Clicked"));
+ RunningApp.Tap (c => c.Marked ("ok"));
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2923.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2923.cs
new file mode 100644
index 00000000..68768459
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2923.cs
@@ -0,0 +1,83 @@
+using System.Collections.ObjectModel;
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 2923, "First tab does not load until navigating", PlatformAffected.WinRT)]
+ public class Issue2923 : TestTabbedPage
+ {
+ protected override void Init()
+ {
+ var tabOne = new ContentPage {
+ Title = "Page One",
+ BackgroundColor = Color.Blue,
+ };
+
+ var tabTwo = new ContentPage {
+ Title = "Page Two",
+ BackgroundColor = Color.Red,
+ Content = new Label {
+ AutomationId = "SecondPageLabel",
+ Text = "Second Page"
+ }
+ };
+
+ var buttonResetTabbedPage = new Button {
+ Text = "Reset",
+ AutomationId = "ResetButton",
+ Command = new Command (() => {
+
+ Children.Remove (tabOne);
+ Children.Remove (tabTwo);
+
+ Children.Add (new ContentPage {
+ Title = "Reset page",
+ BackgroundColor = Color.Green,
+ Content = new Label {
+ AutomationId = "ResetPageLabel",
+ Text = "I was reset"
+ }
+ });
+
+ })
+ };
+
+ tabOne.Content = new StackLayout {
+ Children = {
+ new Label {
+ AutomationId = "FirstPageLabel",
+ Text = "First Page"
+ },
+ buttonResetTabbedPage
+ }
+ };
+
+ Children.Add (tabOne);
+ Children.Add (tabTwo);
+ }
+
+#if UITEST
+ [Test]
+ public void Issue2923TestOne ()
+ {
+ RunningApp.WaitForElement (q => q.Marked ("FirstPageLabel"));
+ RunningApp.Screenshot ("First Tab is showing");
+ }
+
+ [Test]
+ public void Issue2923TestTwo ()
+ {
+ RunningApp.Tap (q => q.Marked ("ResetButton"));
+ RunningApp.Screenshot ("Tabs Reset");
+ RunningApp.WaitForElement (q => q.Marked ("ResetPageLabel"));
+ }
+#endif
+
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2927.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2927.cs
new file mode 100644
index 00000000..02db4696
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2927.cs
@@ -0,0 +1,105 @@
+using System;
+using System.ComponentModel;
+using Xamarin.Forms.Controls;
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 2927, "ListView item tapped not firing multiple times")]
+ public class Issue2927 : TestContentPage // or TestMasterDetailPage, etc .
+ {
+ [Preserve (AllMembers = true)]
+ public class Issue2927Cell : TextCell, INotifyPropertyChanged
+ {
+ int _numberOfTimesTapped;
+ string _text;
+ string _cellId;
+
+ public Issue2927Cell (string id)
+ {
+ _cellId = id;
+ NumberOfTimesTapped = 0;
+ }
+
+ void OnPropertyChanged (string prop)
+ {
+ var handler = PropertyChanged;
+ if (handler != null) {
+ handler(this, new PropertyChangedEventArgs(prop));
+ }
+ }
+
+ public int NumberOfTimesTapped
+ {
+ get { return _numberOfTimesTapped; }
+ set {
+ _numberOfTimesTapped = value;
+ Text = _cellId + " " + _numberOfTimesTapped.ToString ();
+ }
+ }
+
+ public string Text {
+ get { return _text; }
+ set {
+ _text = value;
+ OnPropertyChanged ("Text");
+ }
+ }
+
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ }
+
+ protected override void Init ()
+ {
+ var cells = new[] {
+ new Issue2927Cell ("Cell1"),
+ new Issue2927Cell ("Cell2"),
+ new Issue2927Cell ("Cell3"),
+ };
+
+ BindingContext = cells;
+ var template = new DataTemplate (typeof (TextCell));
+ template.SetBinding (TextCell.TextProperty, "Text");
+
+ var listView = new ListView {
+ ItemTemplate = template,
+ ItemsSource = cells
+ };
+
+ listView.ItemTapped += (s, e) => {
+ var obj = (Issue2927Cell)e.Item;
+ obj.NumberOfTimesTapped += 1;
+ };
+
+ Content = listView;
+ }
+
+#if UITEST
+ [Test]
+ public void Issue2927Test ()
+ {
+ RunningApp.Screenshot ("I am at Issue 2927");
+ RunningApp.WaitForElement (q => q.Marked ("Cell1 0"));
+ RunningApp.Tap (q => q.Marked ("Cell1 0"));
+ RunningApp.WaitForElement (q => q.Marked ("Cell1 1"));
+ RunningApp.Screenshot ("Tapped Once");
+ RunningApp.Tap (q => q.Marked ("Cell1 1"));
+ RunningApp.WaitForElement (q => q.Marked ("Cell1 2"));
+ RunningApp.Screenshot ("Tapped Twice");
+ RunningApp.Tap (q => q.Marked ("Cell3 0"));
+ RunningApp.WaitForElement (q => q.Marked ("Cell3 1"));
+ RunningApp.Screenshot ("Click other cell");
+ RunningApp.Tap (q => q.Marked ("Cell1 2"));
+ RunningApp.WaitForElement (q => q.Marked ("Cell1 3"));
+ RunningApp.Screenshot ("Click first cell again");
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2948.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2948.cs
new file mode 100644
index 00000000..b763c9e7
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2948.cs
@@ -0,0 +1,232 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+using System.Collections.Generic;
+using System.Threading;
+
+#if UITEST
+using Xamarin.UITest;
+using Xamarin.UITest.iOS;
+using Xamarin.UITest.Android;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 2948, "MasterDetailPage Detail is interactive even when Master is open when in Landscape")]
+ public class Issue2948 : TestMasterDetailPage
+ {
+ static MasterDetailPage s_mdp;
+
+ protected override void Init ()
+ {
+ s_mdp = this;
+ var menuPage = new MenuPage ();
+
+ menuPage.Menu.ItemSelected += (sender, e) => NavigateTo (e.SelectedItem as MenuItem);
+
+ Master = menuPage;
+ Detail = new NavigationPage (new ContractsPage ());
+ }
+
+ [Preserve (AllMembers = true)]
+ public class MenuListData : List<MenuItem>
+ {
+ public MenuListData ()
+ {
+ Add (new MenuItem () {
+ Title = "Contracts",
+ IconSource = "bank.png",
+ TargetType = typeof(ContractsPage)
+ });
+
+ Add (new MenuItem () {
+ Title = "Leads",
+ IconSource = "bank.png",
+ TargetType = typeof(ContractsPage)
+ });
+
+ Add (new MenuItem () {
+ Title = "Accounts",
+ IconSource = "bank.png",
+ TargetType = typeof(ContractsPage)
+ });
+
+ Add (new MenuItem () {
+ Title = "Opportunities",
+ IconSource = "bank.png",
+ TargetType = typeof(ContractsPage)
+ });
+ }
+ }
+
+ [Preserve (AllMembers = true)]
+ public class ContractsPage : ContentPage
+ {
+ public ContractsPage ()
+ {
+ Title = "Contracts";
+ Icon = "bank.png";
+
+ var grid = new Grid();
+ grid.ColumnDefinitions.Add(new ColumnDefinition());
+ grid.ColumnDefinitions.Add(new ColumnDefinition());
+
+ var btn = new Button {
+ HeightRequest = 300,
+ HorizontalOptions = LayoutOptions.End,
+ BackgroundColor = Color.Pink,
+ AutomationId = "btnOnDetail"
+ };
+
+ btn.Clicked+= (object sender, EventArgs e) => {
+ DisplayAlert("Clicked","I was clicked","Ok");
+ };
+
+ Grid.SetColumn(btn,1);
+
+ grid.Children.Add(btn);
+
+ var showMasterButton = new Button {
+ AutomationId = "ShowMasterBtn",
+ Text = "Show Master"
+ };
+ showMasterButton.Clicked += (sender, e) => {
+ s_mdp.IsPresented = true;
+ };
+
+ Content = new ScrollView {
+
+ Content = new StackLayout {
+ Children = {
+ showMasterButton,
+ grid,
+ new BoxView {
+ HeightRequest = 100,
+ Color = Color.Red,
+ },
+ new BoxView {
+ HeightRequest = 200,
+ Color = Color.Green,
+ },
+ new BoxView {
+ HeightRequest = 300,
+ Color = Color.Red,
+ },
+ new BoxView {
+ HeightRequest = 400,
+ Color = Color.Green,
+ },
+ new BoxView {
+ HeightRequest = 500,
+ Color = Color.Red,
+ }
+ }
+ },
+
+ };
+ }
+ }
+
+ [Preserve (AllMembers = true)]
+ public class MenuListView : ListView
+ {
+ public MenuListView ()
+ {
+ List<MenuItem> data = new MenuListData ();
+
+ ItemsSource = data;
+ VerticalOptions = LayoutOptions.FillAndExpand;
+ BackgroundColor = Color.Transparent;
+
+ var cell = new DataTemplate (typeof(ImageCell));
+ cell.SetBinding (TextCell.TextProperty, "Title");
+ cell.SetBinding (ImageCell.ImageSourceProperty, "IconSource");
+
+ ItemTemplate = cell;
+ SelectedItem = data [0];
+ }
+ }
+
+ public class MenuPage : ContentPage
+ {
+ public ListView Menu { get; set; }
+
+ public MenuPage ()
+ {
+ Title = "Menu";
+ BackgroundColor = Color.FromHex ("333333");
+
+ Menu = new MenuListView ();
+
+ var menuLabel = new ContentView {
+ Padding = new Thickness (10, 36, 0, 5),
+ Content = new Label {
+ TextColor = Color.FromHex ("AAAAAA"),
+ Text = "MENU",
+ }
+ };
+
+ var layout = new StackLayout {
+ Spacing = 0,
+ VerticalOptions = LayoutOptions.FillAndExpand
+ };
+ layout.Children.Add (menuLabel);
+ layout.Children.Add (Menu);
+
+ Content = layout;
+ }
+ }
+
+ void NavigateTo (MenuItem menu)
+ {
+ var displayPage = (Page)Activator.CreateInstance (menu.TargetType);
+
+ Detail = new NavigationPage (displayPage);
+
+ }
+
+ [Preserve (AllMembers = true)]
+ public class MenuItem
+ {
+ public string Title { get; set; }
+
+ public string IconSource { get; set; }
+
+ public Type TargetType { get; set; }
+ }
+
+#if UITEST
+ [Test]
+ public void Issue2948Test ()
+ {
+ RunningApp.Screenshot ("I am at Issue 2948");
+ RunningApp.SetOrientationLandscape ();
+ Thread.Sleep (5000);
+ if (ShouldRunTest ()) {
+ OpenMDP ();
+ var btns = RunningApp.Query (c => c.Marked ("btnOnDetail"));
+ if (btns.Length > 0) {
+ // on iOS the button could be out of screen
+ RunningApp.Tap (c => c.Marked ("btnOnDetail"));
+ RunningApp.Screenshot ("I in landscape and master is open");
+ }
+ RunningApp.WaitForNoElement (c => c.Marked ("Clicked"),"Time out",new TimeSpan(0,0,1));
+ }
+ }
+
+ public bool ShouldRunTest() {
+ var isMasterVisible = RunningApp.Query (q => q.Marked ("Leads")).Length > 0;
+ return !isMasterVisible;
+ }
+ public void OpenMDP() {
+ if (RunningApp is iOSApp) {
+ RunningApp.Tap (q => q.Marked ("Menu"));
+ } else {
+ RunningApp.Tap ("ShowMasterBtn");
+ }
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2951.xaml b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2951.xaml
new file mode 100644
index 00000000..a4942512
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2951.xaml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<controls:TestContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:controls="clr-namespace:Xamarin.Forms.Controls;assembly=Xamarin.Forms.Controls" x:Name="ThePageIssue2951" x:Class="Xamarin.Forms.Controls.Issue2951">
+ <controls:TestContentPage.Resources>
+ <ResourceDictionary>
+ <Style x:Key="ButtonStyle" TargetType="Button">
+ <Setter Property="BackgroundColor" Value="Silver" />
+ <Setter Property="TextColor" Value="Black" />
+ <Style.Triggers>
+ <Trigger Property="controls:ButtonExtensions.IsPrimary" Value="True" TargetType="Button">
+ <Setter Property="BackgroundColor" Value="#FAC54A" />
+ </Trigger>
+ </Style.Triggers>
+ </Style>
+ <Style x:Key="ChangeStatusButton" TargetType="Button" BasedOn="{StaticResource ButtonStyle}">
+ <Setter Property="controls:ButtonExtensions.IsPrimary" Value="False" />
+ <Setter Property="Text" Value="A" />
+ <Setter Property="Command" Value="{Binding Source={x:Reference ThePageIssue2951},Path=BindingContext.ButtonTapped}" />
+ <Setter Property="CommandParameter" Value="{Binding .}" />
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding IsStarted}" Value="True" TargetType="Button">
+ <Setter Property="controls:ButtonExtensions.IsPrimary" Value="True" />
+ <Setter Property="Text" Value="B" />
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ <DataTemplate x:Key="TheItemTemplate">
+ <ViewCell>
+ <ViewCell.View>
+ <Grid Padding="12,5" RowSpacing="4">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="*" />
+ <ColumnDefinition Width="75" />
+ </Grid.ColumnDefinitions>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="*" />
+ </Grid.RowDefinitions>
+ <Label Grid.Column="0" Text="{Binding Name}" TextColor="Yellow" />
+ <Button AutomationId="btnChangeStatus" Grid.Column="1" Style="{StaticResource ChangeStatusButton}" />
+ </Grid>
+ </ViewCell.View>
+ </ViewCell>
+ </DataTemplate>
+ </ResourceDictionary>
+ </controls:TestContentPage.Resources>
+ <controls:TestContentPage.Content>
+ <ListView ItemTemplate="{StaticResource TheItemTemplate}" ItemsSource="{Binding Items}" RowHeight="74" />
+ </controls:TestContentPage.Content>
+</controls:TestContentPage> \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2951.xaml.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2951.xaml.cs
new file mode 100644
index 00000000..fb4b75ea
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2951.xaml.cs
@@ -0,0 +1,140 @@
+using System;
+using System.Collections.Generic;
+using Xamarin.Forms;
+using Xamarin.Forms.CustomAttributes;
+using System.Collections.ObjectModel;
+using System.ComponentModel;
+#if UITEST
+using Xamarin.UITest.Queries;
+using NUnit.Framework;
+#endif
+
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 2951, "On Android, button background is not updated when color changes ")]
+ public partial class Issue2951 : TestContentPage
+ {
+ public Issue2951 ()
+ {
+ #if APP
+ InitializeComponent ();
+ #endif
+ }
+
+ protected override void Init ()
+ {
+ BindingContext = new MyViewModel ();
+ }
+
+ [Preserve (AllMembers = true)]
+ public class MyViewModel
+ {
+ public ObservableCollection<MyItemViewModel> Items { get; private set; }
+
+ public Command<MyItemViewModel> ButtonTapped { get; private set; }
+
+ public MyViewModel ()
+ {
+ ButtonTapped = new Command<MyItemViewModel> (OnItemTapped);
+
+ Items = new ObservableCollection<MyItemViewModel> ();
+
+ Items.Add (new MyItemViewModel { Name = "A", IsStarted = false });
+ Items.Add (new MyItemViewModel { Name = "B", IsStarted = false });
+ Items.Add (new MyItemViewModel { Name = "C", IsStarted = false });
+ }
+
+ void OnItemTapped (MyItemViewModel model)
+ {
+ if (model.IsStarted) {
+ Items.Remove (model);
+ } else {
+ model.IsStarted = true;
+ }
+ }
+ }
+
+ [Preserve (AllMembers = true)]
+ public class MyItemViewModel : INotifyPropertyChanged
+ {
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ string _name;
+
+ public string Name {
+ get { return _name; }
+ set {
+ _name = value;
+ OnPropertyChanged ("Name");
+ }
+ }
+
+ bool _isStarted;
+
+ public bool IsStarted {
+ get { return _isStarted; }
+ set {
+ _isStarted = value;
+ OnPropertyChanged ("IsStarted");
+ }
+ }
+
+ void OnPropertyChanged (string propertyName)
+ {
+ if (PropertyChanged != null) {
+ PropertyChanged (this, new PropertyChangedEventArgs (propertyName));
+ }
+ }
+ }
+
+ #if UITEST
+ [Test]
+ public void Issue2951Test ()
+ {
+ var bt = RunningApp.WaitForElement (c => c.Marked ("btnChangeStatus"));
+ var buttons = RunningApp.Query (c => c.Marked ("btnChangeStatus"));
+ Assert.That (buttons.Length, Is.EqualTo (3));
+ RunningApp.Tap(c => c.Marked ("btnChangeStatus").Index(1));
+ buttons = RunningApp.Query (c => c.Marked ("btnChangeStatus"));
+ var text = buttons [1].Text ?? buttons [1].Label;
+ Assert.That (text, Is.EqualTo ("B"));
+ RunningApp.Tap(c => c.Marked ("btnChangeStatus").Index(1));
+ buttons = RunningApp.Query (c => c.Marked ("btnChangeStatus"));
+ Assert.That (buttons.Length, Is.EqualTo (2));
+ //TODO: we should check the color of the button
+ //var buttonTextColor = GetProperty<Color> ("btnChangeStatus", Button.BackgroundColorProperty);
+ //Assert.AreEqual (Color.Pink, buttonTextColor);
+ }
+
+
+ #endif
+ }
+
+
+
+
+ [Preserve (AllMembers = true)]
+ public class ButtonExtensions
+ {
+ public static readonly BindableProperty IsPrimaryProperty = BindableProperty.CreateAttached<ButtonExtensions, bool> (
+ bindable => GetIsPrimary (bindable),
+ false,
+ BindingMode.TwoWay,
+ null,
+ null,
+ null,
+ null);
+
+ public static bool GetIsPrimary (BindableObject bo)
+ {
+ return (bool)bo.GetValue (IsPrimaryProperty);
+ }
+
+ public static void SetIsPrimary (BindableObject bo, bool value)
+ {
+ bo.SetValue (IsPrimaryProperty, value);
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2953.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2953.cs
new file mode 100644
index 00000000..28aed46e
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2953.cs
@@ -0,0 +1,89 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+using System.Collections.ObjectModel;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 2953, "GroupHeaderCells disappear when item is removed from a group in ListView (iOS only) ")]
+ public class Issue2953 : TestContentPage
+ {
+ protected override void Init ()
+ {
+ var items = new ObservableCollection<GroupedItems> () {
+ new GroupedItems ("Header 1") { "1.1", "1.2", "1.3" },
+ new GroupedItems ("Header 2") { "2.1", "2.2", "2.3" },
+ new GroupedItems ("Header 3") { "3.1", "3.2", "3.3" },
+ new GroupedItems ("Header 4") { "4.1", "4.2", "4.3" },
+ };
+
+ var listview = new ListView {
+ HasUnevenRows = true,
+ IsGroupingEnabled = true
+ };
+
+ listview.GroupHeaderTemplate = new DataTemplate
+ (typeof(HeaderCell));
+ listview.ItemTemplate = new DataTemplate (typeof(ItemCell));
+ listview.ItemsSource = items;
+
+ var btnRemove = new Button () { Text = "Remove", AutomationId="btnRemove" };
+ btnRemove.Clicked += delegate {
+ if (items[1].Count > 0) {
+ items[1].RemoveAt(0);
+ }
+ };
+
+ Content = new StackLayout {
+ Orientation = StackOrientation.Vertical,
+ Children = { listview, btnRemove }
+ };
+ }
+
+ [Preserve (AllMembers = true)]
+ internal class GroupedItems : ObservableCollection<string> {
+ public GroupedItems (string groupName) { GroupName = groupName; }
+ public string GroupName { get; private set; }
+ }
+
+ [Preserve (AllMembers = true)]
+ internal class HeaderCell : ViewCell
+ {
+ public HeaderCell () {
+ Height = 44;
+ var label = new Label { BackgroundColor = Color.Pink };
+ label.SetBinding (Label.TextProperty, "GroupName");
+ View = label;
+ }
+ }
+
+ [Preserve (AllMembers = true)]
+ internal class ItemCell : ViewCell
+ {
+ public ItemCell () {
+ var label = new Label { BackgroundColor = Color.Aqua };
+ label.SetBinding (Label.TextProperty, ".");
+ View = label;
+ }
+ }
+
+#if UITEST
+ [Test]
+ public void Issue2953Test ()
+ {
+ RunningApp.Screenshot ("I am at Issue 2953");
+ RunningApp.WaitForElement (q => q.Marked ("Header 3"));
+ RunningApp.Screenshot ("I see the Header 3");
+ RunningApp.Tap (q => q.Marked ("btnRemove"));
+ RunningApp.WaitForElement (q => q.Marked ("Header 3"));
+ RunningApp.Screenshot ("I still see the Header 3");
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2954.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2954.cs
new file mode 100644
index 00000000..6c645eeb
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2954.cs
@@ -0,0 +1,58 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 2954, "Cell becomes empty after adding a new one with context actions (TableView) ")]
+ public class Issue2954 : TestContentPage // or TestMasterDetailPage, etc ...
+ {
+ TableSection _dataSection;
+ TableView _tableView;
+ int _count = 0;
+ protected override void Init ()
+ {
+ _dataSection = new TableSection {
+ new TextCell{ Text = "Cell1" },
+ new TextCell{ Text = "Cell2", ContextActions = { new MenuItem{ Text = "Delete" } } },
+ new TextCell{ Text = "Add new", Command = new Command (AddNew) }
+ };
+
+ _tableView = new TableView {
+ Root = new TableRoot {
+ _dataSection
+ }
+ };
+
+ Content = _tableView;
+ }
+
+ void AddNew (object parameters)
+ {
+ _count++;
+ _dataSection.Insert (0, new TextCell { Text = "Fresh cell " + _count
+ , ContextActions = { new MenuItem{ Text = "Delete" } }
+ });
+ _tableView.Root = _tableView.Root; //HACK - force table reload
+ }
+
+ #if UITEST
+ [Test]
+ public void Issue2954Test ()
+ {
+ RunningApp.Screenshot ("I am at Issue 2954");
+ RunningApp.WaitForElement (q => q.Marked ("Cell2"));
+ RunningApp.Screenshot ("I see the Cell2");
+ RunningApp.Tap(c => c.Marked("Add new"));
+ RunningApp.WaitForElement (q => q.Marked ("Cell2"));
+ RunningApp.Screenshot ("I still see the Cell2");
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2961.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2961.cs
new file mode 100644
index 00000000..24665ea7
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2961.cs
@@ -0,0 +1,290 @@
+using System;
+using Xamarin.Forms.CustomAttributes;
+using System.ComponentModel;
+using System.Diagnostics;
+
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+using Xamarin.UITest.iOS;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+#if UITEST
+ [Ignore("This test is looking for an invalid behavior; the second tap *should* keep the drawer open.")]
+#endif
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 2961, "MasterDetail NavigationDrawer Does Not Hide On DoubleTap of Item", PlatformAffected.Android)]
+ public class Issue2961 : TestMasterDetailPage
+ {
+ static MasterDetailPage s_mdp;
+
+ SliderMenuItem _selectedMenuItem;
+ SliderMenuPage _slidingPage;
+ ContentPage _displayPage;
+
+ protected override void Init ()
+ {
+ s_mdp = this;
+
+ _slidingPage = new SliderMenuPage {
+ Title = "Menu",
+ BackgroundColor = Color.FromHex ("1e1e1e")
+ };
+ _slidingPage.MenuListView.ItemTapped += (sender, e) => OnMenuSelected (e.Item as SliderMenuItem);
+ Padding = new Thickness (0);
+
+ Master = _slidingPage;
+ OnMenuSelected (_slidingPage.MenuListView.SelectedItem as SliderMenuItem);
+ }
+
+ void OnMenuSelected (SliderMenuItem menu)
+ {
+ Debug.WriteLine (IsPresented);
+
+ IsPresented = false;
+
+ if (menu == null || menu == _selectedMenuItem) {
+ return;
+ }
+ _displayPage = null;
+
+ if (menu.TargetType.Equals (typeof(SignOutPage))) {
+ HandleSignOut ();
+ return;
+ }
+ _displayPage = (ContentPage)Activator.CreateInstance (menu.TargetType);
+ Detail = new NavigationPage (_displayPage);
+
+ if (_selectedMenuItem != null) {
+ _selectedMenuItem.IsSelected = false;
+ }
+
+ _selectedMenuItem = menu;
+ _selectedMenuItem.IsSelected = true;
+ }
+
+ void HandleSignOut ()
+ {
+ DisplayAlert (
+ "",
+ "Do you want to sign out?",
+ "OK",
+ "Cancel"
+ );
+ }
+
+ [Preserve (AllMembers = true)]
+ public class SliderMenuItem: INotifyPropertyChanged
+ {
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ void NotifyPropertyChanged (string info)
+ {
+ if (PropertyChanged != null) {
+ PropertyChanged (this, new PropertyChangedEventArgs (info));
+ }
+ }
+
+ public SliderMenuItem (string title, Type targetType)
+ {
+ Title = title;
+ TargetType = targetType;
+
+ }
+
+ public string Title { get; set; }
+
+ bool _isSelected;
+
+ public bool IsSelected {
+ get{ return _isSelected; }
+ set {
+ if (_isSelected != value) {
+ _isSelected = value;
+ Background = _isSelected ? Color.FromHex ("101010") : Color.Transparent;
+ NotifyPropertyChanged ("Background");
+ }
+ }
+ }
+
+ public Type TargetType { get; set; }
+
+ public Color Background { get; private set; }
+ }
+
+ [Preserve (AllMembers = true)]
+ public class SliderMenuPage: ContentPage
+ {
+ public ListView MenuListView { get; set; }
+
+ public SliderMenuPage ()
+ {
+ var data = GetData ();
+ MenuListView = new ListView {
+ HorizontalOptions = LayoutOptions.StartAndExpand,
+ ItemTemplate = new DataTemplate (typeof(MenuCell)),
+ ItemsSource = data,
+ BackgroundColor = Color.FromHex ("1e1e1e"),
+ };
+
+ MenuListView.SelectedItem = data [0];
+ data [0].IsSelected = true;
+
+ var logoImg = new Image {
+ Source = ImageSource.FromFile ("bank.png"),
+ HorizontalOptions = LayoutOptions.Start,
+ VerticalOptions = LayoutOptions.EndAndExpand
+ };
+ var logoImgWrapper = new StackLayout {
+ Padding = new Thickness (12, 24),
+ HorizontalOptions = LayoutOptions.FillAndExpand,
+ Children = { logoImg }
+ };
+
+ var paddingTop = Device.OnPlatform (40, 2, 2);
+ Content = new StackLayout {
+ Spacing = 0,
+ BackgroundColor = Color.FromHex ("1e1e1e"),
+ Padding = new Thickness (0, paddingTop, 0, 10),
+ VerticalOptions = LayoutOptions.FillAndExpand,
+ HorizontalOptions = LayoutOptions.FillAndExpand,
+ Children = {
+ MenuListView,
+ logoImgWrapper
+ }
+ };
+ }
+
+ SliderMenuItem[] GetData ()
+ {
+ return new [] {
+ new SliderMenuItem ("Home", typeof(HomePage)),
+ new SliderMenuItem ("About", typeof(AboutPage)),
+ new SliderMenuItem ("Sign Out", typeof(SignOutPage))
+ };
+ }
+ }
+
+ [Preserve (AllMembers = true)]
+ public class HomePage : ContentPage
+ {
+
+
+ public HomePage ()
+ {
+ var showMasterButton = new Button {
+ AutomationId = "ShowMasterBtnHome",
+ Text = "Show Master"
+ };
+ showMasterButton.Clicked += (sender, e) => {
+ s_mdp.IsPresented = true;
+ };
+
+ Content = new StackLayout {
+
+ VerticalOptions = LayoutOptions.CenterAndExpand,
+ HorizontalOptions = LayoutOptions.CenterAndExpand,
+ Children = {
+ showMasterButton,
+ new Label {
+ AutomationId = "lblHome",
+ Text = "Sample Home page",
+ XAlign = TextAlignment.Center,
+ YAlign = TextAlignment.Center
+ }
+ }
+ };
+ }
+ }
+
+ [Preserve (AllMembers = true)]
+ public class AboutPage: ContentPage
+ {
+ public AboutPage ()
+ {
+ var showMasterButton = new Button {
+ AutomationId = "ShowMasterBtnAbout",
+ Text = "Show Master"
+ };
+ showMasterButton.Clicked += (sender, e) => {
+ s_mdp.IsPresented = true;
+ };
+
+ Content = new StackLayout {
+ VerticalOptions = LayoutOptions.CenterAndExpand,
+ HorizontalOptions = LayoutOptions.CenterAndExpand,
+ Children = {
+ showMasterButton,
+ new Label {
+ AutomationId = "lblAbout",
+ Text = "Sample About page",
+ XAlign = TextAlignment.Center,
+ YAlign = TextAlignment.Center
+ }
+ }
+ };
+ }
+ }
+
+ [Preserve (AllMembers = true)]
+ public class SignOutPage
+ {
+ public SignOutPage ()
+ {
+ }
+ }
+
+ [Preserve (AllMembers = true)]
+ public class MenuCell: ViewCell
+ {
+ public MenuCell ()
+ {
+ Label textLabel = new Label {
+ FontSize = 18,
+ };
+
+ textLabel.SetBinding (Label.TextProperty, "Title");
+ var root = new StackLayout {
+ Padding = new Thickness (12, 8),
+ Children = { textLabel }
+ };
+ root.SetBinding (BackgroundColorProperty, "Background");
+ View = root;
+ }
+ }
+
+
+ #if UITEST
+ [Test]
+ public void Issue2961Test ()
+ {
+ RunningApp.Screenshot ("I am at Issue 2961");
+ OpenMDP ("ShowMasterBtnHome");
+ RunningApp.Tap (c => c.Marked ("Home"));
+ RunningApp.WaitForElement (c => c.Marked ("lblHome"));
+ OpenMDP ("ShowMasterBtnHome");
+ RunningApp.Tap (c => c.Marked ("About"));
+ RunningApp.WaitForElement (c => c.Marked ("lblAbout"));
+ OpenMDP ("ShowMasterBtnAbout");
+ if(RunningApp is iOSApp)
+ return;
+ RunningApp.DoubleTap (c => c.Marked ("Home"));
+ RunningApp.WaitForElement (c => c.Marked ("lblHome"));
+ RunningApp.Tap (c => c.Marked ("About"));
+ RunningApp.WaitForNoElement (c => c.Marked ("Home"));
+
+ }
+
+ public void OpenMDP(string masterBtnId) {
+ if(RunningApp is iOSApp) {
+ RunningApp.Tap (q => q.Marked("Menu"));
+ } else {
+ RunningApp.Tap (masterBtnId);
+ }
+ }
+ #endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2963.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2963.cs
new file mode 100644
index 00000000..e84a47d1
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2963.cs
@@ -0,0 +1,53 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 2963, "Disabling Editor in iOS does not disable entry of text")]
+ public class Issue2963 : TestContentPage
+ {
+ readonly string _editorId = "DisabledEditor";
+ readonly string _focusedLabelId = "FocusedLabel";
+
+ protected override void Init ()
+ {
+
+ var disabledEditor = new Editor {
+ AutomationId = _editorId,
+ Text = "You should not be able to edit me",
+ IsEnabled = false
+ };
+
+ BindingContext = disabledEditor;
+ var focusedLabel = new Label {
+ AutomationId = _focusedLabelId
+ };
+ focusedLabel.SetBinding (Label.TextProperty, "IsFocused");
+
+ Content = new StackLayout {
+ Children = {
+ disabledEditor,
+ focusedLabel,
+ }
+ };
+ }
+
+#if UITEST
+ [Test]
+ public void Issue2963Test ()
+ {
+ RunningApp.Screenshot ("I am at Issue 2963");
+ RunningApp.Tap (q => q.Marked (_editorId));
+ Assert.AreEqual ("False", RunningApp.Query (q => q.Marked (_focusedLabelId))[0].Text);
+ RunningApp.Screenshot ("Label should still be false");
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2964.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2964.cs
new file mode 100644
index 00000000..e86dad15
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2964.cs
@@ -0,0 +1,101 @@
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using System.Linq;
+
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 2964, "TabbedPage toolbar item crash")]
+ public class Issue2964 : TestMasterDetailPage
+ {
+ public class ModalPage : ContentPage
+ {
+ public ModalPage ()
+ {
+ Content = new Button {
+ AutomationId = "ModalPagePopButton",
+ Text ="Pop Me",
+ Command = new Command (async () => {
+ MessagingCenter.Send (this, "update");
+ await Navigation.PopModalAsync ();
+ })
+ };
+ }
+ }
+
+ public class Page1 : ContentPage
+ {
+ public Page1 ()
+ {
+ Title = "Testpage 1";
+
+ MessagingCenter.Subscribe<ModalPage> (this, "update", sender => {
+ BlowUp ();
+ });
+
+ Content = new Button {
+ AutomationId = "Page1PushModalButton",
+ Text = "press me",
+ Command = new Command (async () => await Navigation.PushModalAsync (new ModalPage ()))
+ };
+ }
+
+ void BlowUp ()
+ {
+ Content = new Label {
+ AutomationId = "Page1Label",
+ Text = "Page1"
+ };
+ }
+ }
+
+ protected override void Init ()
+ {
+ Title = "Test";
+
+ Master = new ContentPage {
+ Title = "Master",
+ Content = new Button {
+ AutomationId = "MasterButton",
+ Text = "Make a new page",
+ Command= new Command(() => {
+ Detail = new Page1 ();
+ IsPresented = false;
+ })
+ }
+ };
+
+ Detail = new Page1 ();
+
+ IsPresented = true;
+ }
+
+#if UITEST
+ [Test]
+ public void Issue2964Test ()
+ {
+ RunningApp.Screenshot ("I am at Issue 2964");
+
+ RunningApp.Tap (q => q.Marked ("MasterButton"));
+ RunningApp.Screenshot ("Create new Detail instance");
+
+ RunningApp.Tap (q => q.Marked ("Page1PushModalButton"));
+ RunningApp.Screenshot ("Modal is pushed");
+
+ RunningApp.Tap (q => q.Marked ("ModalPagePopButton"));
+ RunningApp.Screenshot ("Modal is popped");
+
+ RunningApp.WaitForElement (q => q.Marked ("Page1Label"));
+ RunningApp.Screenshot ("Didn't blow up! :)");
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2965.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2965.cs
new file mode 100644
index 00000000..fd65c13b
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2965.cs
@@ -0,0 +1,152 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+using System.Diagnostics;
+
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+using Xamarin.UITest.iOS;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 2965, "CarouselPage Disappearing event does not fire on Android")]
+ public class Issue2965 : TestMasterDetailPage
+ {
+ static MasterDetailPage s_mdp;
+
+ int _countAppearing;
+
+ protected override void Init ()
+ {
+ s_mdp = this;
+
+ var lblCount = new Label { AutomationId = "lblCount" };
+
+ var myCarouselPage = new CarouselPage () {
+
+ Children = {
+ new ContentPage {
+ BackgroundColor = Color.Green,
+ Content = new StackLayout {
+ Children = {
+ new Button {
+ AutomationId = "ShowMasterBtnPage1",
+ Text = "ShowMaster",
+ Command = new Command(()=> s_mdp.IsPresented = true)
+ },
+ lblCount
+ }
+ }
+ },
+ new ContentPage {
+ BackgroundColor = Color.Red
+ },
+ new ContentPage {
+ BackgroundColor = Color.Lime,
+ },
+ new ContentPage {
+ BackgroundColor = Color.Purple,
+ },
+ }
+ };
+
+ var myCarouselDetailPage = new NavigationPage (myCarouselPage);
+
+ var myPushButton = new Button () {
+ Text = "Push Page",
+ HorizontalOptions = LayoutOptions.Start
+ };
+
+ myCarouselPage.Appearing += (sender, e) => {
+ _countAppearing++;
+ lblCount.Text = _countAppearing.ToString ();
+ };
+ myCarouselPage.Disappearing += (sender, e) => {
+ _countAppearing--;
+ };
+
+
+ var mySecondDetailPage = new NavigationPage (new ContentPage () {
+ Title = "My Second Page",
+
+ Content = new StackLayout () {
+ Orientation = StackOrientation.Vertical,
+ Children = {
+ new Button {
+ AutomationId = "ShowMasterBtnPage2",
+ Text = "ShowMaster",
+ Command = new Command(()=> s_mdp.IsPresented = true)
+ },
+ myPushButton
+ }
+ }
+ });
+
+ myPushButton.Command = new Command (() => mySecondDetailPage.Navigation.PushAsync (new ContentPage () { Title = "My Pushed Page" }));
+
+ var myMasterPage = new ContentPage () {
+ Padding = new Thickness (0, 60, 0, 0),
+ Title = "Menu",
+ Content = new StackLayout () {
+ Orientation = StackOrientation.Vertical,
+ Children = {
+ new Button () {
+ Text = "Detail 1",
+ AutomationId = "btnDetail1",
+ Command = new Command (() => {
+ Detail = myCarouselDetailPage;
+ IsPresented = false;
+ }),
+ HorizontalOptions = LayoutOptions.Start
+ },
+
+ new Button () {
+ Text = "Detail 2",
+ AutomationId = "btnDetail2",
+ Command = new Command (() => {
+ Detail = mySecondDetailPage;
+ IsPresented = false;
+ }),
+ HorizontalOptions = LayoutOptions.Start
+ }
+
+ }
+ }
+ };
+
+ Master = myMasterPage;
+ Detail = myCarouselDetailPage;
+ }
+
+#if UITEST
+ [Test]
+ [Ignore("Fails intermittently on TestCloud")]
+ public void Issue2965Test ()
+ {
+ RunningApp.Screenshot ("I am at Issue 2965");
+ var element = RunningApp.WaitForElement (q => q.Marked ("lblCount"))[0];
+ Assert.That (element.Text, Is.EqualTo ("1"));
+
+ if(RunningApp is iOSApp)
+ RunningApp.Tap (q => q.Marked("Menu"));
+ else
+ RunningApp.Tap ("ShowMasterBtnPage1");
+
+ RunningApp.Tap (q => q.Marked("btnDetail2"));
+
+ if(RunningApp is iOSApp)
+ RunningApp.Tap (q => q.Marked("Menu"));
+ else
+ RunningApp.Tap ("ShowMasterBtnPage2");
+
+ RunningApp.Tap (q => q.Marked("btnDetail1"));
+ element = RunningApp.WaitForElement (q => q.Marked ("lblCount"))[0];
+ Assert.That (element.Text, Is.EqualTo ("1"));
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2976.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2976.cs
new file mode 100644
index 00000000..c5da93f5
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2976.cs
@@ -0,0 +1,441 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+using System.Collections.Generic;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 2976, "Sample 'WorkingWithListviewNative' throw Exception on Xam.Android project.", PlatformAffected.Android)]
+ public class Issue2976 : TestTabbedPage
+ {
+ protected override void Init ()
+ {
+
+ // built-in Xamarin.Forms controls
+ Children.Add (new XamarinFormsPage {Title = "DEMOA", Icon = "bank.png"});
+
+ // custom renderer for the list, using a native built-in cell type
+ Children.Add (new NativeListPage {Title = "DEMOB", Icon = "bank.png"});
+
+ // built in Xamarin.Forms list, but with a native cell custom-renderer
+ Children.Add (new XamarinFormsNativeCellPage {Title = "DEMOC", Icon = "bank.png"});
+
+ // custom renderer for the list, using a native cell that has been custom-defined in native code
+ Children.Add (new NativeListViewPage2 {Title = "DEMOD", Icon = "bank.png"});
+ }
+
+#if UITEST
+ [Test]
+ public void Issue1Test ()
+ {
+ RunningApp.Screenshot ("I am at Issue 2976");
+ RunningApp.Tap (q => q.Marked ("DEMOA"));
+ RunningApp.Tap (q => q.Marked ("DEMOB"));
+ RunningApp.Tap (q => q.Marked ("DEMOC"));
+ RunningApp.Tap (q => q.Marked ("DEMOD"));
+ }
+#endif
+ }
+
+ /// <summary>
+ /// This page uses a custom renderer that wraps native list controls:
+ /// iOS : UITableView
+ /// Android : ListView (do not confuse with Xamarin.Forms ListView)
+ /// Windows Phone : ?
+ ///
+ /// It uses a built-in row/cell class provided by the native platform
+ /// and is therefore faster than building a custom ViewCell in Xamarin.Forms.
+ /// </summary>
+ [Preserve (AllMembers = true)]
+ public class NativeListPage : ContentPage
+ {
+ public NativeListPage ()
+ {
+ var tableItems = new List<string> ();
+ for (var i = 0; i < 100; i++) {
+ tableItems.Add (i + " row ");
+ }
+
+
+ var fasterListView = new NativeListView (); // CUSTOM RENDERER using a native control
+ fasterListView.VerticalOptions = LayoutOptions.FillAndExpand; // REQUIRED: To share a scrollable view with other views in a StackLayout, it should have a VerticalOptions of FillAndExpand.
+ fasterListView.Items = tableItems;
+ fasterListView.ItemSelected += async (sender, e) => {
+ await Navigation.PushModalAsync (new DetailPage(e.SelectedItem));
+ };
+
+ // The root page of your application
+ Content = new StackLayout {
+ Padding = new Thickness (0, Device.OnPlatform(20,0,0), 0, 0),
+ Children = {
+ new Label {
+ XAlign = TextAlignment.Center,
+ Text = Device.OnPlatform("Custom renderer UITableView","Custom renderer ListView","Custom renderer todo")
+ },
+ fasterListView
+ }
+ };
+ }
+ }
+
+ /// <summary>
+ /// Xamarin.Forms representation for a custom-renderer that uses
+ /// the native list control on each platform.
+ /// </summary>
+ public class NativeListView : View
+ {
+ public static readonly BindableProperty ItemsProperty =
+ BindableProperty.Create ("Items", typeof(IEnumerable<string>), typeof(NativeListView), new List<string>());
+
+ public IEnumerable<string> Items {
+ get { return (IEnumerable<string>)GetValue (ItemsProperty); }
+ set { SetValue (ItemsProperty, value); }
+ }
+
+ public event EventHandler<SelectedItemChangedEventArgs> ItemSelected;
+
+ public void NotifyItemSelected (object item) {
+
+ if (ItemSelected != null)
+ ItemSelected (this, new SelectedItemChangedEventArgs (item));
+ }
+
+ public NativeListView ()
+ {
+ }
+ }
+
+ /// <summary>
+ /// This page uses built-in Xamarin.Forms controls to display a fast-scrolling list.
+ ///
+ /// It uses the built-in <c>TextCell</c> class which does not require special 'layout'
+ /// and is therefore faster than building a custom ViewCell in Xamarin.Forms.
+ /// </summary>
+ [Preserve (AllMembers = true)]
+ public class XamarinFormsPage : ContentPage
+ {
+ public XamarinFormsPage ()
+ {
+ var tableItems = new List<string> ();
+ for (var i = 0; i < 100; i++) {
+ tableItems.Add (i + " row ");
+ }
+
+ var listView = new ListView ();
+ listView.ItemsSource = tableItems;
+ listView.ItemTemplate = new DataTemplate(typeof(TextCell));
+ listView.ItemTemplate.SetBinding(TextCell.TextProperty, ".");
+
+ listView.ItemSelected += async (sender, e) => {
+ if (e.SelectedItem == null)
+ return;
+ listView.SelectedItem= null; // deselect row
+ await Navigation.PushModalAsync (new DetailPage(e.SelectedItem));
+ };
+
+ Content = new StackLayout {
+ Padding = new Thickness (5, Device.OnPlatform(20,0,0), 5, 0),
+ Children = {
+ new Label {
+ XAlign = TextAlignment.Center,
+ Text = "Xamarin.Forms built-in ListView"
+ },
+ listView
+ }
+ };
+ }
+ }
+
+ /// <summary>
+ /// This page uses built-in Xamarin.Forms controls to display a fast-scrolling list.
+ ///
+ /// It uses the built-in <c>TextCell</c> class which does not require special 'layout'
+ /// and is therefore faster than building a custom ViewCell in Xamarin.Forms.
+ /// </summary>
+ [Preserve (AllMembers = true)]
+ public class XamarinFormsNativeCellPage : ContentPage
+ {
+ public XamarinFormsNativeCellPage ()
+ {
+ var listView = new ListView ();
+ listView.ItemsSource = DataSource.GetList ();
+ listView.ItemTemplate = new DataTemplate(typeof(NativeCell));
+
+ listView.ItemTemplate.SetBinding(NativeCell.NameProperty, "Name");
+ listView.ItemTemplate.SetBinding(NativeCell.CategoryProperty, "Category");
+ listView.ItemTemplate.SetBinding(NativeCell.ImageFilenameProperty, "ImageFilename");
+
+ listView.ItemSelected += async (sender, e) => {
+ if (e.SelectedItem == null)
+ return;
+ listView.SelectedItem= null; // deselect row
+
+ await Navigation.PushModalAsync (new DetailPage(e.SelectedItem));
+ };
+
+ Content = new StackLayout {
+ Padding = new Thickness (0, Device.OnPlatform(20,0,0), 0, 0),
+ Children = {
+ new Label {
+ XAlign = TextAlignment.Center,
+ Text = "Xamarin.Forms native Cell"
+ },
+ listView
+ }
+ };
+ }
+ }
+
+ [Preserve (AllMembers = true)]
+ public class NativeCell : ViewCell
+ {
+ public NativeCell ()
+ {
+ //View = new ContentView ();
+ }
+
+ public static readonly BindableProperty NameProperty =
+ BindableProperty.Create ("Name", typeof(string), typeof(NativeCell), "");
+ public string Name {
+ get { return (string)GetValue (NameProperty); }
+ set { SetValue (NameProperty, value); }
+ }
+
+
+ public static readonly BindableProperty CategoryProperty =
+ BindableProperty.Create ("Category", typeof(string), typeof(NativeCell), "");
+ public string Category {
+ get { return (string)GetValue (CategoryProperty); }
+ set { SetValue (CategoryProperty, value); }
+ }
+
+
+ public static readonly BindableProperty ImageFilenameProperty =
+ BindableProperty.Create ("ImageFilename", typeof(string), typeof(NativeCell), "");
+ public string ImageFilename {
+ get { return (string)GetValue (ImageFilenameProperty); }
+ set { SetValue (ImageFilenameProperty, value); }
+ }
+
+ }
+
+ public class DetailPage : ContentPage
+ {
+ public DetailPage (object detail)
+ {
+ var l = new Label { Text = "Xamarin.Forms Detail Page" };
+
+ var t = new Label ();
+
+ if (detail is string) {
+ t.Text = (string)detail;
+ } else if (detail is DataSource) {
+ t.Text = ((DataSource)detail).Name;
+ }
+
+ var b = new Button { Text = "Dismiss" };
+ b.Clicked += (sender, e) => Navigation.PopModalAsync();
+
+ Content = new StackLayout {
+ Padding = new Thickness (0, Device.OnPlatform(20,0,0), 0, 0),
+ HorizontalOptions = LayoutOptions.Center,
+ VerticalOptions = LayoutOptions.Center,
+ Children = {
+ l,
+ t,
+ b
+ }
+ };
+ }
+ }
+
+ /// <summary>
+ /// This page uses a custom renderer that wraps native list controls:
+ /// iOS : UITableView
+ /// Android : ListView (do not confuse with Xamarin.Forms ListView)
+ /// Windows Phone : ?
+ ///
+ /// It uses a CUSTOM row/cell class that is defined natively which
+ /// is still faster than a Xamarin.Forms-defined ViewCell subclass.
+ /// </summary>
+ [Preserve (AllMembers = true)]
+ public class NativeListViewPage2 : ContentPage
+ {
+ public NativeListViewPage2 ()
+ {
+ var nativeListView2 = new NativeListView2 (); // CUSTOM RENDERER using a native control
+
+ nativeListView2.VerticalOptions = LayoutOptions.FillAndExpand; // REQUIRED: To share a scrollable view with other views in a StackLayout, it should have a VerticalOptions of FillAndExpand.
+
+ nativeListView2.Items = DataSource.GetList ();
+
+ nativeListView2.ItemSelected += async (sender, e) => {
+ //await Navigation.PushModalAsync (new DetailPage(e.SelectedItem));
+ await DisplayAlert ("clicked", "one of the rows was clicked", "ok");
+ };
+
+ // The root page of your application
+ Content = new StackLayout {
+ Padding = new Thickness (0, Device.OnPlatform(20,0,0), 0, 0),
+ Children = {
+ new Label {
+ XAlign = TextAlignment.Center,
+ Text = Device.OnPlatform("Custom UITableView+UICell","Custom ListView+Cell","Custom renderer todo")
+ },
+ nativeListView2
+ }
+ };
+ }
+ }
+
+ /// <summary>
+ /// Xamarin.Forms representation for a custom-renderer that uses
+ /// the native list control on each platform.
+ /// </summary>
+ public class NativeListView2 : View
+ {
+ public static readonly BindableProperty ItemsProperty =
+ BindableProperty.Create ("Items", typeof(IEnumerable<DataSource>), typeof(NativeListView2), new List<DataSource>());
+
+ public IEnumerable<DataSource> Items {
+ get { return (IEnumerable<DataSource>)GetValue (ItemsProperty); }
+ set { SetValue (ItemsProperty, value); }
+ }
+
+ public event EventHandler<SelectedItemChangedEventArgs> ItemSelected;
+
+ public void NotifyItemSelected (object item) {
+
+ if (ItemSelected != null)
+ ItemSelected (this, new SelectedItemChangedEventArgs (item));
+ }
+
+ public NativeListView2 ()
+ {
+ }
+ }
+
+ [Preserve (AllMembers = true)]
+ public class DataSource
+ {
+ public string Name { get; set; }
+ public string Category { get; set; }
+ public string ImageFilename { get; set; }
+
+ public DataSource ()
+ {
+ }
+
+ public DataSource (string name, string category, string imageFilename)
+ {
+ Name = name;
+ Category = category;
+ ImageFilename = imageFilename;
+ }
+
+ public static List<DataSource> GetList (){
+ var l = new List<DataSource> ();
+
+
+ l.Add (new DataSource ("Asparagus","Vegetables","Vegetables"));
+ l.Add (new DataSource ("Avocados","Vegetables","Vegetables"));
+ l.Add (new DataSource ("Beetroots","Vegetables","Vegetables"));
+ l.Add (new DataSource ("Capsicum","Vegetables","Vegetables"));
+ l.Add (new DataSource ("Broccoli","Vegetables","Vegetables"));
+ l.Add (new DataSource ("Brussel sprouts","Vegetables","Vegetables"));
+ l.Add (new DataSource ("Cabbage","Vegetables","Vegetables"));
+ l.Add (new DataSource ("Carrots","Vegetables","Vegetables"));
+ l.Add (new DataSource ("Cauliflower","Vegetables","Vegetables"));
+ l.Add (new DataSource ("Celery","Vegetables","Vegetables"));
+ l.Add (new DataSource ("Corn","Vegetables","Vegetables"));
+ l.Add (new DataSource ("Cucumbers","Vegetables","Vegetables"));
+ l.Add (new DataSource ("Eggplant","Vegetables","Vegetables"));
+ l.Add (new DataSource ("Fennel","Vegetables","Vegetables"));
+ l.Add (new DataSource ("Garlic","Vegetables","Vegetables"));
+ l.Add (new DataSource ("Beans","Vegetables","Vegetables"));
+ l.Add (new DataSource ("Peas","Vegetables","Vegetables"));
+ l.Add (new DataSource ("Kale","Vegetables","Vegetables"));
+ l.Add (new DataSource ("Leeks","Vegetables","Vegetables"));
+ l.Add (new DataSource ("Mushrooms","Vegetables","Vegetables"));
+ l.Add (new DataSource ("Olives","Vegetables","Vegetables"));
+ l.Add (new DataSource ("Onions","Vegetables","Vegetables"));
+ l.Add (new DataSource ("Potatoes","Vegetables","Vegetables"));
+ l.Add (new DataSource ("Lettuce","Vegetables","Vegetables"));
+ l.Add (new DataSource ("Spinach","Vegetables","Vegetables"));
+ l.Add (new DataSource ("Squash","Vegetables","Vegetables"));
+ l.Add (new DataSource ("Sweet potatoes","Vegetables","Vegetables"));
+ l.Add (new DataSource ("Tomatoes","Vegetables","Vegetables"));
+ l.Add (new DataSource ("Turnips","Vegetables","Vegetables"));
+ l.Add (new DataSource ("Apples","Fruits","Fruits"));
+ l.Add (new DataSource ("Apricots","Fruits","Fruits"));
+ l.Add (new DataSource ("Bananas","Fruits","Fruits"));
+ l.Add (new DataSource ("Blueberries","Fruits","Fruits"));
+ l.Add (new DataSource ("Rockmelon","Fruits","Fruits"));
+ l.Add (new DataSource ("Figs","Fruits","Fruits"));
+ l.Add (new DataSource ("Grapefruit","Fruits","Fruits"));
+ l.Add (new DataSource ("Grapes","Fruits","Fruits"));
+ l.Add (new DataSource ("Honeydew Melon","Fruits","Fruits"));
+ l.Add (new DataSource ("Kiwifruit","Fruits","Fruits"));
+ l.Add (new DataSource ("Lemons","Fruits","Fruits"));
+ l.Add (new DataSource ("Oranges","Fruits","Fruits"));
+ l.Add (new DataSource ("Pears","Fruits","Fruits"));
+ l.Add (new DataSource ("Pineapple","Fruits","Fruits"));
+ l.Add (new DataSource ("Plums","Fruits","Fruits"));
+ l.Add (new DataSource ("Raspberries","Fruits","Fruits"));
+ l.Add (new DataSource ("Strawberries","Fruits","Fruits"));
+ l.Add (new DataSource ("Watermelon","Fruits","Fruits"));
+ l.Add (new DataSource ("Balmain Bugs","Seafood",""));
+ l.Add (new DataSource ("Calamari","Seafood",""));
+ l.Add (new DataSource ("Cod","Seafood",""));
+ l.Add (new DataSource ("Prawns","Seafood",""));
+ l.Add (new DataSource ("Lobster","Seafood",""));
+ l.Add (new DataSource ("Salmon","Seafood",""));
+ l.Add (new DataSource ("Scallops","Seafood",""));
+ l.Add (new DataSource ("Shrimp","Seafood",""));
+ l.Add (new DataSource ("Tuna","Seafood",""));
+ l.Add (new DataSource ("Almonds","Nuts",""));
+ l.Add (new DataSource ("Cashews","Nuts",""));
+ l.Add (new DataSource ("Peanuts","Nuts",""));
+ l.Add (new DataSource ("Walnuts","Nuts",""));
+ l.Add (new DataSource ("Black beans","Beans & Legumes","Legumes"));
+ l.Add (new DataSource ("Dried peas","Beans & Legumes","Legumes"));
+ l.Add (new DataSource ("Kidney beans","Beans & Legumes","Legumes"));
+ l.Add (new DataSource ("Lentils","Beans & Legumes","Legumes"));
+ l.Add (new DataSource ("Lima beans","Beans & Legumes","Legumes"));
+ l.Add (new DataSource ("Miso","Beans & Legumes","Legumes"));
+ l.Add (new DataSource ("Soybeans","Beans & Legumes","Legumes"));
+ l.Add (new DataSource ("Beef","Meat",""));
+ l.Add (new DataSource ("Buffalo","Meat",""));
+ l.Add (new DataSource ("Chicken","Meat",""));
+ l.Add (new DataSource ("Lamb","Meat",""));
+ l.Add (new DataSource ("Cheese","Dairy",""));
+ l.Add (new DataSource ("Milk","Dairy",""));
+ l.Add (new DataSource ("Eggs","Dairy",""));
+ l.Add (new DataSource ("Basil","Herbs & Spices","FlowerBuds"));
+ l.Add (new DataSource ("Black pepper","Herbs & Spices","FlowerBuds"));
+ l.Add (new DataSource ("Chili pepper, dried","Herbs & Spices","FlowerBuds"));
+ l.Add (new DataSource ("Cinnamon","Herbs & Spices","FlowerBuds"));
+ l.Add (new DataSource ("Cloves","Herbs & Spices","FlowerBuds"));
+ l.Add (new DataSource ("Cumin","Herbs & Spices","FlowerBuds"));
+ l.Add (new DataSource ("Dill","Herbs & Spices","FlowerBuds"));
+ l.Add (new DataSource ("Ginger","Herbs & Spices","FlowerBuds"));
+ l.Add (new DataSource ("Mustard","Herbs & Spices","FlowerBuds"));
+ l.Add (new DataSource ("Oregano","Herbs & Spices","FlowerBuds"));
+ l.Add (new DataSource ("Parsley","Herbs & Spices","FlowerBuds"));
+ l.Add (new DataSource ("Peppermint","Herbs & Spices","FlowerBuds"));
+ l.Add (new DataSource ("Rosemary","Herbs & Spices","FlowerBuds"));
+ l.Add (new DataSource ("Sage","Herbs & Spices","FlowerBuds"));
+ l.Add (new DataSource ("Thyme","Herbs & Spices","FlowerBuds"));
+ l.Add (new DataSource ("Turmeric","Herbs & Spices","FlowerBuds"));
+
+
+ return l;
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2981.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2981.cs
new file mode 100644
index 00000000..d94e09f7
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2981.cs
@@ -0,0 +1,37 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 2981, "Long Press on ListView causes crash")]
+ public class Issue2981 : TestContentPage
+ {
+
+ protected override void Init ()
+ {
+ var listView = new ListView ();
+
+ listView.ItemsSource = new [] { "Cell1", "Cell2" };
+ Content = listView;
+ }
+
+#if UITEST
+ [Test]
+ public void Issue2981Test ()
+ {
+ RunningApp.Screenshot ("I am at Issue 1");
+ RunningApp.TouchAndHold (q => q.Marked ("Cell1"));
+ RunningApp.Screenshot ("Long Press first cell");
+ RunningApp.TouchAndHold (q => q.Marked ("Cell2"));
+ RunningApp.Screenshot ("Long Press second cell");
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2983.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2983.cs
new file mode 100644
index 00000000..93d96cda
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2983.cs
@@ -0,0 +1,30 @@
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls.TestCasesPages
+{
+ [Preserve (AllMembers = true)]
+ [Issue(IssueTracker.Github, 2983, "ListView.Footer can cause NullReferenceException", PlatformAffected.iOS)]
+ public class Issue2983 : TestContentPage
+ {
+ protected override void Init ()
+ {
+ Content = new ListView {
+ Footer = new StackLayout {
+ Children = {new Label {Text = "Footer", AutomationId = "footer"}}
+ }
+ };
+ }
+
+#if UITEST
+ [Test]
+ public void TestDoesNotCrash ()
+ {
+ RunningApp.WaitForElement (c => c.Marked ("footer"));
+ }
+#endif
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2987.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2987.cs
new file mode 100644
index 00000000..770320b0
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2987.cs
@@ -0,0 +1,39 @@
+using System;
+using Xamarin.Forms.CustomAttributes;
+using System.Diagnostics;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 2987, "When setting the minimum and maximum date for a date picker, only allow valid dates to be seen/selected from the DatePicker dialog", PlatformAffected.Android)]
+ public class Issue2987 : TestContentPage
+ {
+ public AbsoluteLayout layout;
+
+ protected override void Init ()
+ {
+ var datePicker = new DatePicker { AutomationId = "datePicker" };
+ datePicker.MinimumDate = new DateTime (2015, 1, 1);
+ datePicker.MaximumDate = new DateTime (2015, 6, 1);
+ datePicker.Date = DateTime.Now;
+ datePicker.Format = "MMM dd, yyyy";
+ datePicker.DateSelected += (object sender, DateChangedEventArgs e) => {
+ Debug.WriteLine ("Date changed");
+ };
+
+ Padding = new Thickness (10, Device.OnPlatform (20, 0, 0), 10, 5);
+
+ layout = new AbsoluteLayout {
+ VerticalOptions = LayoutOptions.FillAndExpand,
+ HorizontalOptions = LayoutOptions.FillAndExpand
+ };
+
+ AbsoluteLayout.SetLayoutFlags (datePicker, AbsoluteLayoutFlags.None);
+ AbsoluteLayout.SetLayoutBounds (datePicker, new Rectangle (0f, 0f, 300f, 50f));
+
+ layout.Children.Add (datePicker);
+
+ Content = layout;
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue3086.xaml b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue3086.xaml
new file mode 100644
index 00000000..b78ee1de
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue3086.xaml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+ x:Class="Xamarin.Forms.Controls.Issues.Issue3086">
+<ListView x:Name="TestListView"
+ IsGroupingEnabled = "true"
+ HasUnevenRows="true">
+ <ListView.GroupHeaderTemplate >
+ <DataTemplate>
+ <ViewCell Height="30">
+ <ContentView>
+ <Label Text="{Binding GroupName}" BackgroundColor="Green"/>
+ </ContentView>
+ </ViewCell>
+ </DataTemplate>
+ </ListView.GroupHeaderTemplate >
+
+ <ListView.ItemTemplate>
+ <DataTemplate>
+ <ViewCell>
+ <ContentView>
+ <Label Text="{Binding}"/>
+ </ContentView>
+ </ViewCell>
+ </DataTemplate>
+ </ListView.ItemTemplate>
+</ListView>
+</ContentPage> \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue3086.xaml.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue3086.xaml.cs
new file mode 100644
index 00000000..77dc6f11
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue3086.xaml.cs
@@ -0,0 +1,31 @@
+using System;
+using System.Collections.Generic;
+
+using Xamarin.Forms;
+using Xamarin.Forms.CustomAttributes;
+using System.Collections.ObjectModel;
+
+namespace Xamarin.Forms.Controls.Issues
+{
+ [Issue (IssueTracker.Github, 3086, "On iOS, groupheadertemplate is broken")]
+ public partial class Issue3086 : ContentPage
+ {
+ public Issue3086 ()
+ {
+ #if APP
+ InitializeComponent ();
+ TestListView.ItemsSource = new ObservableCollection<GroupedItems> () {
+ new GroupedItems ("Header 1") { "1.1", "1.2", "1.3" },
+ new GroupedItems ("Header 2") { "2.1", "2.2", "2.3" },
+ new GroupedItems ("Header 3") { "3.1", "3.2", "3.3" },
+ new GroupedItems ("Header 4") { "4.1", "4.2", "4.3" },
+ };
+ #endif
+ }
+
+ internal class GroupedItems : ObservableCollection<string> {
+ public GroupedItems (string groupName) { GroupName = groupName; }
+ public string GroupName { get; private set; }
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue3276.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue3276.cs
new file mode 100644
index 00000000..6f0b0ea9
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue3276.cs
@@ -0,0 +1,91 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+using System.Collections.ObjectModel;
+using System.Collections.Generic;
+using System.Runtime.CompilerServices;
+using System.ComponentModel;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 3276, "Crashing Unknown cell parent type on ContextAction Bindings")]
+ public class Issue3276 : TestTabbedPage
+ {
+ protected override void Init ()
+ {
+ var listview = new ListView ();
+ listview.ItemTemplate = new DataTemplate (typeof(CaCell));
+
+ listview.SetBinding (ListView.ItemsSourceProperty, new Binding ("SearchResults"));
+
+ var page = new ContentPage {Title = "First", Content = listview, BindingContext = new VM () };
+
+ page.Appearing += (object sender, EventArgs e) => (page.BindingContext as VM).Load ();
+
+ Children.Add (page);
+ Children.Add (new ContentPage { Title = "Second" });
+ }
+
+ [Preserve (AllMembers = true)]
+ public class VM : ViewModel
+ {
+ public void Load ()
+ {
+ var list = new List<string> ();
+ for (int i = 0; i < 20; i++) {
+ list.Add ("second " + i.ToString ());
+ }
+ SearchResults = new ObservableCollection<string> (list);
+ }
+
+ ObservableCollection<string> _list = null;
+
+ public ObservableCollection<string> SearchResults {
+ get { return _list; }
+
+ set {
+ _list = value;
+ OnPropertyChanged ();
+ }
+ }
+
+ }
+
+ [Preserve (AllMembers = true)]
+ public class CaCell : ViewCell
+ {
+ public CaCell ()
+ {
+ var label = new Label ();
+ label.SetBinding (Label.TextProperty, new Binding ("."));
+ var menu = new MenuItem { Text = "Delete", IsDestructive = true };
+ menu.SetBinding (MenuItem.CommandParameterProperty, new Binding ("."));
+ var menu1 = new MenuItem { Text = "Settings" };
+ menu1.SetBinding (MenuItem.CommandParameterProperty, new Binding ("."));
+ ContextActions.Add (menu);
+ ContextActions.Add (menu1);
+
+ var stack = new StackLayout ();
+ stack.Children.Add (label);
+ View = stack;
+ }
+ }
+
+
+ #if UITEST
+ [Test]
+ public void Issue3276Test ()
+ {
+ RunningApp.Tap (q => q.Marked ("Second"));
+ RunningApp.Tap (q => q.Marked ("First"));
+ RunningApp.WaitForElement (q => q.Marked ("second 1"));
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue3292.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue3292.cs
new file mode 100644
index 00000000..910b96fd
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue3292.cs
@@ -0,0 +1,83 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+using System.Threading.Tasks;
+using System.ComponentModel;
+using System.Runtime.CompilerServices;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 3292, "TableSection.Title property binding fails in XAML")]
+ public class Issue3292 : TestContentPage
+ {
+ protected override void Init ()
+ {
+ var vm = new SomePageViewModel ();
+ BindingContext = vm;
+
+ var tableview = new TableView ();
+ var section = new TableSection ();
+ section.SetBinding (TableSectionBase.TitleProperty, new Binding ("SectionTitle"));
+ var root = new TableRoot ();
+ root.Add (section);
+ tableview.Root = root;
+
+ Content = tableview;
+
+ vm.Init ();
+ }
+
+ [Preserve (AllMembers = true)]
+ public class SomePageViewModel : INotifyPropertyChanged
+ {
+ string _sectionTitle;
+
+ public SomePageViewModel()
+ {
+ SectionTitle = "Hello World";
+ }
+
+ public void Init()
+ {
+ Task.Delay(1000).ContinueWith(t =>
+ {
+ Device.BeginInvokeOnMainThread(() => {
+ SectionTitle = "Hello World Changed";
+ });
+ });
+ }
+
+ public string SectionTitle
+ {
+ get { return _sectionTitle; }
+ set
+ {
+ _sectionTitle = value;
+ OnPropertyChanged();
+ }
+ }
+
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
+ {
+ var handler = PropertyChanged;
+ if (handler != null) handler(this, new PropertyChangedEventArgs(propertyName));
+ }
+ }
+
+#if UITEST
+ [Test]
+ public void Issue3292Test ()
+ {
+ RunningApp.WaitForElement (q => q.Marked ("Hello World Changed"));
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue3319.xaml b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue3319.xaml
new file mode 100644
index 00000000..7df95596
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue3319.xaml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<local:TestContentPage xmlns="http://xamarin.com/schemas/2014/forms"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+ xmlns:local="clr-namespace:Xamarin.Forms.Controls"
+ x:Class="Xamarin.Forms.Controls.Issue3319">
+ <StackLayout Orientation="Vertical">
+ <ListView x:Name="listView"
+ ItemsSource="{Binding FavoriteArticles}"
+ HasUnevenRows="True"
+ IsPullToRefreshEnabled="True"
+ RefreshCommand="{Binding LoadFavoritesCommand}"
+ IsRefreshing="{Binding IsBusy, Mode=OneWay}"
+ >
+ <ListView.ItemTemplate>
+ <DataTemplate>
+ <ViewCell >
+ <ViewCell.ContextActions>
+ <MenuItem Clicked="OnDelete" CommandParameter="{Binding .}"
+ Text="Delete" IsDestructive="True" />
+ </ViewCell.ContextActions>
+
+ <Grid Padding="10,5">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto"/>
+ <ColumnDefinition Width="*"/>
+ </Grid.ColumnDefinitions>
+ <StackLayout Grid.Column="1"
+ Padding="5"
+ Spacing="1"
+ VerticalOptions="Center">
+ <Label Text="{Binding ArticleTitle}" FontSize="Medium" FontAttributes="Bold" TextColor="#333333" LineBreakMode="WordWrap"/>
+ <Label Text="{Binding AuthorString}" FontSize="Small" TextColor="#919191" LineBreakMode="TailTruncation"/>
+ <Label Text="{Binding FormattedPostedDate}" FontSize="Small" TextColor="#919191" LineBreakMode="NoWrap"/>
+ <Label Text="{Binding ItemId}" FontSize="Small" TextColor="#919191" LineBreakMode="NoWrap" IsVisible="false"/>
+ </StackLayout>
+ </Grid>
+ </ViewCell>
+ </DataTemplate>
+ </ListView.ItemTemplate>
+ </ListView>
+ </StackLayout>
+</local:TestContentPage> \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue3319.xaml.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue3319.xaml.cs
new file mode 100644
index 00000000..d2f54cd0
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue3319.xaml.cs
@@ -0,0 +1,264 @@
+using System;
+using System.Collections.Generic;
+
+using Xamarin.Forms;
+using System.Threading.Tasks;
+using System.Collections.ObjectModel;
+using System.ComponentModel;
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 3319, "[iOS] Clear and adding rows exception")]
+ public partial class Issue3319 : TestContentPage
+ {
+ #if UITEST
+ [Test]
+ public void Issue3319Test ()
+ {
+ RunningApp.WaitForElement (q => q.Marked ("Will this repo work?"));
+
+ }
+ #endif
+
+ FavoritesViewModel ViewModel {
+ get { return BindingContext as FavoritesViewModel; }
+ }
+
+ public Issue3319 ()
+ {
+ #if APP
+ InitializeComponent ();
+ BindingContext = new FavoritesViewModel ();
+
+ listView.SeparatorVisibility = SeparatorVisibility.Default;
+ listView.SeparatorColor = Color.FromHex ("#ababab");
+
+ listView.ItemTapped += (sender, args) => {
+ if (listView.SelectedItem == null)
+ return;
+
+ //do nothing anyway
+ return;
+ };
+ #endif
+
+ }
+
+ protected override void Init ()
+ {
+
+ }
+
+ public async void OnDelete (object sender, EventArgs e)
+ {
+ var mi = ((MenuItem)sender);
+ if (mi.CommandParameter == null)
+ return;
+
+ var articlelistingitem = mi.CommandParameter;
+
+ if (articlelistingitem != null)
+ DisplayAlert ("Alert", "I'm not deleting just refreshing...", "Ok");
+ ViewModel.LoadFavoritesCommand.Execute (null);
+ }
+
+
+ protected override void OnAppearing ()
+ {
+ base.OnAppearing ();
+ if (ViewModel == null || !ViewModel.CanLoadMore || ViewModel.IsBusy)
+ return;
+
+ Device.BeginInvokeOnMainThread (() => {
+ ViewModel.LoadFavoritesCommand.Execute (null);
+ });
+ }
+
+ [Preserve (AllMembers = true)]
+ public class FavoritesViewModel :BaseViewModelF
+ {
+ public ObservableCollection<ArticleListing> FavoriteArticles { get; set; }
+
+ public FavoritesViewModel ()
+ {
+ Title = "Favorites";
+ FavoriteArticles = new ObservableCollection<ArticleListing> ();
+ }
+
+ Command _loadFavoritesCommand;
+
+ public Command LoadFavoritesCommand {
+ get {
+ return _loadFavoritesCommand ??
+ (_loadFavoritesCommand = new Command (async () => {
+ await ExecuteFavoritesCommand ();
+ }, () => {
+ return !IsBusy;
+ }));
+ }
+ }
+
+ public async Task ExecuteFavoritesCommand ()
+ {
+ if (IsBusy)
+ return;
+
+ IsBusy = true;
+ LoadFavoritesCommand.ChangeCanExecute ();
+ FavoriteArticles.Clear ();
+ var articles = new ObservableCollection<ArticleListing> {
+ new ArticleListing {
+ ArticleTitle = "Will this repo work?",
+ AuthorString = "Ben Crispin",
+ FormattedPostedDate = "7-28-2015"
+ },
+ new ArticleListing {
+ ArticleTitle = "Xamarin Forms BugZilla",
+ AuthorString = "Some Guy",
+ FormattedPostedDate = "7-28-2015"
+ }
+ };
+ var templist = new ObservableCollection<ArticleListing> ();
+ foreach (var article in articles) {
+ //templist.Add(article);
+ FavoriteArticles.Add (article);
+ }
+ //FavoriteArticles = templist;
+ OnPropertyChanged ("FavoriteArticles");
+ IsBusy = false;
+ LoadFavoritesCommand.ChangeCanExecute ();
+ }
+
+ }
+ }
+
+ public class BaseViewModelF : INotifyPropertyChanged
+ {
+ public BaseViewModelF ()
+ {
+ }
+
+ string _title = string.Empty;
+ public const string TitlePropertyName = "Title";
+
+ /// <summary>
+ /// Gets or sets the "Title" property
+ /// </summary>
+ /// <value>The title.</value>
+ public string Title {
+ get { return _title; }
+ set { SetProperty (ref _title, value, TitlePropertyName); }
+ }
+
+ string _subTitle = string.Empty;
+ /// <summary>
+ /// Gets or sets the "Subtitle" property
+ /// </summary>
+ public const string SubtitlePropertyName = "Subtitle";
+
+ public string Subtitle {
+ get { return _subTitle; }
+ set { SetProperty (ref _subTitle, value, SubtitlePropertyName); }
+ }
+
+ string _icon = null;
+ /// <summary>
+ /// Gets or sets the "Icon" of the viewmodel
+ /// </summary>
+ public const string IconPropertyName = "Icon";
+
+ public string Icon {
+ get { return _icon; }
+ set { SetProperty (ref _icon, value, IconPropertyName); }
+ }
+
+ bool _isBusy;
+ /// <summary>
+ /// Gets or sets if the view is busy.
+ /// </summary>
+ public const string IsBusyPropertyName = "IsBusy";
+
+ public bool IsBusy {
+ get { return _isBusy; }
+ set { SetProperty (ref _isBusy, value, IsBusyPropertyName); }
+ }
+
+ bool _canLoadMore = true;
+ /// <summary>
+ /// Gets or sets if we can load more.
+ /// </summary>
+ public const string CanLoadMorePropertyName = "CanLoadMore";
+
+ public bool CanLoadMore {
+ get { return _canLoadMore; }
+ set { SetProperty (ref _canLoadMore, value, CanLoadMorePropertyName); }
+ }
+
+ protected void SetProperty<T> (
+ ref T backingStore, T value,
+ string propertyName,
+ Action onChanged = null)
+ {
+
+ if (EqualityComparer<T>.Default.Equals (backingStore, value))
+ return;
+
+ backingStore = value;
+
+ if (onChanged != null)
+ onChanged ();
+
+ OnPropertyChanged (propertyName);
+ }
+
+ #region INotifyPropertyChanged implementation
+
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ #endregion
+
+ public void OnPropertyChanged (string propertyName)
+ {
+ if (PropertyChanged == null)
+ return;
+
+ PropertyChanged (this, new PropertyChangedEventArgs (propertyName));
+ }
+
+ }
+
+ [Preserve (AllMembers = true)]
+ public class ArticleListing
+ {
+ public ArticleListing ()
+ {
+ }
+
+ public string ArticleTitle { get; set; }
+
+ public string ShortArticleTitle { get; set; }
+
+ public string AuthorString { get; set; }
+
+ public string FormattedPostedDate { get; set; }
+
+ public string KickerName { get; set; }
+
+ public string ArticleUrl { get; set; }
+ }
+
+ public class YearOloArticleList
+ {
+ public string Year { get; set; }
+
+ public List<ArticleListing> ListArticleListing { get; set; }
+ }
+}
+
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue342.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue342.cs
new file mode 100644
index 00000000..792d9711
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue342.cs
@@ -0,0 +1,85 @@
+using System;
+using System.Linq;
+
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using NUnit.Framework;
+using Xamarin.UITest;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 342, "NRE when Image is not assigned source", PlatformAffected.WinPhone)]
+ public class Issue342NoSource : TestContentPage
+ {
+ protected override void Init ()
+ {
+ Title = "Issue 342";
+ Content = new StackLayout {
+ Children = {
+ new Label {
+ Text = "Uninitialized image"
+ },
+ new Image ()
+ }
+ };
+ }
+
+ // Should not throw exception when user does not include image
+
+#if UITEST
+ [Test]
+ public void Issue342NoSourceTestsLablePresentNoImage ()
+ {
+ RunningApp.WaitForElement (q => q.Marked ("Uninitialized image"), "Cannot see label");
+ RunningApp.Screenshot ("All elements present");
+ }
+#endif
+ }
+
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 342, "NRE when Image is delayed source", PlatformAffected.WinPhone)]
+ public class Issue342DelayedSource : TestContentPage
+ {
+ protected override void Init ()
+ {
+ Title = "Issue 342";
+
+ _image = new Image ();
+
+ Content = new StackLayout {
+ Children = {
+ new Label {
+ Text = "Delayed image"
+ },
+ _image
+ }
+ };
+
+ AddSourceAfterDelay ();
+ }
+
+ // Should not throw exception when user does not include image
+ Image _image;
+
+ void AddSourceAfterDelay ()
+ {
+ Device.StartTimer (TimeSpan.FromSeconds (2), () => {
+ _image.Source = "cover1.jpg";
+ return false;
+ });
+ }
+
+#if UITEST
+ [Test]
+ [Category ("ManualReview")]
+ public void Issue342DelayedLoadTestsImageLoads ()
+ {
+ RunningApp.Screenshot ("Should not crash");
+ Assert.Inconclusive ("Manual review");
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue416.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue416.cs
new file mode 100644
index 00000000..ec71d472
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue416.cs
@@ -0,0 +1,41 @@
+using System;
+using System.Linq;
+
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using NUnit.Framework;
+using Xamarin.UITest;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 416, "NavigationPage in PushModal does not show NavigationBar", PlatformAffected.Android, NavigationBehavior.PushModalAsync)]
+ public class Issue416 : TestNavigationPage
+ {
+ protected override void Init ()
+ {
+ Navigation.PushAsync (new ContentPage {
+ Title = "Test Page",
+ Content = new Label {
+ Text = "I should have a nav bar"
+ }
+ });
+ }
+
+ // Issue 416
+ // NavigationBar should be visible in modal
+
+#if UITEST
+ [Test]
+ [UiTest (typeof(NavigationPage))]
+ public void Issue416TestsNavBarPresent ()
+ {
+ RunningApp.WaitForElement (q => q.Marked ("Test Page"));
+ RunningApp.WaitForElement (q => q.Marked ("I should have a nav bar"));
+ RunningApp.Screenshot ("All element present");
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue417.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue417.cs
new file mode 100644
index 00000000..43aad7e4
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue417.cs
@@ -0,0 +1,110 @@
+using System;
+using System.Diagnostics;
+using System.Linq;
+using System.Threading.Tasks;
+
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using NUnit.Framework;
+using Xamarin.UITest;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 417, "Navigation.PopToRootAsync does nothing", PlatformAffected.Android)]
+ public class Issue417 : TestNavigationPage
+ {
+ public static NavigationPage NavRoot;
+
+ protected override void Init ()
+ {
+ Navigation.PushAsync (new FirstPage ());
+ NavRoot = this;
+ }
+
+ public class FirstPage : ContentPage
+ {
+ public FirstPage ()
+ {
+ Title = "First Page";
+ BackgroundColor = Color.Black;
+
+ var nextPageBtn = new Button {
+ Text = "Next Page"
+ };
+
+ nextPageBtn.Clicked += (s, e) => NavRoot.Navigation.PushAsync (new NextPage ());
+
+ Content = nextPageBtn;
+ }
+
+ }
+
+ public class NextPage : ContentPage
+ {
+ public NextPage ()
+ {
+ Title = "Second Page";
+
+ var nextPage2Btn = new Button {
+ Text = "Next Page 2"
+ };
+
+ nextPage2Btn.Clicked += (s, e) => NavRoot.Navigation.PushAsync (new NextPage2 ());
+ BackgroundColor = Color.Black;
+ Content = nextPage2Btn;
+
+ }
+ }
+
+ public class NextPage2 : ContentPage
+ {
+ public NextPage2 ()
+ {
+ Title = "Third Page";
+
+ var popToRootButton = new Button {
+ Text = "Pop to root"
+ };
+
+ popToRootButton.Clicked += (s, e) => NavRoot.PopToRootAsync ();
+ BackgroundColor = Color.Black;
+ Content = popToRootButton;
+ }
+ }
+
+
+#if UITEST
+ [Test]
+ [UiTest (typeof(NavigationPage), "PopToRootAsync")]
+ public void Issue417TestsNavigateAndPopToRoot ()
+ {
+ RunningApp.WaitForElement (q => q.Marked ("First Page"));
+ RunningApp.WaitForElement (q => q.Button ("Next Page"));
+ RunningApp.Screenshot ("All elements present");
+
+ RunningApp.Tap (q => q.Button ("Next Page"));
+
+ RunningApp.WaitForElement (q => q.Marked ("Second Page"));
+ RunningApp.WaitForElement (q => q.Button ("Next Page 2"));
+ RunningApp.Screenshot ("At second page");
+ RunningApp.Tap (q => q.Button ("Next Page 2"));
+
+ RunningApp.WaitForElement (q => q.Marked ("Third Page"));
+ RunningApp.WaitForElement (q => q.Button ("Pop to root"));
+ RunningApp.Screenshot ("At third page");
+ RunningApp.Tap (q => q.Button ("Pop to root"));
+
+ RunningApp.WaitForElement (q => q.Marked ("First Page"));
+ RunningApp.WaitForElement (q => q.Button ("Next Page"));
+ RunningApp.Screenshot ("All elements present");
+
+ RunningApp.Screenshot ("Popped to root");
+ }
+#endif
+ }
+
+
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue465.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue465.cs
new file mode 100644
index 00000000..75c880af
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue465.cs
@@ -0,0 +1,61 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Reflection;
+using System.Threading.Tasks;
+
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using NUnit.Framework;
+using Xamarin.UITest;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 465, "Change in Navigation.PushModal", PlatformAffected.All)]
+ public class Issue465 : TestTabbedPage
+ {
+ protected override async void Init ()
+ {
+ Children.Add (
+ new ContentPage {
+ Content = new Label {
+ Text = "I was popppppped"
+ }
+ }
+ );
+
+ await Navigation.PushModalAsync (new ModalPage ());
+ }
+
+ [Preserve (AllMembers = true)]
+ public class ModalPage : ContentPage
+ {
+ public ModalPage ()
+ {
+ var popButton = new Button {
+ Text = "Pop this page"
+ };
+ popButton.Clicked += (s, e) => Navigation.PopModalAsync ();
+
+ Content = popButton;
+ }
+ }
+
+#if UITEST
+ [Test]
+ public void Issue465TestsPushPopModal ()
+ {
+ RunningApp.WaitForElement (q => q.Button ("Pop this page"));
+ RunningApp.Screenshot ("All elements exist");
+
+ RunningApp.Tap (q => q.Button ("Pop this page"));
+ RunningApp.WaitForElement (q => q.Marked ("I was popppppped"));
+ RunningApp.Screenshot ("Popped modal successful");
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue488.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue488.cs
new file mode 100644
index 00000000..7d010e72
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue488.cs
@@ -0,0 +1,45 @@
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using NUnit.Framework;
+using Xamarin.UITest;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 488, "Resizing the Label results in wrapped text being cropped on iOS", PlatformAffected.iOS)]
+ public class Issue488 : TestContentPage
+ {
+ protected override void Init ()
+ {
+ var layout = new RelativeLayout {
+ BackgroundColor = Color.Gray
+ };
+ var label = new Label {
+ Text = "I am a long bit of text. I am a long bit of text. I am a long bit of text. I am a long bit of text. I am a long bit of text. I am a long bit of text. I am a long bit of text. I am a long bit of text. I am a long bit of text. I am a long bit of text. I am a long bit of text. I am a long bit of text. I am a long bit of text. I am a long bit of text. I am a long bit of text. I am a long bit of text. I am a long bit of text."
+ };
+ layout.Children.Add (label, () => new Rectangle(0, 0, 250, 400));
+ Content = layout;
+ }
+
+ // Issue: #488
+ // Text wrapping issue in Label
+
+#if UITEST
+ [Test]
+ [Category ("ManualReview")]
+ public void Issue488TestsLongTextRotation ()
+ {
+ RunningApp.WaitForElement (q => q.Marked ("I am a long bit of text. I am a long bit of text. I am a long bit of text. I am a long bit of text. I am a long bit of text. I am a long bit of text. I am a long bit of text. I am a long bit of text. I am a long bit of text. I am a long bit of text. I am a long bit of text. I am a long bit of text. I am a long bit of text. I am a long bit of text. I am a long bit of text. I am a long bit of text. I am a long bit of text."));
+ RunningApp.SetOrientationLandscape ();
+ RunningApp.Screenshot ("Resize Label.Text by rotating to landscape");
+ RunningApp.WaitForElement (q => q.Marked ("I am a long bit of text. I am a long bit of text. I am a long bit of text. I am a long bit of text. I am a long bit of text. I am a long bit of text. I am a long bit of text. I am a long bit of text. I am a long bit of text. I am a long bit of text. I am a long bit of text. I am a long bit of text. I am a long bit of text. I am a long bit of text. I am a long bit of text. I am a long bit of text. I am a long bit of text."));
+ RunningApp.Screenshot ("Entire Label.Text present");
+ RunningApp.SetOrientationPortrait ();
+ RunningApp.Screenshot ("Rotated back to portrait");
+ Assert.Inconclusive ("Manual Review");
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue530.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue530.cs
new file mode 100644
index 00000000..f71f53bf
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue530.cs
@@ -0,0 +1,66 @@
+using System;
+using System.Diagnostics;
+using System.Linq;
+using System.Threading.Tasks;
+
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using NUnit.Framework;
+using Xamarin.UITest;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 530, "ListView does not render if source is async", PlatformAffected.iOS)]
+ public class Issue530 : TestContentPage
+ {
+ ListView _list;
+ Button _button;
+
+ protected override void Init ()
+ {
+ var dataTemplate = new DataTemplate (typeof (TextCell));
+ dataTemplate.SetBinding (TextCell.TextProperty, new Binding ("."));
+
+ _list = new ListView {
+ ItemTemplate = dataTemplate
+ };
+
+ _button = new Button {
+ Text = "Load",
+ };
+
+ _button.Clicked += async (sender, e) => {
+ await Task.Delay (1000);
+ _list.ItemsSource = new [] {"John","Paul", "George", "Ringo"};
+ };
+ Content = new StackLayout {
+ Children = {
+ _button,
+ _list,
+ }
+ };
+ }
+
+#if UITEST
+ [Test]
+ [UiTest (typeof(ListView))]
+ public void Issue530TestsLoadAsync ()
+ {
+ RunningApp.WaitForElement (q => q.Button ("Load"));
+ RunningApp.Screenshot ("All elements present");
+ RunningApp.Tap (q => q.Button ("Load"));
+
+ RunningApp.WaitForElement (q => q.Marked ("John"));
+ RunningApp.WaitForElement (q => q.Marked ("Paul"));
+ RunningApp.WaitForElement (q => q.Marked ("George"));
+ RunningApp.WaitForElement (q => q.Marked ("Ringo"));
+
+ RunningApp.Screenshot ("List items loaded async");
+ }
+#endif
+
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue764.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue764.cs
new file mode 100644
index 00000000..7604fbab
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue764.cs
@@ -0,0 +1,55 @@
+using System;
+using System.Linq;
+
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using NUnit.Framework;
+using Xamarin.UITest;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 764, "Keyboard does not dismiss on SearchBar", PlatformAffected.Android)]
+ public class Issue764 : TestContentPage
+ {
+
+ protected override void Init ()
+ {
+ Title = "Issue 764";
+
+ var searchBar = new SearchBar {
+ Placeholder = "Search Me!"
+ };
+
+ var label = new Label {
+ Text = "Pending Search"
+ };
+
+ searchBar.SearchButtonPressed += (s, e) => label.Text = "Search Activated";
+
+ var layout = new StackLayout {
+ Children = {
+ searchBar,
+ label
+ }
+ };
+
+ Content = layout;
+ }
+
+ // Issue 416
+ // NavigationBar should be visible in modal
+
+#if UITEST
+ [Test]
+ [Category ("ManualReview")]
+ public void Issue764TestsKeyboardDismissedForEnter ()
+ {
+ Assert.Inconclusive ("Needs test");
+ }
+#endif
+
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue773.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue773.cs
new file mode 100644
index 00000000..f2ffc5f6
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue773.cs
@@ -0,0 +1,174 @@
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using NUnit.Framework;
+using Xamarin.UITest;
+using Xamarin.UITest.Queries;
+#endif
+
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 773, "Horizontal ScrollView locks after rotation", PlatformAffected.iOS)]
+ public class Issue773 : TestNavigationPage
+ {
+ protected override void Init ()
+ {
+ PushAsync (new CannotScrollRepro ());
+ }
+
+#if UITEST
+ [Test]
+ [Issue (IssueTracker.Github, 773, "Horizontal ScrollView locks after rotation - relayout correctly after rotation", PlatformAffected.iOS)]
+ [UiTest (typeof(ScrollView))]
+ public void Issue773TestsRotationRelayoutIssue ()
+ {
+ RunningApp.SetOrientationLandscape ();
+
+ var buttonLabels = new [] {
+ "Button 1",
+ "Button 2",
+ "Button 3",
+ };
+
+ foreach (string buttonLabel in buttonLabels)
+ RunningApp.WaitForElement (q => q.Button (buttonLabel));
+
+ RunningApp.Screenshot ("StackLayout in Modal respects rotation");
+
+ RunningApp.SetOrientationPortrait ();
+ }
+
+ //[Test]
+ //[Issue (IssueTracker.Github, 773, "Horizontal ScrollView locks after rotation - can scroll after rotation", PlatformAffected.iOS)]
+ //[UiTest (typeof (ScrollView))]
+ //public void Issue773TestsScrollingBeforeAndAfterRotation ()
+ //{
+// ScrollHorizontalForEnd ();
+// App.WaitForElement (q => q.Marked ("I was clicked once!"));
+// App.Screenshot ("Scrolling successful before rotation");
+//
+// App.SetOrientationLandscape ();
+// App.Tap (q => q.Marked ("Button 8"));
+// App.WaitForElement (q => q.Marked ("I was clicked again!"));
+// App.Screenshot ("Scrolling successful after rotation");
+//
+// App.SetOrientationPortrait ();
+// App.Screenshot ("Can scroll back to beginning");
+//
+// ScrollHorizontalForBeginning ();
+// App.Screenshot ("Can scroll back to beginning");
+// }
+
+ //void ScrollHorizontalForEnd ()
+ //{
+ // int count = 0;
+
+ // AppRect screenBounds = App.ScreenBounds ();
+
+ // float scrollXStart = (4 / 5.0f) * screenBounds.Width;
+ // float scrollXEnd = screenBounds.Width / 5;
+ // float scrollY = App.Query (q => q.Marked ("Button 1"))[0].Rect.CenterY;
+
+ // while (count < 4) {
+ // App.Pan (new Drag (screenBounds, scrollXStart, scrollY, scrollXEnd, scrollY, Drag.Direction.RightToLeft));
+ // count++;
+ // }
+
+ // App.Tap (q => q.Button ("Button 8"));
+ //}
+
+ //void ScrollHorizontalForBeginning ()
+ //{
+ // int count = 0;
+
+ // AppRect screenBounds = App.ScreenBounds ();
+
+ // float scrollXStart = screenBounds.Width / 5;
+ // float scrollXEnd = (4 / 5.0f) * screenBounds.Width;
+ // float scrollY = App.Query (q => q.Button ("Button 8"))[0].Rect.CenterY;
+
+ // while (count < 4) {
+ // App.Pan (new Drag (screenBounds, scrollXStart, scrollY, scrollXEnd, scrollY, Drag.Direction.LeftToRight));
+ // count++;
+ // }
+
+ // App.Tap (q => q.Button ("Button 1"));
+
+ //}
+#endif
+ }
+
+ public class CannotScrollRepro : ContentPage
+ {
+ public CannotScrollRepro ()
+ {
+ Title = "Nav Bar";
+
+ var layout = new StackLayout {
+ Padding = new Thickness (20),
+ BackgroundColor = Color.Gray
+ };
+
+ var button1 = new Button { Text = "Button 1" };
+ var button2 = new Button { Text = "Button 2", IsEnabled = false };
+ var button3 = new Button { Text = "Button 3", IsEnabled = false };
+ var button4 = new Button { Text = "Button 4", IsEnabled = false };
+ var button5 = new Button { Text = "Button 5", IsEnabled = false };
+ var button6 = new Button { Text = "Button 6", IsEnabled = false };
+ var button7 = new Button { Text = "Button 7", IsEnabled = false };
+ var button8 = new Button { Text = "Button 8" };
+
+ var label = new Label { Text = "Not Clicked" };
+
+ var buttonStack = new StackLayout {
+ Padding = new Thickness (30, 0),
+ Orientation = StackOrientation.Horizontal,
+ Spacing = 30,
+ Children = {
+ button1,
+ button2,
+ button3,
+ button4,
+ button5,
+ button6,
+ button7,
+ button8,
+ }
+ };
+
+ button1.Clicked += (sender, args) => Navigation.PopModalAsync ();
+
+ int count = 0;
+ button8.Clicked += (sender, e) => {
+ if (count == 0) {
+ label.Text = "I was clicked once!";
+ count++;
+ } else if (count == 1) {
+ label.Text = "I was clicked again!";
+ count++;
+ } else if (count == 2) {
+ label.Text = "I was clicked again again!";
+ }
+ };
+
+ layout.Children.Add (new BoxView {
+ BackgroundColor = Color.Red,
+ VerticalOptions = LayoutOptions.FillAndExpand,
+ HorizontalOptions = LayoutOptions.FillAndExpand
+ });
+
+ layout.Children.Add (label);
+
+ layout.Children.Add (new ScrollView {
+ BackgroundColor = Color.Aqua,
+ Orientation = ScrollOrientation.Horizontal,
+ HeightRequest = Device.OnPlatform (44, 44, 80),
+ Content = buttonStack
+ });
+
+ Content = layout;
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue774.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue774.cs
new file mode 100644
index 00000000..7eec0f6c
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue774.cs
@@ -0,0 +1,77 @@
+using System.Diagnostics;
+
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+using Xamarin.UITest.iOS;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 774, "ActionSheet won't dismiss after rotation to landscape", PlatformAffected.Android, NavigationBehavior.PushModalAsync)]
+ public class Issue774 : TestContentPage
+ {
+ protected override void Init ()
+ {
+ Content = new StackLayout {
+ Children = {
+ new Label {
+ Text = "Hi"
+ },
+ new Button {
+ Text = "Show ActionSheet",
+ Command = new Command (async () => await DisplayActionSheet ("What's up", "Dismiss", "Destroy"))
+ }
+ }
+ };
+ }
+
+#if UITEST
+ [Test]
+ public void Issue774TestsDismissActionSheetAfterRotation ()
+ {
+
+ RunningApp.Tap (q => q.Button ("Show ActionSheet"));
+ RunningApp.Screenshot ("Show ActionSheet");
+
+ RunningApp.SetOrientationLandscape ();
+ RunningApp.Screenshot ("Rotate Device");
+
+ var app = (RunningApp as iOSApp);
+
+ if (app != null) {
+
+ if (!app.Device.IsTablet)
+ RunningApp.Tap (q => q.Marked ("Dismiss"));
+ else // iPad does not have dismiss option
+ RunningApp.Tap (q => q.Marked ("Destroy"));
+
+ if(app.Device.IsTablet)
+ RunningApp.WaitForNoElement (q => q.Marked ("Destroy"));
+ else
+ RunningApp.WaitForNoElement (q => q.Marked ("Dismiss"));
+ RunningApp.Screenshot ("Dismiss ActionSheet");
+
+// App.SetOrientationPortrait ();
+// App.Tap (q => q.Button ("Show ActionSheet"));
+// App.Screenshot ("Rotate and show ActionSheet");
+//
+// if (!app.Device.IsTablet)
+// App.Tap (q => q.Button ("Dismiss"));
+// else // iPad does not have dismiss option
+// App.Tap (q => q.Marked ("Destroy"));
+//
+// if (app.Device.IsTablet)
+// App.WaitForNoElement (q => q.Marked ("Destroy"));
+// else // iPad does not have dismiss option
+// App.WaitForNoElement (q => q.Marked ("Dismiss"));
+
+ }
+ }
+#endif
+
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue852.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue852.cs
new file mode 100644
index 00000000..b68a6285
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue852.cs
@@ -0,0 +1,154 @@
+using System;
+using System.Diagnostics;
+using System.Linq;
+using System.Threading.Tasks;
+
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using NUnit.Framework;
+using Xamarin.UITest;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 852, "Async loading of Content causes UI element to be unclickable", PlatformAffected.Android | PlatformAffected.iOS)]
+ public class Issue852 : ContentPage
+ {
+#if APP
+ StackLayout _loggingInStackLayout;
+ Button _loginButton;
+ ScrollView _loginScrollView;
+
+ public Issue852 ()
+ {
+ var welcomeLabel = new Label()
+ {
+ Text = "Logging into the System",
+ HorizontalOptions = LayoutOptions.Center
+ };
+
+ var activitySpinner = new ActivityIndicator
+ {
+ Color = new Color(0, 0, 1),
+ IsRunning = true
+ };
+
+ _loggingInStackLayout = new StackLayout
+ {
+ Orientation = StackOrientation.Vertical,
+ VerticalOptions = LayoutOptions.Center,
+ Spacing = 15
+ };
+
+ _loggingInStackLayout.Children.Add(welcomeLabel);
+ _loggingInStackLayout.Children.Add(activitySpinner);
+
+ Content = _loggingInStackLayout;
+ }
+
+ protected override async void OnAppearing()
+ {
+ base.OnAppearing();
+
+ if (!(await AttemptLogin())) //try to log in, if login fails show login screen
+ {
+ Device.BeginInvokeOnMainThread (() => BuildLogin ());
+ }
+ else
+ {
+ Navigation.PopModalAsync();
+ }
+ IsBusy = false;
+
+ }
+
+ void BuildLogin()
+ {
+ Title = "Login";
+ var welcomeLabel = new Label()
+ {
+ Text = "Welcome to the System",
+ HorizontalOptions = LayoutOptions.Center
+ };
+
+ var usernameEntry = new Entry
+ {
+ IsPassword = false,
+ Placeholder = "Username",
+ };
+ usernameEntry.SetBinding(Entry.TextProperty, new Binding("Username"));
+ usernameEntry.Focused += (s, e) => welcomeLabel.Text = "Clicked User";
+
+ var passwordEntry = new Entry
+ {
+ IsPassword = true,
+ Placeholder = "Password",
+ };
+ passwordEntry.SetBinding(Entry.TextProperty, new Binding("Password", BindingMode.TwoWay));
+ passwordEntry.Focused += (s, e) => welcomeLabel.Text = "Clicked Password";
+
+ _loginButton = new Button
+ {
+ ClassId = "loginButton",
+ Text = "Login",
+ };
+ _loginButton.SetBinding(Button.CommandProperty, new Binding("LoginCommand"));
+
+ var loginStackLayout = new StackLayout
+ {
+ Orientation = StackOrientation.Vertical,
+ VerticalOptions = LayoutOptions.Center,
+ Spacing = 15
+ };
+
+ loginStackLayout.Children.Add(welcomeLabel);
+ loginStackLayout.Children.Add(usernameEntry);
+ loginStackLayout.Children.Add(passwordEntry);
+ loginStackLayout.Children.Add(_loginButton);
+
+
+ _loginScrollView = new ScrollView
+ {
+ Orientation = ScrollOrientation.Vertical,
+ Content = loginStackLayout
+ };
+ Content = _loginScrollView;
+ }
+
+ async Task<bool> AttemptLogin()
+ {
+ await Task.Delay(2000);
+ return false; //for this test we are always going ot fail, want to show login screen and error
+ }
+#endif
+#if UITEST
+ [Test]
+ [UiTest (typeof(ContentPage))]
+ public void Issue852TestsEntriesClickable ()
+ {
+ // TODO: Fix ME
+
+ //App.WaitForElement (q => q.Marked ("Welcome to the System"));
+ //App.WaitForElement (PlatformQueries.EntryWithPlaceholder ("Username"));
+ //App.WaitForElement (PlatformQueries.EntryWithPlaceholder ("Password"));
+ //App.WaitForElement (q => q.Button ("Login"));
+ //App.Screenshot ("All elements present");
+
+ //App.Tap (PlatformQueries.EntryWithPlaceholder ("Username"));
+ //App.WaitForElement (q => q.Marked ("Clicked User"));
+ //App.EnterText (PlatformQueries.EntryWithPlaceholder ("Username"), "Usertest");
+ //App.Screenshot ("User entered");
+
+ //App.Tap (PlatformQueries.EntryWithPlaceholder ("Password"));
+ //App.WaitForElement (q => q.Marked ("Clicked Password"));
+ //App.EnterText (PlatformQueries.EntryWithPlaceholder ("Password"), "Userpass");
+ //App.Screenshot ("Password entered");
+
+ //App.Screenshot ("Enties clickable");
+ Assert.Inconclusive ("Fix Test");
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue886.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue886.cs
new file mode 100644
index 00000000..c8a1043e
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue886.cs
@@ -0,0 +1,71 @@
+using System.Diagnostics;
+
+using Xamarin.Forms.CustomAttributes;
+using Xamarin.Forms.Maps;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 886, "Map scrolling problems", PlatformAffected.Android)]
+ public class Issue886 : ContentPage
+ {
+ public Issue886 ()
+ {
+ var isScrollEnabledSwitch = new Switch {
+ IsToggled = true
+ };
+ var isScrollEnabledLabel = new Label {
+ Text = "Scroll Enabled"
+ };
+ var isScrollEnabledLabelOn = new Label {
+ Text = isScrollEnabledSwitch.IsToggled.ToString ()
+ };
+
+ var isZoomEnabledSwitch = new Switch {
+ IsToggled = true
+ };
+ var isZoomEnabledLabel = new Label {
+ Text = "Zoom Enabled"
+ };
+ var isZoomEnabledLabelOn = new Label {
+ Text = isZoomEnabledSwitch.IsToggled.ToString ()
+ };
+
+ var map = new Map ();
+ isScrollEnabledSwitch.Toggled += (sender, e) => {
+ isScrollEnabledLabelOn.Text = e.Value.ToString ();
+ map.HasScrollEnabled = e.Value;
+ };
+
+ isZoomEnabledSwitch.Toggled += (sender, e) => {
+ isZoomEnabledLabelOn.Text = e.Value.ToString ();
+ map.HasZoomEnabled = e.Value;
+ };
+
+ Content = new StackLayout {
+ Children ={
+ new StackLayout {
+ Orientation = StackOrientation.Horizontal,
+ Children = {
+ isScrollEnabledSwitch,
+ isScrollEnabledLabel,
+ isScrollEnabledLabelOn
+ }
+ },
+ new StackLayout {
+ Orientation = StackOrientation.Horizontal,
+ Children = {
+ isZoomEnabledSwitch,
+ isZoomEnabledLabel,
+ isZoomEnabledLabelOn
+ }
+ },
+ map
+ }
+ };
+
+ }
+
+ }
+
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue889.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue889.cs
new file mode 100644
index 00000000..bc8a5ecd
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue889.cs
@@ -0,0 +1,140 @@
+using System.Diagnostics;
+
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using NUnit.Framework;
+using Xamarin.UITest;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 889, "Assigning to MasterDetailPage.Detail after construction doesn't work", PlatformAffected.Android | PlatformAffected.iOS)]
+ public class Issue889 : TestMasterDetailPage
+ {
+ protected override void Init ()
+ {
+ var cells = new [] {
+ new NavPageNameObject ("Page 1"),
+ new NavPageNameObject ("Page 3"),
+ new NavPageNameObject ("Page 4"),
+ new NavPageNameObject ("Page 5"),
+ new NavPageNameObject ("Page 6"),
+ new NavPageNameObject ("Page 7"),
+ new NavPageNameObject ("Page 8"),
+ };
+
+ var template = new DataTemplate (typeof (TextCell));
+ template.SetBinding (TextCell.TextProperty, "PageName");
+
+ var listView = new ListView {
+ ItemTemplate = template,
+ ItemsSource = cells
+ };
+
+ listView.BindingContext = cells;
+
+ listView.ItemTapped += (sender, e) => {
+ var cellName = ((NavPageNameObject)e.Item).PageName;
+ Detail = new CustomNavTabDetailPage (cellName);
+ };
+
+ var master = new ContentPage {
+ Title = "Master",
+ Icon = "bank.png",
+ Content = listView
+ };
+
+
+
+ Master = master;
+ Detail = new CustomNavTabDetailPage ("Initial Page");
+ }
+
+ // Issue892
+ // NavigationPage nested in MasterDetail not working as expected Android
+
+#if UITEST
+ [Test]
+ [Description ("Reproduce app crash - Issue #983")]
+ [UiTest (typeof(MasterDetailPage), "Detail")]
+ public void Issue899TestsAppCrashWhenSwitchingTabs ()
+ {
+ RunningApp.Tap (q => q.Marked ("Push new page"));
+ RunningApp.WaitForElement (q => q.Marked ("I have been pushed"));
+ RunningApp.Screenshot ("Push page");
+ RunningApp.Back ();
+ RunningApp.Screenshot ("Navigate back");
+
+ RunningApp.Tap (q => q.Marked ("Tab 2 Title"));
+ RunningApp.Screenshot ("Go to second tab");
+ }
+#endif
+ }
+
+ public class CustomNavTabDetailPage : NavigationPage
+ {
+ public CustomNavTabDetailPage (string pageName)
+ {
+ PushAsync (new NestedNavTabPageRootView (pageName));
+ }
+ }
+
+ public class NestedNavTabPageRootView : TabbedPage
+ {
+ public NestedNavTabPageRootView (string pageTitle)
+ {
+ Title = pageTitle;
+
+ var tabOne = new ContentPage {
+ Title = "Tab 1 Title",
+ BackgroundColor = Color.FromHex ("#666"),
+ Content = new StackLayout {
+ Children = {
+ new Button {
+ Text = "Push new page",
+ Command = new Command (() => Navigation.PushAsync (new NestedNavTabPageOneLevel ()))
+ }
+ }
+ }
+ };
+
+ var tabTwo = new ContentPage {
+ Title = "Tab 2 Title",
+ BackgroundColor = Color.FromHex ("#BBB"),
+ Content = new StackLayout {
+ Children = {
+ new Button {
+ Text = "Push new page",
+ Command = new Command (() => Navigation.PushAsync (new NestedNavTabPageOneLevel ()))
+ }
+ }
+ }
+ };
+
+ tabOne.SetValue (IconProperty, "bank.png");
+ tabTwo.SetValue (IconProperty, "coffee.png");
+ Children.Add (tabOne);
+ Children.Add (tabTwo);
+ }
+ }
+
+ public class NestedNavTabPageOneLevel : ContentPage
+ {
+ public NestedNavTabPageOneLevel ()
+ {
+ Title = "One pushed";
+ BackgroundColor = Color.FromHex("#999");
+
+ Content = new StackLayout {
+ Children = {
+ new Label {
+ TextColor = Color.Red,
+ Text = "I have been pushed"
+ }
+ }
+ };
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue892.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue892.cs
new file mode 100644
index 00000000..eb93bc82
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue892.cs
@@ -0,0 +1,224 @@
+using System.Diagnostics;
+
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using NUnit.Framework;
+using Xamarin.UITest;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+
+ public class NavPageNameObject
+ {
+ public string PageName { get; private set; }
+
+ public NavPageNameObject (string pageName)
+ {
+ PageName = pageName;
+ }
+ }
+
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 892, "NavigationPages as details in MasterDetailPage don't work as expected", PlatformAffected.Android)]
+ public class Issue892 : TestMasterDetailPage
+ {
+ protected override void Init ()
+ {
+ var cells = new [] {
+ new NavPageNameObject ("Close Master"),
+ new NavPageNameObject ("Page 1"),
+ new NavPageNameObject ("Page 3"),
+ new NavPageNameObject ("Page 4"),
+ new NavPageNameObject ("Page 5"),
+ new NavPageNameObject ("Page 6"),
+ new NavPageNameObject ("Page 7"),
+ new NavPageNameObject ("Page 8"),
+ };
+
+ var template = new DataTemplate (typeof (TextCell));
+ template.SetBinding (TextCell.TextProperty, "PageName");
+
+ var listView = new ListView {
+ ItemTemplate = template,
+ ItemsSource = cells
+ };
+
+ listView.BindingContext = cells;
+
+ listView.ItemTapped += (sender, e) => {
+ var cellName = ((NavPageNameObject)e.Item).PageName;
+ if (cellName == "Close Master") {
+ IsPresented = false;
+ } else {
+ Detail = new CustomNavDetailPage (cellName);
+ }
+ };
+
+ var master = new ContentPage {
+ Padding = new Thickness(0, 20, 0, 0),
+ Title = "Master",
+ Content = listView
+ };
+
+ Master = master;
+ Detail = new CustomNavDetailPage ("Initial Page");
+
+ MessagingCenter.Subscribe<NestedNavPageRootView> (this, "PresentMaster", (sender) => {
+ IsPresented = true;
+ });
+ }
+
+ // Issue892
+ // NavigationPage nested in MasterDetail not working as expected Android
+
+#if UITEST
+ [Test]
+ [Description ("Change pages in the Master ListView, and navigate to the end and back")]
+ [UiTest (typeof(MasterDetailPage))]
+ [UiTest (typeof(NavigationPage))]
+ public void Issue892TestsNavigateChangePagesNavigate ()
+ {
+ NavigateToEndAndBack ();
+
+ RunningApp.Tap (q => q.Marked ("Present Master"));
+
+ RunningApp.Tap (q => q.Marked ("Page 5"));
+
+ RunningApp.Tap (q => q.Marked ("Close Master"));
+
+ RunningApp.Screenshot ("Select new detail navigation");
+
+ NavigateToEndAndBack ();
+ }
+
+ void NavigateToEndAndBack ()
+ {
+ RunningApp.WaitForElement (q => q.Button ("Push next page")); // still required on iOS
+ RunningApp.Tap (q => q.Marked ("Push next page"));
+ RunningApp.Screenshot ("Pushed first page");
+
+ RunningApp.WaitForElement (q => q.Button ("Push next next page")); // still required on iOS
+ RunningApp.Tap (q => q.Marked ("Push next next page"));
+ RunningApp.Screenshot ("Pushed second page");
+
+ RunningApp.WaitForElement (q => q.Marked ("You are at the end of the line"));
+ RunningApp.Screenshot ("Pushed last page");
+
+ RunningApp.Tap (q => q.Marked ("Check back one"));
+ RunningApp.WaitForElement (q => q.Marked ("Pop one"));
+ RunningApp.Back ();
+ RunningApp.Screenshot ("Navigate Back");
+
+ RunningApp.Tap (q => q.Marked ("Check back two"));
+ RunningApp.WaitForElement (q => q.Marked ("Pop two"));
+ RunningApp.Back ();
+ RunningApp.Screenshot ("Navigate Back");
+
+ RunningApp.Tap (q => q.Marked ("Check back three"));
+ RunningApp.WaitForElement (q => q.Marked ("At root"));
+ RunningApp.Screenshot ("At root");
+ }
+#endif
+
+ }
+
+ public class CustomNavDetailPage : NavigationPage
+ {
+ public CustomNavDetailPage (string pageName)
+ {
+ PushAsync (new NestedNavPageRootView (pageName));
+ }
+ }
+
+ public class NestedNavPageRootView : ContentPage
+ {
+ public NestedNavPageRootView (string pageTitle)
+ {
+ Title = pageTitle;
+ BackgroundColor = Color.FromHex("#666");
+
+ var label = new Label {
+ Text = "Not Tapped"
+ };
+
+ Content = new StackLayout {
+ Children = {
+ label,
+ new Button {
+ Text = "Check back three",
+ Command = new Command (() => { label.Text = "At root"; })
+ },
+ new Button {
+ Text = "Push next page",
+ Command = new Command (() => Navigation.PushAsync (new NestedNavPageOneLevel ()))
+ },
+ new Button {
+ Text = "Present Master",
+ Command = new Command (() => {
+ MessagingCenter.Send<NestedNavPageRootView> (this, "PresentMaster");
+ })
+ }
+ }
+ };
+ }
+ }
+
+ public class NestedNavPageOneLevel : ContentPage
+ {
+ public NestedNavPageOneLevel ()
+ {
+ Title = "One pushed";
+ BackgroundColor = Color.FromHex("#999");
+
+ var label = new Label {
+ Text = "Not Tapped"
+ };
+
+ Content = new StackLayout {
+ Children = {
+ label,
+ new Button {
+ Text = "Check back two",
+ Command = new Command (() => { label.Text = "Pop two"; })
+ },
+ new Button {
+ Text = "Push next next page",
+ Command = new Command (() => Navigation.PushAsync (new NestedNavPageTwoLevels ()))
+ }
+ }
+ };
+ }
+ }
+
+ public class NestedNavPageTwoLevels : ContentPage
+ {
+ public NestedNavPageTwoLevels ()
+ {
+ Title = "Two pushed";
+ BackgroundColor = Color.FromHex("#BBB");
+
+ var label = new Label {
+ Text = "Not Tapped",
+ TextColor = Color.Red
+ };
+
+ var label2 = new Label {
+ Text = "You are at the end of the line",
+ TextColor = Color.Red
+ };
+
+ Content = new StackLayout {
+ Children = {
+ label,
+ label2,
+ new Button {
+ Text = "Check back one",
+ Command = new Command (() => { label.Text = "Pop one"; })
+ },
+ }
+ };
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue935.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue935.cs
new file mode 100644
index 00000000..6ddc21bc
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue935.cs
@@ -0,0 +1,83 @@
+using System.Diagnostics;
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using NUnit.Framework;
+using Xamarin.UITest;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ public class Person
+ {
+ public string Name { get; set; }
+
+ public Person (string name)
+ {
+ Name = name;
+ }
+ }
+
+
+ public class CustomViewCell : ViewCell
+ {
+
+ public CustomViewCell ()
+ {
+ int tapsFired = 0;
+
+ Height = 50;
+
+ var label = new Label {
+ Text = "I have been selected:"
+ };
+
+ Tapped += (s, e) => {
+ tapsFired++;
+ label.Text = "I have been selected:" + tapsFired;
+ };
+
+ View = label;
+ }
+ }
+
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 935, "ViewCell.ItemTapped only fires once for ListView.SelectedItem", PlatformAffected.Android)]
+ public class Issue935 : TestContentPage
+ {
+ protected override void Init ()
+ {
+ Title = "List Page";
+
+ var items = new [] {
+ new CustomViewCell (),
+ };
+
+ var cellTemplate = new DataTemplate (typeof(CustomViewCell));
+
+ var list = new ListView () {
+ ItemTemplate = cellTemplate,
+ ItemsSource = items
+ };
+
+ Content = list;
+ }
+
+#if UITEST
+ [Test]
+ [Description ("Verify that OnTapped is fired every time a ViewCell is tapped")]
+ [UiTest (typeof(ViewCell))]
+ [UiTest (typeof(ListView))]
+ [UiTest (typeof(ListView), "SelectedItem")]
+ public void Issue935TestsMultipleOnTappedViewCell ()
+ {
+ RunningApp.Tap (q => q.Marked ("I have been selected:"));
+ RunningApp.Screenshot ("Tapped Cell Once");
+ RunningApp.Tap (q => q.Marked ("I have been selected:1"));
+ RunningApp.WaitForElement (q => q.Marked ("I have been selected:2"));
+ RunningApp.Screenshot ("Tapped Cell Twice");
+ }
+#endif
+
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue968.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue968.cs
new file mode 100644
index 00000000..64c5c8f8
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue968.cs
@@ -0,0 +1,52 @@
+
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using NUnit.Framework;
+using Xamarin.UITest;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 968, "StackLayout does not relayout on device rotation", PlatformAffected.iOS, NavigationBehavior.PushModalAsync)]
+ public class Issue968 : TestContentPage
+ {
+ protected override void Init ()
+ {
+ Title = "Nav Bar";
+
+ var layout = new StackLayout {
+ Padding = new Thickness (20),
+ BackgroundColor = Color.Gray
+ };
+
+ layout.Children.Add (new BoxView {
+ BackgroundColor = Color.Red,
+ VerticalOptions = LayoutOptions.FillAndExpand,
+ HorizontalOptions = LayoutOptions.FillAndExpand
+ });
+
+ layout.Children.Add (new Label {
+ Text = "You should see me after rotating"
+ });
+
+ Content = layout;
+ }
+
+#if UITEST
+ [Test]
+ [Description ("Verify the layout lays out on rotations")]
+ [UiTest (typeof(StackLayout))]
+ public void Issue968TestsRotationRelayoutIssue ()
+ {
+ RunningApp.SetOrientationLandscape ();
+ RunningApp.Screenshot ("Rotated to Landscape");
+ RunningApp.WaitForElement (q => q.Marked ("You should see me after rotating"));
+ RunningApp.Screenshot ("StackLayout in Modal respects rotation");
+ RunningApp.SetOrientationPortrait ();
+ }
+#endif
+
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue973.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue973.cs
new file mode 100644
index 00000000..71a9a629
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue973.cs
@@ -0,0 +1,164 @@
+using System.Diagnostics;
+
+using Xamarin.Forms.CustomAttributes;
+using System;
+
+#if UITEST
+using NUnit.Framework;
+using Xamarin.UITest;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ internal class PageNameObject
+ {
+ public string PageName { get; private set; }
+
+ public PageNameObject (string pageName)
+ {
+ PageName = pageName;
+ }
+ }
+
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 973, "ActionBar doesn't immediately update when nested TabbedPage is changed", PlatformAffected.Android)]
+ public class Issue973 : TestMasterDetailPage
+ {
+ protected override void Init ()
+ {
+ var cells = new [] {
+ new PageNameObject ("Close Master"),
+ new PageNameObject ("Page 1"),
+ new PageNameObject ("Page 2"),
+ new PageNameObject ("Page 3"),
+ new PageNameObject ("Page 4"),
+ new PageNameObject ("Page 5"),
+ new PageNameObject ("Page 6"),
+ new PageNameObject ("Page 7"),
+ new PageNameObject ("Page 8"),
+ };
+
+ var template = new DataTemplate (typeof (TextCell));
+ template.SetBinding (TextCell.TextProperty, "PageName");
+
+ var listView = new ListView {
+ ItemTemplate = template,
+ ItemsSource = cells
+ };
+
+ listView.BindingContext = cells;
+
+ listView.ItemTapped += (sender, e) => {
+
+ var cellName = ((PageNameObject)e.Item).PageName;
+
+ if (cellName == "Close Master") {
+ IsPresented = false;
+ } else {
+ var d = new CustomDetailPage (cellName) {
+ Title = "Detail"
+ };
+
+ d.PresentMaster += (s, args) => {
+ IsPresented = true;
+ };
+
+ Detail = d;
+ }
+ };
+
+ var master = new ContentPage {
+ Padding = new Thickness (0, 20, 0, 0),
+ Title = "Master",
+ Content = listView
+ };
+
+ Master = master;
+
+ var detail = new CustomDetailPage ("Initial Page") {
+ Title = "Detail"
+ };
+
+ detail.PresentMaster += (sender, e) => {
+ IsPresented = true;
+ };
+
+ Detail = detail;
+ }
+
+#if UITEST
+ [Test]
+ [Description ("Test tab reset when swapping out detail")]
+ [UiTest (typeof(NavigationPage))]
+ [UiTest (typeof(TabbedPage))]
+ public void Issue973TestsTabResetAfterDetailSwap ()
+ {
+ RunningApp.WaitForElement (q => q.Marked ("Initial Page Left aligned"));
+ RunningApp.WaitForElement (q => q.Marked ("Tab 1"));
+
+ RunningApp.Tap (q => q.Marked ("Tab 2"));
+ RunningApp.WaitForElement (q => q.Marked ("Initial Page Right aligned"));
+ RunningApp.Screenshot ("Tab 2 showing");
+
+ RunningApp.Tap (q => q.Marked ("Present Master"));
+
+ RunningApp.Tap (q => q.Marked ("Page 4"));
+ RunningApp.Screenshot ("Change detail page");
+
+ RunningApp.Tap (q => q.Marked ("Close Master"));
+
+ RunningApp.WaitForElement (q => q.Marked ("Page 4 Left aligned"));
+ RunningApp.Screenshot ("Tab 1 Showing and tab 1 should be selected");
+
+ RunningApp.Tap (q => q.Marked ("Tab 2"));
+ RunningApp.WaitForElement (q => q.Marked ("Page 4 Right aligned"));
+ RunningApp.Screenshot ("Tab 2 showing");
+ }
+#endif
+
+ }
+
+ internal class CustomDetailPage : TabbedPage
+ {
+ public event EventHandler PresentMaster;
+
+ public CustomDetailPage (string pageName)
+ {
+ Title = pageName;
+
+ Children.Add (new ContentPage {
+ Title = "Tab 1",
+ Content = new StackLayout {
+ Children = {
+ new Label {
+ VerticalOptions = LayoutOptions.Center,
+ HorizontalOptions = LayoutOptions.Start,
+ Text = pageName + " Left aligned"
+ }
+ }
+ }
+ });
+
+ Children.Add (new ContentPage {
+ Title = "Tab 2",
+ Content = new StackLayout {
+ Children = {
+ new Label {
+ VerticalOptions = LayoutOptions.Center,
+ HorizontalOptions = LayoutOptions.End,
+ Text = pageName + " Right aligned"
+ },
+ new Button {
+ Text = "Present Master",
+ Command = new Command (() => {
+ var handler = PresentMaster;
+ if (handler != null)
+ handler(this, EventArgs.Empty);
+ })
+ }
+ }
+ }
+ });
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/ListViewViewCellBinding.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/ListViewViewCellBinding.cs
new file mode 100644
index 00000000..dbc3c8ea
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/ListViewViewCellBinding.cs
@@ -0,0 +1,168 @@
+using System;
+using System.Collections.ObjectModel;
+using System.Threading;
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using NUnit.Framework;
+using Xamarin.UITest;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+
+ public class GenericValueConverter : IValueConverter
+ {
+ Func<object, object> _convert;
+ Func<object, object> _back;
+ public GenericValueConverter (Func<object, object> convert, Func<object, object> back = null)
+ {
+ _convert = convert;
+ _back = back;
+ }
+
+ public object Convert (object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
+ {
+ return _convert (value);
+ }
+
+ public object ConvertBack (object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
+ {
+ return _back (value);
+ }
+ }
+
+ [Preserve (AllMembers = true)]
+ public class Expense
+ {
+ public string Name { get; private set; }
+ public decimal Amount { get; private set; }
+
+ public Expense (string name, decimal amount)
+ {
+ Name = name;
+ Amount = amount;
+ }
+ }
+
+ [Preserve (AllMembers = true)]
+ public class ExpenseListViewCell : ViewCell
+ {
+ public ExpenseListViewCell ()
+ {
+ var expenseNameLabel = new Label ();
+ expenseNameLabel.SetBinding (Label.TextProperty, "Name");
+
+ var expenseAmountLabel = new Label ();
+ var expenseAmountToStringConverter = new GenericValueConverter (obj => string.Format ("{0:C}", ((decimal)obj)));
+ expenseAmountLabel.SetBinding (Label.TextProperty, new Binding ("Amount", converter: expenseAmountToStringConverter));
+
+ var layout = new StackLayout ();
+
+ layout.Children.Add (expenseNameLabel);
+ layout.Children.Add (expenseAmountLabel);
+
+ View = layout;
+ }
+
+ protected override void OnBindingContextChanged ()
+ {
+ // Fixme : this is happening because the View.Parent is getting
+ // set after the Cell gets the binding context set on it. Then it is inheriting
+ // the parents binding context.
+ View.BindingContext = BindingContext;
+ base.OnBindingContextChanged ();
+ }
+ }
+
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.None, 0, "ListView ViewCell binding", PlatformAffected.All)]
+ public class ListViewViewCellBinding : TestContentPage
+ {
+
+ // Binding issue with view cells
+ public ObservableCollection<Expense> Expenses;
+
+ protected override void Init ()
+ {
+ //BindingContext = this;
+
+ Expenses = new ObservableCollection<Expense> {
+ new Expense ("1", 100.0m),
+ new Expense ("2", 200.0m),
+ new Expense ("3", 300.0m)
+ };
+
+ var listView = new ListView ();
+
+ listView.ItemsSource = Expenses;
+ listView.ItemTemplate = new DataTemplate (typeof (ExpenseListViewCell));
+
+ var layout = new StackLayout ();
+ int numberAdded = 3;
+
+ var label = new Label {
+ Text = numberAdded.ToString()
+ };
+
+ var removeBtn = new Button { Text = "Remove" };
+ removeBtn.Clicked += (s, e) => {
+ if (numberAdded > 0) {
+ numberAdded--;
+ Expenses.RemoveAt (0);
+ label.Text = numberAdded.ToString ();
+ }
+ };
+ var addBtn = new Button { Text = "Add" };
+ addBtn.Clicked += (s, e) => {
+ Expenses.Add (new Expense ("4", 400.0m));
+ numberAdded++;
+ label.Text = numberAdded.ToString ();
+ };
+
+
+ layout.Children.Add (label);
+ layout.Children.Add (removeBtn);
+ layout.Children.Add (addBtn);
+ layout.Children.Add (listView);
+
+ Content = layout;
+ }
+
+#if UITEST
+ [Test]
+ public void ListViewViewCellBindingTestsAllElementsPresent ()
+ {
+ RunningApp.WaitForElement (q => q.Marked ("Remove"));
+ RunningApp.WaitForElement (q => q.Marked ("Add"));
+ RunningApp.WaitForElement (q => q.Marked ("1"));
+ RunningApp.WaitForElement (q => q.Marked ("$100.00"));
+ RunningApp.WaitForElement (q => q.Marked ("2"));
+ RunningApp.WaitForElement (q => q.Marked ("$200.00"));
+ RunningApp.WaitForElement (q => q.Marked ("3"));
+ RunningApp.WaitForElement (q => q.Marked ("$300.00"));
+
+ RunningApp.Screenshot ("All elements exist");
+ }
+
+ [Test]
+ public void ListViewViewCellBindingTestsAddListItem ()
+ {
+ RunningApp.Tap (q => q.Button ("Add"));
+ RunningApp.WaitForElement (q => q.Marked ("4"));
+ RunningApp.WaitForElement (q => q.Marked ("$400.00"));
+ RunningApp.Screenshot ("List item added");
+ }
+
+ [Test]
+ public void ListViewViewCellBindingTestsRemoveListItem ()
+ {
+ RunningApp.Tap (q => q.Button ("Remove"));
+ RunningApp.WaitForNoElement (q => q.Marked ("1"));
+ RunningApp.WaitForNoElement (q => q.Marked ("$100.00"));
+ RunningApp.Screenshot ("List item removed");
+ }
+#endif
+
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/ModalActivityIndicatorTest.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/ModalActivityIndicatorTest.cs
new file mode 100644
index 00000000..b60c6351
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/ModalActivityIndicatorTest.cs
@@ -0,0 +1,150 @@
+using System.ComponentModel;
+using System.Runtime.CompilerServices;
+using System.Threading.Tasks;
+using Xamarin.Forms.CustomAttributes;
+using Xamarin.Forms;
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.None, 0, "Activity Indicator Does Not Show when set to default color")]
+ public class ModalActivityIndicatorTest : TestContentPage
+ {
+ protected override void Init ()
+ {
+ var vm = new ModalActivityIndicatorModel () { IsBusy = false, BusyText = "Not busy" };
+
+ var button = new Button () { Text = "Make Busy" };
+ var colorToggle = new Button() {Text = "Toggle Activity Indicator Color" };
+
+ button.Clicked += async (sender, args) => {
+ vm.IsBusy = true;
+ vm.BusyText = "Busy";
+ await Task.Delay (1500);
+ vm.IsBusy = false;
+ vm.BusyText = "Not Busy";
+ };
+
+ var activityIndicator = new ModalActivityIndicator();
+ activityIndicator.BindingContext = vm;
+
+ colorToggle.Clicked += (sender, args) => {
+ vm.Color = vm.Color.IsDefault ? Color.Green : Color.Default;
+ };
+
+ Content = new StackLayout() {
+ Children = { button, colorToggle, activityIndicator }
+ };
+ }
+
+ [Preserve(AllMembers = true)]
+ public class ModalActivityIndicatorModel : INotifyPropertyChanged
+ {
+ bool _isBusy;
+ string _busyText;
+ Color _color;
+
+ public ModalActivityIndicatorModel ()
+ {
+ _color = Color.Default;
+ }
+
+ public bool IsBusy
+ {
+ get { return _isBusy; }
+ set
+ {
+ _isBusy = value;
+ OnPropertyChanged();
+ }
+ }
+
+ public string BusyText
+ {
+ get { return _busyText; }
+ set
+ {
+ _busyText = value;
+ OnPropertyChanged();
+ }
+ }
+
+ public Color Color
+ {
+ get { return _color; }
+ set
+ {
+ _color = value;
+ OnPropertyChanged();
+ }
+ }
+
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ protected virtual void OnPropertyChanged ([CallerMemberName] string propertyName = null)
+ {
+ PropertyChanged?.Invoke (this, new PropertyChangedEventArgs (propertyName));
+ }
+ }
+
+ [Preserve(AllMembers = true)]
+ public class ModalActivityIndicator : RelativeLayout
+ {
+ public ModalActivityIndicator()
+ {
+ this.SetBinding(IsVisibleProperty, "IsBusy");
+ this.SetBinding(IsEnabledProperty, "IsBusy");
+
+ Children.Add(
+ view: new BoxView
+ {
+ Opacity = .4,
+ BackgroundColor = Color.FromHex("#ccc")
+ },
+ widthConstraint: Forms.Constraint.RelativeToParent((parent) => {
+ return parent.Width;
+ }),
+ heightConstraint: Forms.Constraint.RelativeToParent((parent) => {
+ return parent.Height;
+ })
+ );
+
+ var content = new StackLayout
+ {
+ BackgroundColor = Color.White,
+ Spacing = 10,
+ Padding = new Thickness(
+ horizontalSize: 10,
+ verticalSize: 20
+ )
+ };
+
+ var activityIndicator = new ActivityIndicator { IsRunning = true };
+ activityIndicator.SetBinding(ActivityIndicator.ColorProperty, "Color");
+
+ content.Children.Add(activityIndicator);
+ var label = new Label { HorizontalOptions = LayoutOptions.CenterAndExpand };
+
+ label.SetBinding(Label.TextProperty, "BusyText");
+ label.SetBinding(Label.TextColorProperty, "Color");
+
+ content.Children.Add(label);
+
+ Children.Add(
+ view: content,
+ widthConstraint: Forms.Constraint.RelativeToParent((parent) => {
+ return parent.Width / 2;
+ }),
+ heightConstraint: Forms.Constraint.RelativeToParent((parent) => {
+ return parent.Width / 3;
+ }),
+ xConstraint: Forms.Constraint.RelativeToParent((parent) => {
+ return parent.Width / 4;
+ }),
+ yConstraint: Forms.Constraint.RelativeToParent((parent) => {
+ return (parent.Height / 2) - (parent.Width / 6);
+ })
+ );
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/ModelContentPage.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/ModelContentPage.cs
new file mode 100644
index 00000000..d5c0dfc0
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/ModelContentPage.cs
@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.None, 0,"Modal ContentPage", PlatformAffected.All, NavigationBehavior.PushModalAsync)]
+ public class ModalContentPage : ContentPage
+ {
+ public ModalContentPage ()
+ {
+ Title = "Test Modal";
+ Content = new Button {
+ Text = "I am button",
+ VerticalOptions = LayoutOptions.CenterAndExpand,
+ HorizontalOptions = LayoutOptions.CenterAndExpand
+ };
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/NavPage.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/NavPage.cs
new file mode 100644
index 00000000..6d6607d6
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/NavPage.cs
@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.None, 0,"NavigationPage push pop", PlatformAffected.All, NavigationBehavior.PushModalAsync)]
+ public class NavPage : ContentPage
+ {
+ public NavPage ()
+ {
+ NavigationPage page = null;
+
+ var popButton1 = new Button () { Text = "Pop", BackgroundColor = Color.Blue };
+ popButton1.Clicked += (s, a) => Navigation.PopModalAsync ();
+
+ page = new NavigationPage (new ContentPage { Content = popButton1 });
+ Navigation.PushModalAsync (page);
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/NavigationStackTests.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/NavigationStackTests.cs
new file mode 100644
index 00000000..5268dca5
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/NavigationStackTests.cs
@@ -0,0 +1,84 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls.TestCasesPages
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.None, 0, "Navigation Backstack tests", PlatformAffected.All)]
+ public class NavigationStackTests : ContentPage
+ {
+ static int s_pageNumber = 0;
+
+ public NavigationStackTests ()
+ {
+ Title = "Navigation Page " + s_pageNumber;
+
+ var label = new Label {Text = Title};
+ var pushBtn = new Button {Text = "Push"};
+ var pushModalBtn = new Button {Text = "Push Modal"};
+ var pushNoAnimBtn = new Button {Text = "Push No Animation"};
+ var pushModalNoAnimBtn = new Button {Text = "Push Modal No Animation"};
+ var popBtn = new Button {Text = "Pop"};
+ var popModalBtn = new Button {Text = "Pop Modal"};
+ var popNoAnimBtn = new Button {Text = "Pop No Animation"};
+ var popModalNoAnimBtn = new Button {Text = "Pop Modal No Animation"};
+ var insertPageBtn = new Button {Text = "Insert Page"};
+ var removePageBtn = new Button {Text = "Remove Page"};
+
+ pushBtn.Clicked += async (sender, args) => await ((Button) sender).Navigation.PushAsync (new NavigationStackTests ());
+
+ pushModalBtn.Clicked += async (sender, args) => await ((Button) sender).Navigation.PushModalAsync (new NavigationPage(new NavigationStackTests ()));
+
+ pushNoAnimBtn.Clicked += async (sender, args) => await ((Button) sender).Navigation.PushAsync (new NavigationStackTests (), false);
+
+ pushModalNoAnimBtn.Clicked += async (sender, args) => await ((Button) sender).Navigation.PushModalAsync (new NavigationPage(new NavigationStackTests ()), false);
+
+ popBtn.Clicked += async (sender, args) => await ((Button) sender).Navigation.PopAsync ();
+
+ popModalBtn.Clicked += async (sender, args) => await ((Button) sender).Navigation.PopModalAsync ();
+
+ popNoAnimBtn.Clicked += async (sender, args) => await ((Button) sender).Navigation.PopAsync (false);
+
+ popModalNoAnimBtn.Clicked += async (sender, args) => await ((Button) sender).Navigation.PopModalAsync (false);
+
+ insertPageBtn.Clicked += (sender, args) => ((Button) sender).Navigation.InsertPageBefore (new NavigationStackTests (), this);
+
+ removePageBtn.Clicked += (sender, args) => {
+ Element parent = ((Element) sender);
+ NavigationPage navPage = null;
+ while (navPage == null && parent != null) {
+ navPage = parent as NavigationPage;
+ parent = parent.Parent;
+ }
+
+ if (navPage != null) {
+ navPage.Navigation.RemovePage ((Page) navPage.InternalChildren[navPage.InternalChildren.Count - 2]);
+ }
+ };
+
+ Content = new ScrollView {
+ Content = new StackLayout {
+ Children = {
+ label,
+ pushBtn,
+ pushModalBtn,
+ pushNoAnimBtn,
+ pushModalNoAnimBtn,
+ popBtn,
+ popModalBtn,
+ popNoAnimBtn,
+ popModalNoAnimBtn,
+ insertPageBtn,
+ removePageBtn
+ }
+ }
+ };
+
+ s_pageNumber++;
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/ScrollViewOutOfBounds.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/ScrollViewOutOfBounds.cs
new file mode 100644
index 00000000..e0abcc36
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/ScrollViewOutOfBounds.cs
@@ -0,0 +1,59 @@
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.None, 0, "ScrollView out of bounds", PlatformAffected.All)]
+ public class ScrollViewOutOfBounds : ContentPage
+ {
+ public ScrollViewOutOfBounds ()
+ {
+ var header = new Label {
+ Text = "ScrollView",
+ Font = Font.SystemFontOfSize (50, FontAttributes.Bold),
+ HorizontalOptions = LayoutOptions.Center
+ };
+
+ var scrollView = new ScrollView {
+ VerticalOptions = LayoutOptions.FillAndExpand,
+ Content = new Label {
+ Text = "Sometimes page content fits entirely on " +
+ "the page. That's very convenient. But " +
+ "on many occasions, the content of the page " +
+ "is much too large for the page, or only " +
+ "becomes available at runtime." +
+ "\n\n" +
+ "For cases such as these, the ScrollView " +
+ "provides a solution. Simply set its " +
+ "Content property to your content \u2014 in this " +
+ "case a Label but in the general case very " +
+ "likely a Layout derivative with multiple " +
+ "children \u2014 and the ScrollView provides " +
+ "scrolling with the distinctive look and touch " +
+ "familiar to the user." +
+ "\n\n" +
+ "The ScrollView is also capable of " +
+ "horizontal scrolling, and while that's " +
+ "usually not as common as vertical scrolling, " +
+ "sometimes it comes in handy." +
+ "\n\n" +
+ "Most often, the content of a ScrollView is " +
+ "a StackLayout. Whenever you're using a " +
+ "StackLayout with a number of items determined " +
+ "only at runtime, you should probably put it in " +
+ "a StackLayout just to be sure your stuff doesn't " +
+ "go running off the bottom of the screen.",
+ Font = Font.SystemFontOfSize (NamedSize.Large)
+ }
+ };
+
+ // Build the page.
+ Content = new StackLayout {
+ Children = {
+ header,
+ scrollView
+ }
+ };
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/StackLayoutIssue.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/StackLayoutIssue.cs
new file mode 100644
index 00000000..56931857
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/StackLayoutIssue.cs
@@ -0,0 +1,132 @@
+using System.Diagnostics;
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using NUnit.Framework;
+using Xamarin.UITest;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.None, 0, "StackLayout issue", PlatformAffected.All, NavigationBehavior.PushModalAsync)]
+ public class StackLayoutIssue : TestContentPage
+ {
+ protected override void Init ()
+ {
+ var logo = new Image {
+ Source = "cover1.jpg",
+ WidthRequest = 20,
+ HeightRequest = 20,
+ VerticalOptions = LayoutOptions.FillAndExpand,
+ };
+
+ var winPrizeLabel = new Label {
+ Text = "Win a Xamarin Prize",
+ XAlign = TextAlignment.Center,
+ YAlign = TextAlignment.Center,
+ VerticalOptions = LayoutOptions.FillAndExpand
+ };
+
+ Device.OnPlatform (iOS: () => winPrizeLabel.Font = Font.OfSize ("HelveticaNeue-UltraLight", NamedSize.Large));
+
+ StackLayout form = MakeForm ();
+
+ var spinButton = new Button {
+ Text = "Spin"
+ };
+
+ var mainLayout = new StackLayout {
+ Children = {
+ logo,
+ winPrizeLabel,
+ form,
+ spinButton
+ }
+ };
+
+ Content = mainLayout;
+ Padding = new Thickness (50);
+ }
+
+#if UITEST
+ [Test]
+ public void StackLayoutIssueTestsAllElementsPresent ()
+ {
+ // TODO: Fix ME
+
+ //var images = App.Query (PlatformQueries.Images);
+ //Assert.AreEqual (2, images.Length);
+
+ //App.WaitForElement (q => q.Marked ("Win a Xamarin Prize"));
+ //App.WaitForElement (PlatformQueries.EntryWithPlaceholder ("Full Name"));
+ //App.WaitForElement (PlatformQueries.EntryWithPlaceholder ("Email"));
+ //App.WaitForElement (PlatformQueries.EntryWithPlaceholder ("Company"));
+ //App.WaitForElement (q => q.Marked ("Completed Azure Mobile Services Challenge?"));
+
+ //var switches = App.Query (q => q.Raw ("Switch"));
+ //Assert.AreEqual (1, switches.Length);
+
+ //App.WaitForElement (q => q.Button ("Spin"));
+ //App.Screenshot ("All elements present");
+
+ Assert.Inconclusive ("Fix Test");
+ }
+#endif
+
+ StackLayout MakeForm ()
+ {
+ var nameEntry = new Entry {
+ Placeholder = "Full Name"
+ };
+ var emailEntry = new Entry {
+ Placeholder = "Email"
+ };
+
+ var companyEntry = new Entry {
+ Placeholder = "Company"
+ };
+
+ var switchContainer = new StackLayout {
+ Orientation = StackOrientation.Horizontal
+ };
+
+ var switchLabel = new Label {
+ Text = "Completed Azure Mobile Services Challenge?"
+ };
+ var switchElement = new Switch ();
+
+ switchContainer.Children.Add (switchLabel);
+ switchContainer.Children.Add (switchElement);
+
+ var entryContainer = new StackLayout {
+ Children = {
+ nameEntry,
+ emailEntry,
+ companyEntry,
+ switchContainer
+ },
+ MinimumWidthRequest = 50
+ };
+
+ var qrButton = new Image {
+ Source = "cover1.jpg",
+ WidthRequest = 100,
+ HeightRequest = 100
+ };
+
+ var result = new StackLayout {
+ Orientation = StackOrientation.Horizontal
+ };
+
+ result.Children.Add (entryContainer);
+ result.Children.Add (qrButton);
+
+ result.SizeChanged += (sender, args) => {
+ Debug.WriteLine (result.Bounds);
+ };
+
+ return result;
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/SwipeBackNavCrash.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/SwipeBackNavCrash.cs
new file mode 100644
index 00000000..1ec592ba
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/SwipeBackNavCrash.cs
@@ -0,0 +1,88 @@
+using System;
+using System.Diagnostics;
+using System.Linq;
+using System.Threading.Tasks;
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using NUnit.Framework;
+using Xamarin.UITest;
+using Xamarin.UITest.iOS;
+#endif
+
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.None, 0, "Swipe back nav crash", PlatformAffected.iOS)]
+ public class SwipeBackNavCrash : TestNavigationPage
+ {
+ protected override void Init ()
+ {
+ Navigation.PushAsync (new SwipeBackNavCrashPageOne ());
+ }
+
+#if UITEST
+ [Test]
+ public void SwipeBackNavCrashTestsAllElementsPresent ()
+ {
+ RunningApp.WaitForElement (q => q.Marked ("Page One"));
+ RunningApp.WaitForElement (q => q.Button ("Go to second page"));
+ }
+
+ [Test]
+ public void SwipeBackNavCrashTestsGoToSecondPage ()
+ {
+ RunningApp.WaitForElement (q => q.Marked ("Page One"));
+ RunningApp.Tap (q => q.Button ("Go to second page"));
+ RunningApp.Screenshot ("At Second Page");
+ }
+
+ [Test]
+ public void SwipeBackNavCrashTestsSwipeBackDoesNotCrash ()
+ {
+ if (RunningApp is iOSApp) {
+ RunningApp.WaitForElement (q => q.Marked ("Page One"));
+ RunningApp.Tap (q => q.Button ("Go to second page"));
+ RunningApp.WaitForElement (q => q.Marked ("Swipe lightly left and right to crash this page"));
+ System.Threading.Thread.Sleep (3);
+
+ var mainBounds = RunningApp.Query (q => q.Raw ("* index:0")) [0].Rect;
+
+ Xamarin.Forms.Core.UITests.Gestures.Pan (RunningApp, new Xamarin.Forms.Core.UITests.Drag (mainBounds, 0, 125, 75, 125, Xamarin.Forms.Core.UITests.Drag.Direction.LeftToRight));
+ System.Threading.Thread.Sleep (3);
+ RunningApp.Screenshot ("Crash?");
+ RunningApp.WaitForElement (q => q.Marked ("Swipe lightly left and right to crash this page"));
+ }
+ }
+#endif
+
+ }
+
+ public class SwipeBackNavCrashPageOne : ContentPage
+ {
+ public SwipeBackNavCrashPageOne ()
+ {
+ Title = "Page One";
+ var button = new Button {
+ Text = "Go to second page"
+ };
+ button.Clicked += (sender, e) => Navigation.PushAsync (new PageTwo ());
+ Content = button;
+ }
+ }
+
+ public class PageTwo : ContentPage
+ {
+ public PageTwo ()
+ {
+ Title = "Second Page";
+ Content = new StackLayout {
+ Children = {
+ new Label { Text = "Swipe lightly left and right to crash this page" },
+ new BoxView { Color = new Color (0.0) }
+ }
+ };
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/TabbedPageTests.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/TabbedPageTests.cs
new file mode 100644
index 00000000..d2c4de71
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/TabbedPageTests.cs
@@ -0,0 +1,64 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using NUnit.Framework;
+using Xamarin.UITest;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.None, 0,"TabbedPage nav tests", PlatformAffected.All)]
+ public class TabbedPageTests : TestTabbedPage
+ {
+ protected override void Init ()
+ {
+ var popButton1 = new Button () { Text = "Pop", BackgroundColor = Color.Blue };
+ popButton1.Clicked += (s, a) => Navigation.PopModalAsync ();
+
+ var popButton2 = new Button () { Text = "Pop 2", BackgroundColor = Color.Blue };
+ popButton2.Clicked += (s, a) => Navigation.PopModalAsync ();
+
+ Children.Add (new ContentPage () { Title = "Page 1", Content = popButton1 });
+ Children.Add (new ContentPage () { Title = "Page 2", Content = popButton2 });
+ }
+
+#if UITEST
+ [Test]
+ public void TabbedPageWithModalIssueTestsAllElementsPresent ()
+ {
+ RunningApp.WaitForElement (q => q.Marked ("Page 1"));
+ RunningApp.WaitForElement (q => q.Marked ("Page 2"));
+ RunningApp.WaitForElement (q => q.Button ("Pop"));
+
+ RunningApp.Screenshot ("All elements present");
+ }
+
+ [Test]
+ public void TabbedPageWithModalIssueTestsPopFromFirstTab ()
+ {
+ RunningApp.Tap (q => q.Button ("Pop"));
+ RunningApp.WaitForElement (q => q.Marked ("Bug Repro's"));
+
+ RunningApp.Screenshot ("Popped from first tab");
+ }
+
+ [Test]
+ public void TabbedPageWithModalIssueTestsPopFromSecondTab ()
+ {
+ RunningApp.Tap (q => q.Marked ("Page 2"));
+ RunningApp.WaitForElement (q => q.Button ("Pop 2"));
+ RunningApp.Screenshot ("On second tab");
+
+ RunningApp.Tap (q => q.Button ("Pop 2"));
+ RunningApp.WaitForElement (q => q.Marked ("Bug Repro's"));
+ RunningApp.Screenshot ("Popped from second tab");
+ }
+#endif
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/TabbedPageWithList.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/TabbedPageWithList.cs
new file mode 100644
index 00000000..a602d8b6
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/TabbedPageWithList.cs
@@ -0,0 +1,71 @@
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using NUnit.Framework;
+using Xamarin.UITest;
+#endif
+
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ public class TabbedPageWithListName {
+ public string Name { get; set; }
+ }
+
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.None, 0, "TabbedPage with list", PlatformAffected.All)]
+ public class TabbedPageWithList : TestTabbedPage
+ {
+ protected override void Init ()
+ {
+ Title = "Tabbed Page with List";
+ Children.Add (new ContentPage { Title = "Tab Two" });
+ Children.Add (new ListViewTest ());
+ }
+
+#if UITEST
+ [Test]
+ public void TabbedPageWithListViewIssueTestsAllElementsPresent ()
+ {
+ RunningApp.WaitForElement (q => q.Marked ("Tab Two"));
+ RunningApp.WaitForElement (q => q.Marked ("List Page"));
+ RunningApp.Screenshot ("All elements present");
+ }
+
+ [Test]
+ public void TabbedPageWithListViewIssueTestsNavigateToAndVerifyListView ()
+ {
+ RunningApp.Tap (q => q.Marked ("List Page"));
+
+ RunningApp.WaitForElement (q => q.Marked ("Jason"));
+ RunningApp.WaitForElement (q => q.Marked ("Ermau"));
+ RunningApp.WaitForElement (q => q.Marked ("Seth"));
+
+ RunningApp.Screenshot ("ListView correct");
+ }
+#endif
+
+ public class ListViewTest : ContentPage
+ {
+ public ListViewTest ()
+ {
+ Title = "List Page";
+
+ var items = new[] {
+ new TabbedPageWithListName () { Name = "Jason" },
+ new TabbedPageWithListName () { Name = "Ermau" },
+ new TabbedPageWithListName () { Name = "Seth" }
+ };
+
+ var cellTemplate = new DataTemplate (typeof(TextCell));
+ cellTemplate.SetBinding (TextCell.TextProperty, "Name");
+
+ Content = new ListView () {
+ ItemTemplate = cellTemplate,
+ ItemsSource = items
+ };
+ }
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/TestPages/TestPages.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/TestPages/TestPages.cs
new file mode 100644
index 00000000..156a701d
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/TestPages/TestPages.cs
@@ -0,0 +1,223 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Reflection;
+
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using NUnit.Framework;
+using Xamarin.UITest;
+using Xamarin.UITest.Queries;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ internal static class AppPaths
+ {
+ public static string ApkPath = "../../../Xamarin.Forms.ControlGallery.Android/bin/Debug/AndroidControlGallery.AndroidControlGallery-Signed.apk";
+ public static string BundleId = "com.xamarin.quickui.controlgallery";
+ }
+
+#if UITEST
+ internal static class AppSetup
+ {
+ static IApp InitializeApp ()
+ {
+ IApp app = null;
+#if __ANDROID__
+ app = ConfigureApp.Android.ApkFile (AppPaths.ApkPath).Debug ().StartApp ();
+#elif __IOS__
+ app = ConfigureApp.iOS.InstalledApp (AppPaths.BundleId).Debug ()
+ //Uncomment to run from a specific iOS SIM, get the ID from XCode -> Devices
+ //.DeviceIdentifier("55555555-5555-5555-5555-555555555555")
+ .StartApp ();
+#endif
+ if (app == null)
+ throw new NullReferenceException ("App was not initialized.");
+
+ return app;
+ }
+
+ static void NavigateToIssue (Type type, IApp app)
+ {
+ var typeIssueAttribute = type.GetTypeInfo ().GetCustomAttribute <IssueAttribute> ();
+
+ string cellName = "";
+ if (typeIssueAttribute.IssueTracker.ToString () != "None" &&
+ typeIssueAttribute.IssueNumber != 1461 &&
+ typeIssueAttribute.IssueNumber != 342) {
+ cellName = typeIssueAttribute.IssueTracker.ToString ().Substring(0, 1) + typeIssueAttribute.IssueNumber.ToString ();
+ } else {
+ cellName = typeIssueAttribute.Description;
+ }
+
+ app.Tap (q => q.Button ("Go to Test Cases"));
+ app.WaitForElement (q => q.Raw ("* marked:'TestCasesIssueList'"));
+
+ app.EnterText (q => q.Raw ("* marked:'SearchBarGo'"), cellName);
+
+ app.WaitForElement (q => q.Raw ("* marked:'SearchButton'"));
+ app.Tap (q => q.Raw ("* marked:'SearchButton'"));
+ }
+
+ public static IApp Setup (Type pageType)
+ {
+ IApp runningApp = null;
+ try {
+ runningApp = InitializeApp ();
+ } catch {
+ Assert.Inconclusive ("App did not start for some reason");
+ }
+
+ NavigateToIssue (pageType, runningApp);
+ return runningApp;
+ }
+ }
+#endif
+
+ public abstract class TestPage : Page
+ {
+#if UITEST
+ public IApp RunningApp { get; private set; }
+#endif
+
+ protected TestPage ()
+ {
+#if APP
+ Init ();
+#endif
+ }
+
+#if UITEST
+ [SetUp]
+ public void Setup ()
+ {
+ RunningApp = AppSetup.Setup (GetType ());
+ }
+#endif
+
+ protected abstract void Init ();
+ }
+
+
+ public abstract class TestContentPage : ContentPage
+ {
+#if UITEST
+ public IApp RunningApp { get; private set; }
+#endif
+
+ protected TestContentPage ()
+ {
+#if APP
+ Init ();
+#endif
+ }
+
+#if UITEST
+ [SetUp]
+ public void Setup ()
+ {
+ RunningApp = AppSetup.Setup (GetType ());
+ }
+#endif
+
+ protected abstract void Init ();
+ }
+
+ public abstract class TestCarouselPage : CarouselPage
+ {
+#if UITEST
+ public IApp RunningApp { get; private set; }
+#endif
+
+ protected TestCarouselPage ()
+ {
+#if APP
+ Init ();
+#endif
+ }
+
+#if UITEST
+ [SetUp]
+ public void Setup ()
+ {
+ RunningApp = AppSetup.Setup (GetType ());
+ }
+#endif
+
+ protected abstract void Init ();
+ }
+
+ public abstract class TestMasterDetailPage : MasterDetailPage
+ {
+#if UITEST
+ public IApp RunningApp { get; private set; }
+#endif
+
+ protected TestMasterDetailPage ()
+ {
+#if APP
+ Init ();
+#endif
+ }
+
+#if UITEST
+ [SetUp]
+ public void Setup ()
+ {
+ RunningApp = AppSetup.Setup (GetType ());
+ }
+#endif
+
+ protected abstract void Init ();
+ }
+
+ public abstract class TestNavigationPage : NavigationPage
+ {
+#if UITEST
+ public IApp RunningApp { get; private set; }
+#endif
+
+ protected TestNavigationPage ()
+ {
+#if APP
+ Init ();
+#endif
+ }
+
+#if UITEST
+ [SetUp]
+ public void Setup ()
+ {
+ RunningApp = AppSetup.Setup (GetType ());
+ }
+#endif
+
+ protected abstract void Init ();
+ }
+
+ public abstract class TestTabbedPage : TabbedPage
+ {
+#if UITEST
+ public IApp RunningApp { get; private set; }
+#endif
+
+ protected TestTabbedPage ()
+ {
+#if APP
+ Init ();
+#endif
+ }
+
+#if UITEST
+ [SetUp]
+ public void Setup ()
+ {
+ RunningApp = AppSetup.Setup (GetType ());
+ }
+#endif
+
+ protected abstract void Init ();
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems
new file mode 100644
index 00000000..c13429db
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems
@@ -0,0 +1,485 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
+ <HasSharedItems>true</HasSharedItems>
+ <SharedGUID>0f0db9cc-ea65-429c-9363-38624bf8f49c</SharedGUID>
+ </PropertyGroup>
+ <PropertyGroup Label="Configuration">
+ <Import_RootNamespace>Xamarin.Forms.Controls.Issues</Import_RootNamespace>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="$(MSBuildThisFileDirectory)AddingMultipleItemsListView.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)AppBarIconColors.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla21368.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla21501.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla21780.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla22229.xaml.cs">
+ <DependentUpon>Bugzilla22229.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla22401.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla24769.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla25662.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla26501.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla26868.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla27378.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla27581.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla28570.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla28796.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla28939.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla29107.xaml.cs">
+ <DependentUpon>Bugzilla29107.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla29158.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla29363.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla29229.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla31145.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla31333.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla31366.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla31964.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla32034.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla32776.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla32842.xaml.cs">
+ <DependentUpon>Bugzilla32842.xaml</DependentUpon>
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla32847.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla33268.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla33612.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla33714.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla33890.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla34072.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla34007.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla35078.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla35127.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla35157.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla35294.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla35472.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla35477.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla35490.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla35738.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla36014.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla36649.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla36559.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla36171.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla37462.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla37841.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla37863.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla37601.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla38105.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla38827.xaml.cs">
+ <DependentUpon>Bugzilla38827.xaml</DependentUpon>
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla39395.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla39461.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla39483.xaml.cs">
+ <DependentUpon>Bugzilla39483.xaml</DependentUpon>
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla39530.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla39624.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla39463.xaml.cs">
+ <DependentUpon>Bugzilla39463.xaml</DependentUpon>
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="$(MSBuildThisFileDirectory)CarouselAsync.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla34561.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla34727.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)ComplexListView.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)DefaultColorToggleTest.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla38416.xaml.cs">
+ <DependentUpon>Bugzilla38416.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="$(MSBuildThisFileDirectory)InputTransparentIssue.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)IsPasswordToggleTest.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1025.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1026.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1691.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue2983.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue2963.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue2981.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue2964.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla29017.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue2927.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)IsShowingUserIssue.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla25979.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla30317.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla29128.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla31029.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla24574.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla26233.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla27642.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla36393.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla33870.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla32462.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla36681.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla36479.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)ModalActivityIndicatorTest.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla37625.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla38658.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)DataTemplateGridImageTest.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla39331.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla36788.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla38978.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla38112.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla39499.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla39668.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)_Template.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1028.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1075.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1097.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1146.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1219.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1228.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1236.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1259.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1267.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1305.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1329.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1384.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1400.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1461.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1497.xaml.cs">
+ <DependentUpon>Issue1497.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1538.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1545.xaml.cs">
+ <DependentUpon>Issue1545.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1546.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1549.xaml.cs">
+ <DependentUpon>Issue1549.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1554.xaml.cs">
+ <DependentUpon>Issue1554.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1557.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1566.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1567.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1568.xaml.cs">
+ <DependentUpon>Issue1568.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1583.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1590.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1593.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1598.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1613.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1618.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1641.xaml.cs">
+ <DependentUpon>Issue1641.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1644.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1653.xaml.cs">
+ <DependentUpon>Issue1653.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1653v2.xaml.cs">
+ <DependentUpon>Issue1653v2.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1664.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1680.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1682.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1685.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1698.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1700.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1703.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1705.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1712.xaml.cs">
+ <DependentUpon>Issue1712.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1722.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1723.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1741.xaml.cs">
+ <DependentUpon>Issue1741.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1742.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1747.xaml.cs">
+ <DependentUpon>Issue1747.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1755.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1758.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1762.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1763.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1766.xaml.cs">
+ <DependentUpon>Issue1766.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1769.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1777.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue181.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1851.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1875.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1888.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1891.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1895.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1898.xaml.cs">
+ <DependentUpon>Issue1898.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1905.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue1914.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue194.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue198.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue206.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue214.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue2143.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue2191.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue2222.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue22246_BZ.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue2241.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue2248.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue2259.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue2266.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue2270.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue2272.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue2282.xaml.cs">
+ <DependentUpon>Issue2282.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="$(MSBuildThisFileDirectory)Issue2288.xaml.cs">
+ <DependentUpon>Issue2288.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="$(MSBuildThisFileDirectory)Issue2289.xaml.cs">
+ <DependentUpon>Issue2289.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="$(MSBuildThisFileDirectory)Issue229.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue2291.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue2292.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue2294.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue2333.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue2339.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue2354.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue2357.xaml.cs">
+ <DependentUpon>Issue2357.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="$(MSBuildThisFileDirectory)Issue2411.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue2414.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue2470.xaml.cs">
+ <DependentUpon>Issue2470.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="$(MSBuildThisFileDirectory)Issue2563.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue2594.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue2597.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue260.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue2615.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue2628.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue2634.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue264.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue2659.xaml.cs">
+ <DependentUpon>Issue2659.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="$(MSBuildThisFileDirectory)Issue2783.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue2794.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue2809.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue2923.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue342.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue416.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue417.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue488.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue530.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue764.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue773.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue774.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue852.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue886.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue892.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue889.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue935.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue968.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue973.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue465.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)ListViewViewCellBinding.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)ModelContentPage.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)NavigationStackTests.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)NavPage.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)ScrollViewOutOfBounds.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)StackLayoutIssue.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)SwipeBackNavCrash.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)TabbedPageTests.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)TabbedPageWithList.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)TestPages\TestPages.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue2965.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue2775.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue2987.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue2976.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue2951.xaml.cs">
+ <DependentUpon>Issue2951.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="$(MSBuildThisFileDirectory)Issue2961.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue2948.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue2883.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue2953.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue2777.xaml.cs">
+ <DependentUpon>Issue2777.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="$(MSBuildThisFileDirectory)Issue2954.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue3086.xaml.cs">
+ <DependentUpon>Issue3086.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla27779.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla27698.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla29247.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla27318.xaml.cs">
+ <DependentUpon>Bugzilla27318.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla29453.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla28001.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)DisposedSharedPages.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla28575.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla30935.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla26032.xaml.cs">
+ <DependentUpon>Bugzilla26032.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla30835.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla27085.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla31395.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla30651.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla26171.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla31602.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla30353.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla28240.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla30324.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla31255.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla28498.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla32148.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla31967.xaml.cs">
+ <DependentUpon>Bugzilla31967.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="$(MSBuildThisFileDirectory)Issue3276.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla26993.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue3292.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla32230.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla32898.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla31330.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla31114.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Issue3319.xaml.cs">
+ <DependentUpon>Issue3319.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla32691.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla32487.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla34061.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla34632.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla32902.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla32801.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla32447.xaml.cs">
+ <DependentUpon>Bugzilla32447.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla29257.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla32040.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla33450.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla34720.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla35733.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla36009.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla34912.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla32615.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla27350.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla28709.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla33578.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="$(MSBuildThisFileDirectory)Bugzilla22229.xaml">
+ <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
+ </EmbeddedResource>
+ <EmbeddedResource Include="$(MSBuildThisFileDirectory)Issue1497.xaml">
+ <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
+ </EmbeddedResource>
+ <EmbeddedResource Include="$(MSBuildThisFileDirectory)Issue1545.xaml">
+ <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
+ </EmbeddedResource>
+ <EmbeddedResource Include="$(MSBuildThisFileDirectory)Issue1549.xaml">
+ <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
+ </EmbeddedResource>
+ <EmbeddedResource Include="$(MSBuildThisFileDirectory)Issue1554.xaml">
+ <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
+ </EmbeddedResource>
+ <EmbeddedResource Include="$(MSBuildThisFileDirectory)Issue1568.xaml">
+ <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
+ </EmbeddedResource>
+ <EmbeddedResource Include="$(MSBuildThisFileDirectory)Issue1641.xaml">
+ <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
+ </EmbeddedResource>
+ <EmbeddedResource Include="$(MSBuildThisFileDirectory)Issue1653.xaml">
+ <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
+ </EmbeddedResource>
+ <EmbeddedResource Include="$(MSBuildThisFileDirectory)Issue1653v2.xaml">
+ <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
+ </EmbeddedResource>
+ <EmbeddedResource Include="$(MSBuildThisFileDirectory)Issue1712.xaml">
+ <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
+ </EmbeddedResource>
+ <EmbeddedResource Include="$(MSBuildThisFileDirectory)Issue1741.xaml">
+ <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
+ </EmbeddedResource>
+ <EmbeddedResource Include="$(MSBuildThisFileDirectory)Issue1747.xaml">
+ <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
+ </EmbeddedResource>
+ <EmbeddedResource Include="$(MSBuildThisFileDirectory)Issue1766.xaml">
+ <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
+ </EmbeddedResource>
+ <EmbeddedResource Include="$(MSBuildThisFileDirectory)Issue1898.xaml">
+ <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
+ </EmbeddedResource>
+ <EmbeddedResource Include="$(MSBuildThisFileDirectory)Issue2282.xaml">
+ <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
+ </EmbeddedResource>
+ <EmbeddedResource Include="$(MSBuildThisFileDirectory)Issue2288.xaml">
+ <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
+ </EmbeddedResource>
+ <EmbeddedResource Include="$(MSBuildThisFileDirectory)Issue2289.xaml">
+ <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
+ </EmbeddedResource>
+ <EmbeddedResource Include="$(MSBuildThisFileDirectory)Issue2357.xaml">
+ <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
+ </EmbeddedResource>
+ <EmbeddedResource Include="$(MSBuildThisFileDirectory)Issue2470.xaml">
+ <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
+ </EmbeddedResource>
+ <EmbeddedResource Include="$(MSBuildThisFileDirectory)Issue2659.xaml">
+ <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
+ </EmbeddedResource>
+ <EmbeddedResource Include="$(MSBuildThisFileDirectory)Issue2951.xaml">
+ <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
+ </EmbeddedResource>
+ <EmbeddedResource Include="$(MSBuildThisFileDirectory)Issue2777.xaml">
+ <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
+ </EmbeddedResource>
+ <EmbeddedResource Include="$(MSBuildThisFileDirectory)Issue3086.xaml">
+ <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
+ </EmbeddedResource>
+ <EmbeddedResource Include="$(MSBuildThisFileDirectory)Bugzilla27318.xaml">
+ <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
+ </EmbeddedResource>
+ <EmbeddedResource Include="$(MSBuildThisFileDirectory)Bugzilla29107.xaml">
+ <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
+ </EmbeddedResource>
+ <EmbeddedResource Include="$(MSBuildThisFileDirectory)Bugzilla26032.xaml">
+ <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
+ </EmbeddedResource>
+ <EmbeddedResource Include="$(MSBuildThisFileDirectory)Bugzilla31967.xaml">
+ <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
+ </EmbeddedResource>
+ <EmbeddedResource Include="$(MSBuildThisFileDirectory)Issue3319.xaml">
+ <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
+ </EmbeddedResource>
+ <EmbeddedResource Include="$(MSBuildThisFileDirectory)Bugzilla32447.xaml">
+ <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
+ </EmbeddedResource>
+ <EmbeddedResource Include="$(MSBuildThisFileDirectory)Bugzilla38827.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
+ </EmbeddedResource>
+ <EmbeddedResource Include="$(MSBuildThisFileDirectory)Bugzilla32842.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
+ </EmbeddedResource>
+ <EmbeddedResource Include="$(MSBuildThisFileDirectory)Bugzilla39463.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
+ </EmbeddedResource>
+ <EmbeddedResource Include="$(MSBuildThisFileDirectory)Bugzilla38416.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
+ </EmbeddedResource>
+ <EmbeddedResource Include="$(MSBuildThisFileDirectory)Bugzilla39483.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
+ </EmbeddedResource>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.shproj b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.shproj
new file mode 100644
index 00000000..07518054
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.shproj
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>0f0db9cc-ea65-429c-9363-38624bf8f49c</ProjectGuid>
+ </PropertyGroup>
+ <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.Default.props" />
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.props" />
+ <PropertyGroup />
+ <Import Project="Xamarin.Forms.Controls.Issues.Shared.projitems" Label="Shared" />
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.CSharp.targets" />
+</Project>
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/_Template.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/_Template.cs
new file mode 100644
index 00000000..7a1f7711
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/_Template.cs
@@ -0,0 +1,35 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 1, "Issue Description")]
+ public class Issue1 : TestContentPage // or TestMasterDetailPage, etc ...
+ {
+ protected override void Init ()
+ {
+ // Initialize ui here instead of ctor
+ Content = new Label {
+ AutomationId = "IssuePageLabel",
+ Text = "See if I'm here"
+ };
+ }
+
+#if UITEST
+ [Test]
+ public void Issue1Test ()
+ {
+ RunningApp.Screenshot ("I am at Issue 1");
+ RunningApp.WaitForElement (q => q.Marked ("IssuePageLabel"));
+ RunningApp.Screenshot ("I see the Label");
+ }
+#endif
+ }
+}