-
Notifications
You must be signed in to change notification settings - Fork 1.8k
/
Copy pathIssue20177.cs
61 lines (56 loc) · 1.31 KB
/
Issue20177.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
namespace Maui.Controls.Sample.Issues
{
[Issue(IssueTracker.Github, 20177, "Shell TitleColor changes not only the color of the title, but also the color of the secondary ToolbarItem's titles", PlatformAffected.UWP)]
public class Issue20177 : TestShell
{
protected override void Init()
{
Shell.SetTitleColor(this, Colors.White);
AddContentPage(CreateContentPage());
}
ContentPage CreateContentPage()
{
var page = new ContentPage();
PopulateToolBarItems(page);
page.Content = CreateGrid();
return page;
}
Grid CreateGrid()
{
Grid grid = new Grid()
{
new Label()
{
HorizontalOptions = LayoutOptions.Center,
VerticalOptions= LayoutOptions.Center,
Text = "Secondary ToolBar Items should not use BarTextColor",
AutomationId = "DescriptionLabel"
}
};
return grid;
}
void PopulateToolBarItems(ContentPage page)
{
page.ToolbarItems.Add(new()
{
Text = "Menu item",
Order = ToolbarItemOrder.Primary
});
page.ToolbarItems.Add(new()
{
Text = "Menu item 1",
Order = ToolbarItemOrder.Secondary
});
page.ToolbarItems.Add(new()
{
Text = "Menu item 2",
Order = ToolbarItemOrder.Secondary
});
page.ToolbarItems.Add(new()
{
Text = "Menu item 3",
Order = ToolbarItemOrder.Secondary
});
}
}
}