This repository was archived by the owner on Apr 29, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +16
-22
lines changed
GetStarted/Tutorials/CollectionViewTutorial/CollectionViewTutorial Expand file tree Collapse file tree 2 files changed +16
-22
lines changed Original file line number Diff line number Diff line change 22
22
SelectionChanged =" OnSelectionChanged" >
23
23
<CollectionView .ItemTemplate>
24
24
<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, *" >
34
28
<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" />
39
33
<Label Grid.Column=" 1"
40
- Text =" {Binding Name}"
41
- FontAttributes =" Bold" />
34
+ Text =" {Binding Name}"
35
+ FontAttributes =" Bold" />
42
36
<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" />
46
40
</Grid >
47
41
</DataTemplate >
48
42
</CollectionView .ItemTemplate>
Original file line number Diff line number Diff line change @@ -6,9 +6,9 @@ public class Monkey
6
6
public string Location { get ; set ; }
7
7
public string ImageUrl { get ; set ; }
8
8
9
- // public override string ToString()
10
- // {
11
- // return Name;
12
- // }
9
+ public override string ToString ( )
10
+ {
11
+ return Name ;
12
+ }
13
13
}
14
14
}
You can’t perform that action at this time.
0 commit comments