blob: 6712729d2fb2e68c6e85ca861d18d0e944a36d4d (
plain)
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
|
using System;
using System.Diagnostics;
using Xamarin.Forms.CustomAttributes;
using Xamarin.Forms.Internals;
namespace Xamarin.Forms.Controls
{
[Preserve (AllMembers=true)]
[Issue (IssueTracker.Github, 229, "ToolbarItems broken", PlatformAffected.Android)]
public class Issue229 : ContentPage
{
public Issue229 ()
{
Title = "I am a navigation page.";
var label = new Label {
Text = "I should have a toolbar item",
#pragma warning disable 618
XAlign = TextAlignment.Center,
#pragma warning restore 618
#pragma warning disable 618
YAlign = TextAlignment.Center
#pragma warning restore 618
};
var refreshBtn = new ToolbarItem ("Refresh", null, () => label.Text = "Clicking it works");
ToolbarItems.Add (refreshBtn);
Content = label;
}
}
}
|