forked from xamarin/Xamarin.Forms
/
DefaultTextGallery.cs
37 lines (35 loc) · 1.21 KB
/
DefaultTextGallery.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
namespace Xamarin.Forms.Controls.GalleryPages.CollectionViewGalleries
{
internal class DefaultTextGallery : ContentPage
{
public DefaultTextGallery()
{
var descriptionLabel = new Label
{
Text = "No DataTemplates; just using the ToString() of the objects in the source.",
Margin = new Thickness(2, 2, 2, 2)
};
Title = "Default Text Galleries";
Content = new ScrollView
{
Content = new StackLayout
{
Children =
{
// TODO hartez 2018-06-05 10:43 AM Need a gallery page which allows layout selection
// so we can demonstrate switching between them
descriptionLabel,
GalleryBuilder.NavButton("Vertical List (Code)", () =>
new TextCodeCollectionViewGallery(LinearItemsLayout.Vertical), Navigation),
GalleryBuilder.NavButton("Horizontal List (Code)", () =>
new TextCodeCollectionViewGallery(LinearItemsLayout.Horizontal), Navigation),
GalleryBuilder.NavButton("Vertical Grid (Code)", () =>
new TextCodeCollectionViewGridGallery(), Navigation),
GalleryBuilder.NavButton("Horizontal Grid (Code)", () =>
new TextCodeCollectionViewGridGallery(ItemsLayoutOrientation.Horizontal), Navigation),
}
}
};
}
}
}