Sunday, June 15, 2014

Xamarin.Forms: portable mobile C# GUI

Xamarin.Forms - Build native UIs from a single, shared C# codebase. - Xamarin:

using Xamarin.Forms;

var profilePage = new ContentPage {
    Title = "Profile",
    Icon = "Profile.png",
    Content = new StackLayout {
        Spacing = 20, Padding = 50,
        VerticalOptions = LayoutOptions.Center,
        Children = {
            new Entry { Placeholder = "Username" },
            new Entry { Placeholder = "Password", IsPassword = true },
            new Button {
                Text = "Login",
                TextColor = Color.White,
                BackgroundColor = Color.FromHex("77D065") }}}
};
                
var settingsPage = new ContentPage {
    Title = "Settings",
    Icon = "Settings.png",
    (...)
};
 
var mainPage = new TabbedPage { Children = { profilePage, settingsPage } };

$2000/dev/year
podcast: Xamarin Forms with Chris Hardy @ .NET Rocks!

Or just use Cordova/PhoneGap, and some CSS for GUI adjustments...


No comments: