From 17fdde66d94155fc62a034fa6658995bef6fd6e5 Mon Sep 17 00:00:00 2001 From: Jason Smith Date: Tue, 22 Mar 2016 13:02:25 -0700 Subject: Initial import --- .../AddingMultipleItemsListView.cs | 443 +++++++++++++++++++ .../AppBarIconColors.cs | 52 +++ .../Bugzilla21368.cs | 90 ++++ .../Bugzilla21501.cs | 47 ++ .../Bugzilla21780.cs | 19 + .../Bugzilla22229.xaml | 11 + .../Bugzilla22229.xaml.cs | 51 +++ .../Bugzilla22401.cs | 114 +++++ .../Bugzilla24574.cs | 50 +++ .../Bugzilla24769.cs | 80 ++++ .../Bugzilla25662.cs | 35 ++ .../Bugzilla25979.cs | 133 ++++++ .../Bugzilla26032.xaml | 51 +++ .../Bugzilla26032.xaml.cs | 75 ++++ .../Bugzilla26171.cs | 98 +++++ .../Bugzilla26233.cs | 56 +++ .../Bugzilla26501.cs | 150 +++++++ .../Bugzilla26868.cs | 105 +++++ .../Bugzilla26993.cs | 105 +++++ .../Bugzilla27085.cs | 36 ++ .../Bugzilla27318.xaml | 23 + .../Bugzilla27318.xaml.cs | 22 + .../Bugzilla27350.cs | 151 +++++++ .../Bugzilla27378.cs | 33 ++ .../Bugzilla27581.cs | 29 ++ .../Bugzilla27642.cs | 178 ++++++++ .../Bugzilla27698.cs | 53 +++ .../Bugzilla27779.cs | 83 ++++ .../Bugzilla28001.cs | 60 +++ .../Bugzilla28240.cs | 38 ++ .../Bugzilla28498.cs | 78 ++++ .../Bugzilla28570.cs | 118 +++++ .../Bugzilla28575.cs | 53 +++ .../Bugzilla28709.cs | 94 ++++ .../Bugzilla28796.cs | 35 ++ .../Bugzilla28939.cs | 21 + .../Bugzilla29017.cs | 82 ++++ .../Bugzilla29107.xaml | 249 +++++++++++ .../Bugzilla29107.xaml.cs | 22 + .../Bugzilla29128.cs | 36 ++ .../Bugzilla29158.cs | 24 + .../Bugzilla29229.cs | 29 ++ .../Bugzilla29247.cs | 67 +++ .../Bugzilla29257.cs | 100 +++++ .../Bugzilla29363.cs | 48 ++ .../Bugzilla29453.cs | 72 +++ .../Bugzilla30317.cs | 260 +++++++++++ .../Bugzilla30324.cs | 97 +++++ .../Bugzilla30353.cs | 113 +++++ .../Bugzilla30651.cs | 101 +++++ .../Bugzilla30835.cs | 207 +++++++++ .../Bugzilla30935.cs | 44 ++ .../Bugzilla31029.cs | 126 ++++++ .../Bugzilla31114.cs | 421 ++++++++++++++++++ .../Bugzilla31145.cs | 67 +++ .../Bugzilla31255.cs | 88 ++++ .../Bugzilla31330.cs | 163 +++++++ .../Bugzilla31333.cs | 256 +++++++++++ .../Bugzilla31366.cs | 85 ++++ .../Bugzilla31395.cs | 54 +++ .../Bugzilla31602.cs | 130 ++++++ .../Bugzilla31964.cs | 116 +++++ .../Bugzilla31967.xaml | 18 + .../Bugzilla31967.xaml.cs | 47 ++ .../Bugzilla32034.cs | 31 ++ .../Bugzilla32040.cs | 59 +++ .../Bugzilla32148.cs | 240 ++++++++++ .../Bugzilla32230.cs | 59 +++ .../Bugzilla32447.xaml | 160 +++++++ .../Bugzilla32447.xaml.cs | 28 ++ .../Bugzilla32462.cs | 57 +++ .../Bugzilla32487.cs | 50 +++ .../Bugzilla32615.cs | 70 +++ .../Bugzilla32691.cs | 60 +++ .../Bugzilla32776.cs | 20 + .../Bugzilla32801.cs | 92 ++++ .../Bugzilla32842.xaml | 42 ++ .../Bugzilla32842.xaml.cs | 46 ++ .../Bugzilla32847.cs | 119 +++++ .../Bugzilla32898.cs | 74 ++++ .../Bugzilla32902.cs | 131 ++++++ .../Bugzilla33268.cs | 143 ++++++ .../Bugzilla33450.cs | 47 ++ .../Bugzilla33578.cs | 99 +++++ .../Bugzilla33612.cs | 159 +++++++ .../Bugzilla33714.cs | 86 ++++ .../Bugzilla33870.cs | 71 +++ .../Bugzilla33890.cs | 38 ++ .../Bugzilla34007.cs | 91 ++++ .../Bugzilla34061.cs | 76 ++++ .../Bugzilla34072.cs | 54 +++ .../Bugzilla34561.cs | 89 ++++ .../Bugzilla34632.cs | 79 ++++ .../Bugzilla34720.cs | 352 +++++++++++++++ .../Bugzilla34727.cs | 30 ++ .../Bugzilla34912.cs | 106 +++++ .../Bugzilla35078.cs | 34 ++ .../Bugzilla35127.cs | 22 + .../Bugzilla35157.cs | 58 +++ .../Bugzilla35294.cs | 45 ++ .../Bugzilla35472.cs | 88 ++++ .../Bugzilla35477.cs | 49 +++ .../Bugzilla35490.cs | 39 ++ .../Bugzilla35733.cs | 58 +++ .../Bugzilla35738.cs | 41 ++ .../Bugzilla36009.cs | 56 +++ .../Bugzilla36014.cs | 16 + .../Bugzilla36171.cs | 107 +++++ .../Bugzilla36393.cs | 43 ++ .../Bugzilla36479.cs | 43 ++ .../Bugzilla36559.cs | 54 +++ .../Bugzilla36649.cs | 29 ++ .../Bugzilla36681.cs | 88 ++++ .../Bugzilla36788.cs | 122 ++++++ .../Bugzilla37462.cs | 88 ++++ .../Bugzilla37601.cs | 50 +++ .../Bugzilla37625.cs | 36 ++ .../Bugzilla37841.cs | 153 +++++++ .../Bugzilla37863.cs | 26 ++ .../Bugzilla38105.cs | 59 +++ .../Bugzilla38112.cs | 98 +++++ .../Bugzilla38416.xaml | 27 ++ .../Bugzilla38416.xaml.cs | 48 ++ .../Bugzilla38658.cs | 74 ++++ .../Bugzilla38827.xaml | 24 + .../Bugzilla38827.xaml.cs | 20 + .../Bugzilla38978.cs | 90 ++++ .../Bugzilla39331.cs | 71 +++ .../Bugzilla39395.cs | 30 ++ .../Bugzilla39461.cs | 36 ++ .../Bugzilla39463.xaml | 18 + .../Bugzilla39463.xaml.cs | 33 ++ .../Bugzilla39483.xaml | 24 + .../Bugzilla39483.xaml.cs | 50 +++ .../Bugzilla39499.cs | 134 ++++++ .../Bugzilla39530.cs | 85 ++++ .../Bugzilla39624.cs | 40 ++ .../Bugzilla39668.cs | 51 +++ .../CarouselAsync.cs | 114 +++++ .../ComplexListView.cs | 111 +++++ .../DataTemplateGridImageTest.cs | 55 +++ .../DefaultColorToggleTest.cs | 146 +++++++ .../DisposedSharedPages.cs | 70 +++ .../InputTransparentIssue.cs | 37 ++ .../IsPasswordToggleTest.cs | 38 ++ .../IsShowingUserIssue.cs | 35 ++ .../Issue1025.cs | 24 + .../Issue1026.cs | 91 ++++ .../Issue1028.cs | 31 ++ .../Issue1075.cs | 85 ++++ .../Issue1097.cs | 60 +++ .../Issue1146.cs | 48 ++ .../Issue1219.cs | 19 + .../Issue1228.cs | 67 +++ .../Issue1236.cs | 26 ++ .../Issue1259.cs | 112 +++++ .../Issue1267.cs | 65 +++ .../Issue1305.cs | 50 +++ .../Issue1329.cs | 46 ++ .../Issue1384.cs | 40 ++ .../Issue1400.cs | 153 +++++++ .../Issue1461.cs | 286 ++++++++++++ .../Issue1497.xaml | 27 ++ .../Issue1497.xaml.cs | 20 + .../Issue1538.cs | 28 ++ .../Issue1545.xaml | 16 + .../Issue1545.xaml.cs | 129 ++++++ .../Issue1546.cs | 21 + .../Issue1549.xaml | 34 ++ .../Issue1549.xaml.cs | 74 ++++ .../Issue1554.xaml | 20 + .../Issue1554.xaml.cs | 25 ++ .../Issue1557.cs | 34 ++ .../Issue1566.cs | 91 ++++ .../Issue1567.cs | 37 ++ .../Issue1568.xaml | 53 +++ .../Issue1568.xaml.cs | 22 + .../Issue1583.cs | 20 + .../Issue1590.cs | 123 ++++++ .../Issue1593.cs | 169 +++++++ .../Issue1598.cs | 80 ++++ .../Issue1613.cs | 64 +++ .../Issue1618.cs | 37 ++ .../Issue1641.xaml | 17 + .../Issue1641.xaml.cs | 17 + .../Issue1644.cs | 74 ++++ .../Issue1653.xaml | 22 + .../Issue1653.xaml.cs | 25 ++ .../Issue1653v2.xaml | 20 + .../Issue1653v2.xaml.cs | 23 + .../Issue1664.cs | 46 ++ .../Issue1680.cs | 106 +++++ .../Issue1682.cs | 30 ++ .../Issue1685.cs | 77 ++++ .../Issue1691.cs | 77 ++++ .../Issue1698.cs | 29 ++ .../Issue1700.cs | 30 ++ .../Issue1703.cs | 63 +++ .../Issue1705.cs | 38 ++ .../Issue1712.xaml | 6 + .../Issue1712.xaml.cs | 20 + .../Issue1722.cs | 26 ++ .../Issue1723.cs | 53 +++ .../Issue1741.xaml | 6 + .../Issue1741.xaml.cs | 27 ++ .../Issue1742.cs | 55 +++ .../Issue1747.xaml | 9 + .../Issue1747.xaml.cs | 65 +++ .../Issue1755.cs | 36 ++ .../Issue1758.cs | 68 +++ .../Issue1762.cs | 273 ++++++++++++ .../Issue1763.cs | 104 +++++ .../Issue1766.xaml | 22 + .../Issue1766.xaml.cs | 65 +++ .../Issue1769.cs | 81 ++++ .../Issue1777.cs | 66 +++ .../Issue181.cs | 41 ++ .../Issue1851.cs | 92 ++++ .../Issue1875.cs | 105 +++++ .../Issue1888.cs | 36 ++ .../Issue1891.cs | 81 ++++ .../Issue1895.cs | 80 ++++ .../Issue1898.xaml | 20 + .../Issue1898.xaml.cs | 47 ++ .../Issue1905.cs | 31 ++ .../Issue1914.cs | 27 ++ .../Issue194.cs | 72 +++ .../Issue198.cs | 78 ++++ .../Issue206.cs | 143 ++++++ .../Issue214.cs | 36 ++ .../Issue2143.cs | 55 +++ .../Issue2191.cs | 51 +++ .../Issue2222.cs | 49 +++ .../Issue22246_BZ.cs | 49 +++ .../Issue2241.cs | 58 +++ .../Issue2248.cs | 74 ++++ .../Issue2259.cs | 156 +++++++ .../Issue2266.cs | 162 +++++++ .../Issue2270.cs | 77 ++++ .../Issue2272.cs | 54 +++ .../Issue2282.xaml | 32 ++ .../Issue2282.xaml.cs | 42 ++ .../Issue2288.xaml | 10 + .../Issue2288.xaml.cs | 40 ++ .../Issue2289.xaml | 36 ++ .../Issue2289.xaml.cs | 119 +++++ .../Issue229.cs | 29 ++ .../Issue2291.cs | 36 ++ .../Issue2292.cs | 39 ++ .../Issue2294.cs | 60 +++ .../Issue2333.cs | 39 ++ .../Issue2339.cs | 66 +++ .../Issue2354.cs | 116 +++++ .../Issue2357.xaml | 21 + .../Issue2357.xaml.cs | 418 ++++++++++++++++++ .../Issue2411.cs | 276 ++++++++++++ .../Issue2414.cs | 97 +++++ .../Issue2470.xaml | 29 ++ .../Issue2470.xaml.cs | 155 +++++++ .../Issue2563.cs | 41 ++ .../Issue2594.cs | 33 ++ .../Issue2597.cs | 61 +++ .../Issue260.cs | 41 ++ .../Issue2615.cs | 80 ++++ .../Issue2628.cs | 31 ++ .../Issue2634.cs | 333 ++++++++++++++ .../Issue264.cs | 75 ++++ .../Issue2659.xaml | 34 ++ .../Issue2659.xaml.cs | 64 +++ .../Issue2775.cs | 116 +++++ .../Issue2777.xaml | 23 + .../Issue2777.xaml.cs | 132 ++++++ .../Issue2783.cs | 36 ++ .../Issue2794.cs | 48 ++ .../Issue2809.cs | 50 +++ .../Issue2883.cs | 125 ++++++ .../Issue2923.cs | 83 ++++ .../Issue2927.cs | 105 +++++ .../Issue2948.cs | 232 ++++++++++ .../Issue2951.xaml | 48 ++ .../Issue2951.xaml.cs | 140 ++++++ .../Issue2953.cs | 89 ++++ .../Issue2954.cs | 58 +++ .../Issue2961.cs | 290 ++++++++++++ .../Issue2963.cs | 53 +++ .../Issue2964.cs | 101 +++++ .../Issue2965.cs | 152 +++++++ .../Issue2976.cs | 441 +++++++++++++++++++ .../Issue2981.cs | 37 ++ .../Issue2983.cs | 30 ++ .../Issue2987.cs | 39 ++ .../Issue3086.xaml | 28 ++ .../Issue3086.xaml.cs | 31 ++ .../Issue3276.cs | 91 ++++ .../Issue3292.cs | 83 ++++ .../Issue3319.xaml | 42 ++ .../Issue3319.xaml.cs | 264 +++++++++++ .../Issue342.cs | 85 ++++ .../Issue416.cs | 41 ++ .../Issue417.cs | 110 +++++ .../Issue465.cs | 61 +++ .../Issue488.cs | 45 ++ .../Issue530.cs | 66 +++ .../Issue764.cs | 55 +++ .../Issue773.cs | 174 ++++++++ .../Issue774.cs | 77 ++++ .../Issue852.cs | 154 +++++++ .../Issue886.cs | 71 +++ .../Issue889.cs | 140 ++++++ .../Issue892.cs | 224 ++++++++++ .../Issue935.cs | 83 ++++ .../Issue968.cs | 52 +++ .../Issue973.cs | 164 +++++++ .../ListViewViewCellBinding.cs | 168 +++++++ .../ModalActivityIndicatorTest.cs | 150 +++++++ .../ModelContentPage.cs | 24 + .../NavPage.cs | 25 ++ .../NavigationStackTests.cs | 84 ++++ .../ScrollViewOutOfBounds.cs | 59 +++ .../StackLayoutIssue.cs | 132 ++++++ .../SwipeBackNavCrash.cs | 88 ++++ .../TabbedPageTests.cs | 64 +++ .../TabbedPageWithList.cs | 71 +++ .../TestPages/TestPages.cs | 223 ++++++++++ .../Xamarin.Forms.Controls.Issues.Shared.projitems | 485 +++++++++++++++++++++ .../Xamarin.Forms.Controls.Issues.Shared.shproj | 12 + .../_Template.cs | 35 ++ 327 files changed, 26132 insertions(+) create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/AddingMultipleItemsListView.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/AppBarIconColors.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla21368.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla21501.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla21780.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla22229.xaml create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla22229.xaml.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla22401.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla24574.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla24769.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla25662.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla25979.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla26032.xaml create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla26032.xaml.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla26171.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla26233.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla26501.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla26868.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla26993.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla27085.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla27318.xaml create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla27318.xaml.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla27350.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla27378.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla27581.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla27642.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla27698.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla27779.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla28001.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla28240.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla28498.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla28570.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla28575.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla28709.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla28796.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla28939.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29017.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29107.xaml create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29107.xaml.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29128.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29158.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29229.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29247.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29257.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29363.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla29453.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla30317.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla30324.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla30353.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla30651.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla30835.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla30935.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31029.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31114.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31145.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31255.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31330.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31333.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31366.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31395.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31602.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31964.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31967.xaml create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31967.xaml.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32034.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32040.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32148.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32230.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32447.xaml create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32447.xaml.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32462.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32487.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32615.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32691.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32776.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32801.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32842.xaml create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32842.xaml.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32847.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32898.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32902.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla33268.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla33450.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla33578.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla33612.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla33714.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla33870.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla33890.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla34007.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla34061.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla34072.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla34561.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla34632.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla34720.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla34727.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla34912.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35078.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35127.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35157.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35294.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35472.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35477.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35490.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35733.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla35738.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36009.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36014.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36171.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36393.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36479.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36559.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36649.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36681.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36788.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla37462.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla37601.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla37625.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla37841.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla37863.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla38105.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla38112.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla38416.xaml create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla38416.xaml.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla38658.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla38827.xaml create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla38827.xaml.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla38978.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39331.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39395.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39461.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39463.xaml create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39463.xaml.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39483.xaml create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39483.xaml.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39499.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39530.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39624.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39668.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/CarouselAsync.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/ComplexListView.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/DataTemplateGridImageTest.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/DefaultColorToggleTest.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/DisposedSharedPages.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/InputTransparentIssue.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/IsPasswordToggleTest.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/IsShowingUserIssue.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1025.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1026.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1028.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1075.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1097.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1146.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1219.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1228.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1236.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1259.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1267.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1305.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1329.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1384.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1400.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1461.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1497.xaml create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1497.xaml.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1538.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1545.xaml create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1545.xaml.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1546.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1549.xaml create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1549.xaml.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1554.xaml create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1554.xaml.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1557.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1566.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1567.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1568.xaml create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1568.xaml.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1583.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1590.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1593.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1598.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1613.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1618.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1641.xaml create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1641.xaml.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1644.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1653.xaml create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1653.xaml.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1653v2.xaml create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1653v2.xaml.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1664.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1680.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1682.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1685.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1691.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1698.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1700.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1703.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1705.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1712.xaml create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1712.xaml.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1722.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1723.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1741.xaml create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1741.xaml.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1742.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1747.xaml create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1747.xaml.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1755.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1758.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1762.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1763.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1766.xaml create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1766.xaml.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1769.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1777.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue181.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1851.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1875.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1888.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1891.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1895.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1898.xaml create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1898.xaml.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1905.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1914.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue194.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue198.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue206.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue214.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2143.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2191.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2222.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue22246_BZ.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2241.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2248.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2259.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2266.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2270.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2272.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2282.xaml create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2282.xaml.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2288.xaml create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2288.xaml.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2289.xaml create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2289.xaml.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue229.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2291.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2292.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2294.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2333.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2339.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2354.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2357.xaml create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2357.xaml.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2411.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2414.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2470.xaml create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2470.xaml.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2563.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2594.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2597.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue260.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2615.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2628.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2634.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue264.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2659.xaml create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2659.xaml.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2775.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2777.xaml create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2777.xaml.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2783.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2794.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2809.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2883.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2923.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2927.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2948.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2951.xaml create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2951.xaml.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2953.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2954.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2961.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2963.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2964.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2965.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2976.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2981.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2983.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2987.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue3086.xaml create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue3086.xaml.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue3276.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue3292.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue3319.xaml create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue3319.xaml.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue342.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue416.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue417.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue465.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue488.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue530.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue764.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue773.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue774.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue852.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue886.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue889.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue892.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue935.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue968.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue973.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/ListViewViewCellBinding.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/ModalActivityIndicatorTest.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/ModelContentPage.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/NavPage.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/NavigationStackTests.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/ScrollViewOutOfBounds.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/StackLayoutIssue.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/SwipeBackNavCrash.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/TabbedPageTests.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/TabbedPageWithList.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/TestPages/TestPages.cs create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.shproj create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/_Template.cs (limited to 'Xamarin.Forms.Controls.Issues') 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 _properties = new Dictionary(); + + protected T GetProperty([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 value, [CallerMemberName] string name = null) + { + if (Equals(value, GetProperty(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(); + Validate(); + } + + readonly List _errors; + + public virtual bool IsValid + { + get { return _errors.Count <= 0; } + } + + protected IEnumerable 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 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 _canExecute; + readonly Action _execute; + + public event EventHandler CanExecuteChanged; + + public DelegateCommand(Action execute) + : this(execute, null) + { + } + + public DelegateCommand(Action execute, Predicate 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(); } + set { SetProperty(value); } + } + + public string JobName + { + get { return GetProperty(); } + set { SetProperty(value); } + } + + public double? Hours + { + get { return GetProperty(); } + set { SetProperty(value); } + } + + public bool Locked + { + get { return GetProperty(); } + set { SetProperty(value); } + } + } + + public ExampleViewModel() + { + + Jobs = new ObservableCollection() + { + 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 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() + { + 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 () { "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 @@ + + + + + + + + + + \ 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 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 GetDemoData() + { + List people = new List { + 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 { + 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 (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 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ 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 _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 groups = new List (); + + 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 + { + 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 = "

Xamarin.Forms " + s_id + "

The CSS and image are loaded from local files!

next page

" + } + }; + } + } + + protected override void Init () + { + var itemSource = new List { + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + }; + + 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 @@ + + + + + + + + + + + + + + + \ 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 RecipeGroups { get; set; } + + public async Task LoadRecipesAsync () + { + var groups = new ObservableCollection (); + 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 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 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 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 _itemsSource; + + public class Source : IReadOnlyList + { + List _items; + public Source () + { + _items = new List (); + + for (int i = 0; i < 100; i++) { + _items.Add (new Person ("Person #" + i)); + } + + } + #region IEnumerable implementation + public IEnumerator 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 @@ + + + + + + \ 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 _menuItems = new List { + "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 _items; + int _counter = 0; + + public ObservableCollection Items + { + get { return _items; } + set { _items = value; OnPropertyChanged ();} + } + + public ListViewModel() + { + Items = new ObservableCollection(); + 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 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 + { + 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 (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 _items = new ObservableCollection(); + 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 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 Items { get; } = new ObservableCollection(); + + 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 : 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 { 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 () 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 (); + + 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)); + var editorSection = CreateListViewTestSection (typeof(ExtendedCell)); + + var entryTableSection = CreateTableViewTestSection (); + var editorTableSection = CreateTableViewTestSection (); + + 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 { + 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 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 @@ + + + + + + + + + + + + \ 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 @@ + + + + + + + + + + + + + + + + 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> _collection = new ObservableCollection>(); + + void FillTheList() + { + _collection.Clear(); + + for (int i = 0; i < 100; i++) { + var item = new Tuple ( + 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() { _currentIndex }; + SelectedItem = ((ObservableCollection)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)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 s_pageRefs = new List(); + + 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 @@ + + + + + + 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 @@ + + + + \ 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 @@ + + + + +