summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla33450.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla33450.cs')
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla33450.cs47
1 files changed, 47 insertions, 0 deletions
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla33450.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla33450.cs
new file mode 100644
index 00000000..e92a7d9f
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla33450.cs
@@ -0,0 +1,47 @@
+´╗┐using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 33450, "[iOS] Cell with ContextAction has a different layout")]
+ public class Bugzilla33450 : TestContentPage // or TestMasterDetailPage, etc ...
+ {
+ protected override void Init ()
+ {
+ var list = new ListView { ItemTemplate = new DataTemplate (typeof(MyImageCell)) };
+
+ list.ItemsSource = new[] {
+ "One",
+ "Two",
+ "Three",
+ "Four",
+ "Five",
+ "Six",
+ "Seven",
+ "Eight",
+ "Nine",
+ "Ten",
+ };
+
+ Content = list;
+ }
+
+ [Preserve (AllMembers = true)]
+ public class MyImageCell : ImageCell
+ {
+ static bool s_addContextAction = false;
+
+ public MyImageCell()
+ {
+ ImageSource = "bank.png";
+ SetBinding(TextProperty, new Binding("."));
+
+ if(s_addContextAction)
+ {
+ ContextActions.Add(new MenuItem() { Text = "Delete" });
+ }
+ s_addContextAction = !s_addContextAction;
+ }
+ }
+ }
+}