-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
Issue4653.cs
74 lines (67 loc) · 1.7 KB
/
Issue4653.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
using Xamarin.Forms.CustomAttributes;
using Xamarin.Forms.Internals;
namespace Xamarin.Forms.Controls.Issues
{
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Github, 4653, "IsTabStop property not working when Grid contains ScrollView", PlatformAffected.UWP)]
public class Issue4653 : TestContentPage
{
protected override void Init()
{
var grid = new Grid()
{
Padding = new Thickness(10),
BackgroundColor = Color.Aquamarine,
IsTabStop = false
};
grid.AddChild(new Button
{
Text = "Toggle Grid IsTabStop",
Command = new Command(() => grid.IsTabStop = !grid.IsTabStop)
}, 0, 0);
grid.AddChild(new Button
{
Text = "IsTabStop: false",
IsTabStop = false
}, 1, 0);
var buttonInSctoolView = new Button
{
Text = "Button inside tadded ScrollView",
IsTabStop = false
};
buttonInSctoolView.Command = new Command(() => {
buttonInSctoolView.IsTabStop = !buttonInSctoolView.IsTabStop;
buttonInSctoolView.Text = $"IsTabStop: {buttonInSctoolView.IsTabStop}";
});
grid.AddChild(new ScrollView
{
Content = buttonInSctoolView
}, 0, 1);
grid.AddChild(new Entry
{
Text = "entry"
}, 1, 1);
int col = 2;
grid.AddChild(new Button
{
Text = "Add default button",
IsTabStop = false,
Command = new Command(() => grid.AddChild(new Button { Text = "default" }, 0, ++col))
}, 0, 2);
int colNonTabbed = 2;
grid.AddChild(new Button
{
Text = "Add non tabbed button",
IsTabStop = true,
Command = new Command(() => grid.AddChild(new Button { Text = "non tabbed", IsTabStop = false }, 1, ++colNonTabbed))
}, 1, 2);
Content = new StackLayout
{
Children =
{
grid
}
};
}
}
}