Skip to content

Instantly share code, notes, and snippets.

@jamesmontemagno
Last active January 2, 2018 23:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamesmontemagno/e48faf5a8c56f80a553c57321f872076 to your computer and use it in GitHub Desktop.
Save jamesmontemagno/e48faf5a8c56f80a553c57321f872076 to your computer and use it in GitHub Desktop.
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using MyFirstOouiApp.Models;
using MyFirstOouiApp.Pages;
using Ooui.AspNetCore;
using Xamarin.Forms;
namespace MyFirstOouiApp.Controllers
{
public class HomeController : Controller
{
public IActionResult Index()
{
var page = new MyPage();
var element = page.GetOouiElement();
return new ElementResult(element, "Hello from XAML!");
}
public IActionResult Error()
{
return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment