summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls.Issues
diff options
context:
space:
mode:
authoradrianknight89 <adrianknight89@outlook.com>2017-01-03 05:30:35 -0600
committerRui Marinho <me@ruimarinho.net>2017-01-03 11:30:35 +0000
commitcc0eb5ba4326de96a52c0318a61b89c3bcb098e5 (patch)
tree71fcbef6e68b39289d362c84d735df1381054c3f /Xamarin.Forms.Controls.Issues
parent8c5fd096945301a2db0d85baf77ce46812a8d89f (diff)
downloadxamarin-forms-cc0eb5ba4326de96a52c0318a61b89c3bcb098e5.tar.gz
xamarin-forms-cc0eb5ba4326de96a52c0318a61b89c3bcb098e5.tar.bz2
xamarin-forms-cc0eb5ba4326de96a52c0318a61b89c3bcb098e5.zip
[iOS] Prevent multiple ListView cells from being swiped simultaneously (#578)
* disable multiple cell swipe * add sample code * refactored * convert to weakreference * remove null setting * change weakreference setting place * remove if * revert isopen changes * add instructions
Diffstat (limited to 'Xamarin.Forms.Controls.Issues')
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla43735.cs61
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems1
2 files changed, 62 insertions, 0 deletions
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla43735.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla43735.cs
new file mode 100644
index 00000000..5f247eaf
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla43735.cs
@@ -0,0 +1,61 @@
+using System.Collections.Generic;
+using Xamarin.Forms.CustomAttributes;
+using Xamarin.Forms.Internals;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls.Issues
+{
+ [Preserve(AllMembers = true)]
+ [Issue(IssueTracker.Bugzilla, 43735, "Multiple Swipe on ContextActions", PlatformAffected.iOS)]
+ public class Bugzilla43735 : TestContentPage // or TestMasterDetailPage, etc ...
+ {
+ protected override void Init()
+ {
+ var stackLayout = new StackLayout();
+
+ var l = new Label
+ {
+ Text = "Swipe multiple cells at the same time. Only one cell should show its context actions."
+ };
+ stackLayout.Children.Add(l);
+
+ var list = new List<int>();
+ for (var i = 0; i < 20; i++)
+ list.Add(i);
+
+ var listView = new ListView
+ {
+ ItemsSource = list,
+ ItemTemplate = new DataTemplate(() =>
+ {
+ var label = new Label();
+ label.SetBinding(Label.TextProperty, new Binding("."));
+
+ return new ViewCell
+ {
+ View = new ContentView
+ {
+ Content = label,
+ },
+ ContextActions = { new MenuItem
+ {
+ Text = "Action"
+ },
+ new MenuItem
+ {
+ Text = "Delete",
+ IsDestructive = true
+ } }
+ };
+ })
+ };
+ stackLayout.Children.Add(listView);
+
+ Content = stackLayout;
+ }
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems
index c5d93821..4820bae3 100644
--- a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems
@@ -139,6 +139,7 @@
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla43469.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla43516.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla43663.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla43735.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla44453.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla44944.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla44166.cs" />