summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1267.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1267.cs')
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1267.cs65
1 files changed, 65 insertions, 0 deletions
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1267.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1267.cs
new file mode 100644
index 00000000..f194670d
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1267.cs
@@ -0,0 +1,65 @@
+´╗┐using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ public class PersonCell:ViewCell
+ {
+ public PersonCell ()
+ {
+ var grid = new Grid{
+ RowDefinitions = new RowDefinitionCollection {
+ new RowDefinition {Height = new GridLength (1, GridUnitType.Star)},
+ new RowDefinition {Height = GridLength.Auto},
+ },
+ ColumnDefinitions = new ColumnDefinitionCollection {
+ new ColumnDefinition {Width = new GridLength (1, GridUnitType.Star)},
+ new ColumnDefinition {Width = GridLength.Auto},
+ }
+ };
+ Label label;
+ grid.Children.Add (label = new Label {BackgroundColor = Color.Lime});
+ label.SetBinding (Label.TextProperty, "FirstName");
+
+ grid.Children.Add (label = new Label (),0,1);
+ label.SetBinding (Label.TextProperty, "LastName");
+
+ grid.Children.Add (label = new Label {XAlign = TextAlignment.End},1,0);
+ label.SetBinding (Label.TextProperty, "Zip");
+
+ grid.Children.Add (label = new Label {XAlign = TextAlignment.End},1,1);
+ label.SetBinding (Label.TextProperty, "City");
+ View = grid;
+
+
+ }
+ }
+
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 1267, "Star '*' in Grid layout throws exception", PlatformAffected.WinPhone)]
+ public class Issue1267 : ContentPage
+ {
+ public Issue1267 ()
+ {
+ var lv = new ListView {
+ ItemsSource = new []{
+ new {FirstName = "foo", LastName="bar", Zip="1234", City="Gotham City"},
+ new {FirstName = "foo", LastName="bar", Zip="1234", City="Gotham City"},
+ new {FirstName = "foo", LastName="bar", Zip="1234", City="Gotham City"},
+ new {FirstName = "foo", LastName="bar", Zip="1234", City="Gotham City"},
+ new {FirstName = "foo", LastName="bar", Zip="1234", City="Gotham City"},
+ new {FirstName = "foo", LastName="bar", Zip="1234", City="Gotham City"},
+ new {FirstName = "foo", LastName="bar", Zip="1234", City="Gotham City"},
+ new {FirstName = "foo", LastName="bar", Zip="1234", City="Gotham City"},
+ new {FirstName = "foo", LastName="bar", Zip="1234", City="Gotham City"},
+ new {FirstName = "foo", LastName="bar", Zip="1234", City="Gotham City"},
+ new {FirstName = "foo", LastName="bar", Zip="1234", City="Gotham City"},
+ new {FirstName = "foo", LastName="bar", Zip="1234", City="Gotham City"},
+ new {FirstName = "foo", LastName="bar", Zip="1234", City="Gotham City"},
+ },
+ ItemTemplate = new DataTemplate (typeof(PersonCell)),
+ };
+ Content = lv;
+ }
+ }
+}
+