-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
IndicatorGalleries.cs
49 lines (42 loc) · 1.09 KB
/
IndicatorGalleries.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
38
39
40
41
42
43
44
45
46
47
48
49
using System;
namespace Xamarin.Forms.Controls.GalleryPages
{
public class IndicatorGalleries : ContentPage
{
public IndicatorGalleries()
{
var descriptionLabel =
new Label { Text = "IndicatorView Galleries", Margin = new Thickness(2, 2, 2, 2) };
Title = "IndicatorView Galleries";
var button = new Button
{
Text = "Enable IndicatorView",
AutomationId = "EnableIndicator"
};
button.Clicked += ButtonClicked;
Content = new ScrollView
{
Content = new StackLayout
{
Children =
{
descriptionLabel,
button,
GalleryBuilder.NavButton("IndicatorView Gallery", () =>
new IndicatorsSample(), Navigation),
GalleryBuilder.NavButton("Indicator MaxVisible Gallery", () =>
new IndicatorsSampleMaximumVisible(), Navigation)
}
}
};
}
void ButtonClicked(object sender, EventArgs e)
{
var button = sender as Button;
button.Text = "IndicatorView Enabled!";
button.TextColor = Color.Black;
button.IsEnabled = false;
Device.SetFlags(new[] { ExperimentalFlags.IndicatorViewExperimental });
}
}
}