CommandBar CreateCommandBar() { #if !WINDOWS_UWP var commandBar = new CommandBar(); _page.BottomAppBar = commandBar; return(commandBar); #else var bar = new FormsCommandBar(); if (Device.Idiom != TargetIdiom.Phone) { bar.Style = (Windows.UI.Xaml.Style)Windows.UI.Xaml.Application.Current.Resources["TitleToolbar"]; } _toolbarProvider = new ToolbarProvider(bar); if (Device.Idiom == TargetIdiom.Phone) { _page.BottomAppBar = bar; } else { _page.TopAppBar = bar; } return(bar); #endif }
CommandBar CreateCommandBar() { #if !WINDOWS_UWP var commandBar = new CommandBar(); _page.BottomAppBar = commandBar; return commandBar; #else var bar = new FormsCommandBar(); if (Device.Idiom != TargetIdiom.Phone) bar.Style = (Windows.UI.Xaml.Style)Windows.UI.Xaml.Application.Current.Resources["TitleToolbar"]; _toolbarProvider = new ToolbarProvider(bar); if (Device.Idiom == TargetIdiom.Phone) _page.BottomAppBar = bar; else _page.TopAppBar = bar; return bar; #endif }