Page BuildRootView() { var barBackgroundColor = Color.FromHex("#2196F3"); var tabbed = new Xamarin.Forms.TabbedPage() { BarBackgroundColor = barBackgroundColor, BarTextColor = Color.White, UnselectedTabColor = Color.FromHex("#184d79"), SelectedTabColor = Color.White, }; //Free var freeViewModel = new FreeFontsViewModel(); var xamlFree = new XamlPage(freeViewModel); var codeFree = new CodePage(freeViewModel); var pages = new List <FontPageBase> { xamlFree, codeFree }; if (ProFontsLoaded()) { var proViewModel = new ProFontsViewModel(); var xamlPro = new XamlPage(proViewModel); var codePro = new CodePage(proViewModel); pages.Add(xamlPro); pages.Add(codePro); } pages.Add(new MiscPage()); foreach (var page in pages) { var nav = new NavigationPage(page) { BarBackgroundColor = barBackgroundColor, Title = page.Title, IconImageSource = new FontImageSource() { Glyph = page.Glyph, FontFamily = page.FontFamily, Size = Device.GetNamedSize(NamedSize.Medium, typeof(Xamarin.Forms.Button)) } }; tabbed.Children.Add(nav); } tabbed.On <Android>().SetToolbarPlacement(ToolbarPlacement.Bottom); return(tabbed); }
static void Main(string[] args) { Console.WriteLine("Starting Ooui"); UI.Host = "10.1.1.155";//This line needed if running on pi and serving to other computers //UI.Host = "10.1.1.199";//This line needed if running on mac and serving to other computers Forms.Init(); var page = new XamlPage(); var page2 = new HomePage(); var element = page.GetOouiElement(); var element2 = page2.GetOouiElement(); UI.Publish("/", element); UI.Publish("/test", element2); Console.ReadLine(); }