Ooui-tws-port/Samples/XamarinFormsSample.cs

37 lines
666 B
C#
Raw Normal View History

2017-11-09 07:12:59 +00:00
using System;
using Xamarin.Forms;
using Ooui.Forms;
namespace Samples
{
public class XamarinFormsSample
{
public void Publish ()
{
Forms.Init ();
var countLabel = new Label {
Text = "0",
};
var countButton = new Button {
};
countButton.Clicked += (sender, e) => {
var v = int.Parse (countLabel.Text);
countLabel.Text = (v + 1).ToString ();
};
var page = new ContentPage {
Content = new StackLayout {
Children = {
new Label { Text = "Hello World!" },
countLabel,
countButton,
},
},
};
page.Publish ("/xamarin-forms");
page.PublishShared ("/xamarin-forms-shared");
}
}
}