Skip to content
This repository was archived by the owner on Apr 29, 2024. It is now read-only.

Commit 9597234

Browse files
committed
Code updates.
1 parent 2e33d14 commit 9597234

File tree

2 files changed

+16
-22
lines changed

2 files changed

+16
-22
lines changed

GetStarted/Tutorials/CollectionViewTutorial/CollectionViewTutorial/MainPage.xaml

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,27 +22,21 @@
2222
SelectionChanged="OnSelectionChanged">
2323
<CollectionView.ItemTemplate>
2424
<DataTemplate>
25-
<Grid Padding="10">
26-
<Grid.RowDefinitions>
27-
<RowDefinition Height="Auto" />
28-
<RowDefinition Height="*" />
29-
</Grid.RowDefinitions>
30-
<Grid.ColumnDefinitions>
31-
<ColumnDefinition Width="Auto" />
32-
<ColumnDefinition Width="*" />
33-
</Grid.ColumnDefinitions>
25+
<Grid Padding="10"
26+
RowDefinitions="Auto, *"
27+
ColumnDefinitions="Auto, *">
3428
<Image Grid.RowSpan="2"
35-
Source="{Binding ImageUrl}"
36-
Aspect="AspectFill"
37-
HeightRequest="60"
38-
WidthRequest="60" />
29+
Source="{Binding ImageUrl}"
30+
Aspect="AspectFill"
31+
HeightRequest="60"
32+
WidthRequest="60" />
3933
<Label Grid.Column="1"
40-
Text="{Binding Name}"
41-
FontAttributes="Bold" />
34+
Text="{Binding Name}"
35+
FontAttributes="Bold" />
4236
<Label Grid.Row="1"
43-
Grid.Column="1"
44-
Text="{Binding Location}"
45-
VerticalOptions="End" />
37+
Grid.Column="1"
38+
Text="{Binding Location}"
39+
VerticalOptions="End" />
4640
</Grid>
4741
</DataTemplate>
4842
</CollectionView.ItemTemplate>

GetStarted/Tutorials/CollectionViewTutorial/CollectionViewTutorial/Monkey.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ public class Monkey
66
public string Location { get; set; }
77
public string ImageUrl { get; set; }
88

9-
//public override string ToString()
10-
//{
11-
// return Name;
12-
//}
9+
public override string ToString()
10+
{
11+
return Name;
12+
}
1313
}
1414
}

0 commit comments

Comments
 (0)