private void ListView_ItemSelected(object sender, SelectedItemChangedEventArgs e) { var item = e.SelectedItem as Models.MenuItem; if (item == null) { return; } var page = (Xamarin.Forms.Page)Activator.CreateInstance(item.TargetType); page.Title = item.Title; var navigationPage = new Xamarin.Forms.NavigationPage(page); navigationPage.On <Xamarin.Forms.PlatformConfiguration.iOS>().SetPrefersLargeTitles(true); navigationPage.On <Xamarin.Forms.PlatformConfiguration.iOS>().SetUseSafeArea(true); App.navigationPage = navigationPage; Detail = navigationPage; IsPresented = false; masterPage.ListView.SelectedItem = null; }
private void SetMainPage() { var mainPage = viewFactory.Resolve <MainViewModel>() as Xamarin.Forms.TabbedPage; if (mainPage.Children.Count > 0) { Xamarin.Forms.Application.Current.MainPage = mainPage; } var ratesNavigationPage = new Xamarin.Forms.NavigationPage(viewFactory.Resolve <RatesViewModel>()) { Title = "Rates", IconImageSource = ImageSource.FromFile("tab_feed.png") }; ratesNavigationPage.On <iOS>().SetHideNavigationBarSeparator(true); ratesNavigationPage.On <iOS>().SetPrefersLargeTitles(true); var calculateNavigationPage = new Xamarin.Forms.NavigationPage(viewFactory.Resolve <CalculateViewModel>()) { Title = "Calculator", IconImageSource = ImageSource.FromFile("tab_about.png") }; calculateNavigationPage.On <iOS>().SetHideNavigationBarSeparator(true); calculateNavigationPage.On <iOS>().SetPrefersLargeTitles(true); mainPage.Children.Add(ratesNavigationPage); mainPage.Children.Add(calculateNavigationPage); Xamarin.Forms.Application.Current.MainPage = mainPage; }
public App() { InitializeComponent(); var navigationPage = new Xamarin.Forms.NavigationPage(new MainPage()); navigationPage.BarBackgroundColor = (Color)Resources["CoolPurple"]; navigationPage.BarTextColor = Color.White; navigationPage.On <iOS>().SetPrefersLargeTitles(true); navigationPage.On <iOS>().SetUseSafeArea(true); MainPage = navigationPage; }
public App() { var toDoNavPage = new Xamarin.Forms.NavigationPage(new ToDoItemsPage()) { Title = "To Do", BarBackgroundColor = Color.FromHex("#2082fa"), BarTextColor = Color.White }; toDoNavPage.On <Xamarin.Forms.PlatformConfiguration.iOS>().SetPrefersLargeTitles(true); var completedNavPage = new Xamarin.Forms.NavigationPage(new CompletedItemsPage()) { Title = "Complete", BarBackgroundColor = Color.FromHex("#2082fa"), BarTextColor = Color.White }; completedNavPage.On <Xamarin.Forms.PlatformConfiguration.iOS>().SetPrefersLargeTitles(true); var mainTabbedPage = new TabbedPage { Children = { toDoNavPage, completedNavPage } }; MainPage = mainTabbedPage; }
public App() { var navigationPage = new Xamarin.Forms.NavigationPage(new MyContentPage()); navigationPage.On<iOS>().SetPrefersLargeTitles(true); MainPage = navigationPage; }
public App() { var contentPage = new ContentPage { Title = "Wrong Toolbar Background Color", Content = new Xamarin.Forms.ScrollView { Content = new Label { HorizontalOptions = LayoutOptions.Center, VerticalOptions = LayoutOptions.Center, Text = "Main Page" } } }; var navigationPage = new Xamarin.Forms.NavigationPage(contentPage) { BarBackgroundColor = Color.Green, BarTextColor = Color.Red }; navigationPage.On <iOS>().SetPrefersLargeTitles(true); MainPage = navigationPage; }
public App() { FFImageLoading.ImageService.Instance.Initialize(new FFImageLoading.Config.Configuration { HttpHeadersTimeout = 60 }); var tabbedPage = new Xamarin.Forms.TabbedPage { Title = "My Weather", BindingContext = new WeatherViewModel(), Children = { new WeatherView(), new ForecastView() } }; tabbedPage.On <Android>().SetToolbarPlacement(ToolbarPlacement.Bottom); if (Device.RuntimePlatform is Device.Android) { tabbedPage.BarBackgroundColor = Color.FromHex("1FAECE"); } var navigationPage = new Xamarin.Forms.NavigationPage(tabbedPage) { BarBackgroundColor = Color.FromHex("1FAECE"), BarTextColor = Color.White }; navigationPage.On <iOS>().SetPrefersLargeTitles(true); MainPage = navigationPage; }
public App() { var settingsNavigationPage = new Xamarin.Forms.NavigationPage(new SettingsPage()) { Icon = "Settings", Title = "Settings", BarBackgroundColor = Color.White, BarTextColor = Color.Black }; settingsNavigationPage.On <Xamarin.Forms.PlatformConfiguration.iOS>().SetPrefersLargeTitles(true); var tabbedPage = new Xamarin.Forms.TabbedPage { Children = { new VotePage(), settingsNavigationPage } }; tabbedPage.On <Xamarin.Forms.PlatformConfiguration.Android>().SetToolbarPlacement(ToolbarPlacement.Bottom); tabbedPage.On <Xamarin.Forms.PlatformConfiguration.Android>().SetBarItemColor(Color.Gray); tabbedPage.On <Xamarin.Forms.PlatformConfiguration.Android>().SetBarSelectedItemColor(Color.Black); MainPage = tabbedPage; }
public App() { InitializeComponent(); signInPage = new SignInPage(OnSignIn); splashPage = new SplashPage(OnSplashAppearing); MainPage = signInPage; navigationPage = new Xamarin.Forms.NavigationPage(new MainPage()); navigationPage.On <iOS>().SetUseSafeArea(true); }
public App() { InitializeComponent(); var navigationPage = new Xamarin.Forms.NavigationPage(new Pages.SplashPage()); navigationPage.On <Xamarin.Forms.PlatformConfiguration.iOS>().SetPrefersLargeTitles(true); MainPage = navigationPage; }
public App() { InitializeComponent(); var navigationPage = new Xamarin.Forms.NavigationPage(new Views.Clientes.ListagemView()); navigationPage.On <Xamarin.Forms.PlatformConfiguration.iOS>().SetPrefersLargeTitles(true); //MainPage = navigationPage; MainPage = new MainPageView(); }
public App() { CrossMediaManager.Current.RequestHeaders.Add(MediaConstants.EncryptedVideoHeaderKey, MediaConstants.EncryptedVideoHeaderToken); var mainPage = new Xamarin.Forms.NavigationPage(new VideoSelectionPage()); mainPage.On <Xamarin.Forms.PlatformConfiguration.iOS>().SetUseSafeArea(true); MainPage = mainPage; }
public App() { Device.SetFlags(new[] { "Markup_Experimental" }); var navigationPage = new Xamarin.Forms.NavigationPage(new ImagePage()); navigationPage.On <iOS>().SetPrefersLargeTitles(true); MainPage = navigationPage; }
public MainPageView() { InitializeComponent(); masterPage.ListView.ItemSelected += ListView_ItemSelected; IsPresented = true; var navigationPage = new Xamarin.Forms.NavigationPage(new Views.Clientes.ListagemView()); navigationPage.On <Xamarin.Forms.PlatformConfiguration.iOS>().SetPrefersLargeTitles(true); this.Detail = navigationPage; }
protected virtual Page CreateContainerPage(Page page) { var curr = new NavigationPage(page) { BarTextColor = Color.White }; curr.On <Xamarin.Forms.PlatformConfiguration.iOS>().HideNavigationBarSeparator(); return(curr); }
public App() { //SetCulture("en-US"); InitializeComponent(); DependencyService.Register <INavigation>(); DependencyService.Register <IAlarmsRepository>(); DependencyService.Register <IAlarmService>(); DependencyService.Register <IMessageBoxService>(); DependencyService.Register <ISpeechToText>(); DependencyService.Get <IAdMobInterstitial>().Start(); var navigationPage = new NavigationPage(new AlarmsPage()); navigationPage.On <iOS>().SetPrefersLargeTitles(true); MainPage = navigationPage; if (!isNotFirst) { var everdayBool = new bool[] { true, true, true, true, true, true, true }; var ListInitAlarm = new List <Alarm>() { new Alarm() { Name = "일어나서 이불개자", Days = new DaysOfWeek(everdayBool), Time = new TimeSpan(7, 0, 0), IsActive = false, Index = 0 }, new Alarm() { Name = "아침 운동 좋아", Days = new DaysOfWeek(everdayBool), Time = new TimeSpan(7, 30, 0), IsActive = false, Index = 1 }, new Alarm() { Name = "일단 침대에 눕자", Days = new DaysOfWeek(everdayBool), Time = new TimeSpan(23, 30, 0), IsActive = false, Index = 2 } }; foreach (var alarm in ListInitAlarm) { AlarmService.SaveAlarmAtLocal(alarm); } var welcomePage = AppIntro.CreateAppIntro(); welcomePage.Vibrate = false; MainPage.Navigation.PushModalAsync(welcomePage); Preferences.Set(nameof(isNotFirst), true); } Alarm.IsInitFinished = true; }
public static Xamarin.Forms.Page CreateSettingsPage() { var settings = new Xamarin.Forms.NavigationPage(new SettingsPage()) { BarBackgroundColor = Color.DarkSlateBlue, BarTextColor = Color.White }; settings.On <iOS>().SetPrefersLargeTitles(true); return(settings); }
public App() { InitializeComponent(); CrossMediaManager.Current.RequestHeaders.Add(MediaConstants.EncryptedVideoHeaderKey, MediaConstants.EncryptedVideoHeaderToken); var navigationPage = new Xamarin.Forms.NavigationPage(new Pages.BasePage.UNFITabbedPage()); navigationPage.On <Xamarin.Forms.PlatformConfiguration.iOS>().SetPrefersLargeTitles(true); MainPage = navigationPage; }
public App() { var navigationPage = new Xamarin.Forms.NavigationPage(new MainPage()) { BarBackgroundColor = Color.FromHex("0099B4"), BarTextColor = Color.White }; navigationPage.On <iOS>().SetPrefersLargeTitles(true); MainPage = navigationPage; }
public App() { var navigationPage = new Xamarin.Forms.NavigationPage(new PowerBIReportsListPage()) { BarTextColor = Color.White, BarBackgroundColor = Color.FromHex("3498db") }; navigationPage.On <iOS>().SetPrefersLargeTitles(true); MainPage = navigationPage; }
void Button_Clicked(System.Object sender, System.EventArgs e) { var navigationPage = new Xamarin.Forms.NavigationPage(new MainPage()); navigationPage.On <Xamarin.Forms.PlatformConfiguration.iOS>().SetStatusBarTextColorMode(StatusBarTextColorMode.MatchNavigationBarTextLuminosity); navigationPage.BarBackgroundColor = Color.FromRgb(10, 99, 52); navigationPage.BackgroundColor = Color.White; navigationPage.BarTextColor = Color.White; App.Current.MainPage = navigationPage; }
public App() { var navigationPage = new Xamarin.Forms.NavigationPage(new LoadImagePage()) { BarBackgroundColor = Color.FromHex(ColorConstants.NavigationPageBarBackgroundColorHex), BarTextColor = Color.FromHex(ColorConstants.NavigationPageBarTextColorHex) }; navigationPage.On <iOS>().SetPrefersLargeTitles(true); MainPage = navigationPage; }
public App() { InitializeComponent(); var navPage = new Xamarin.Forms.NavigationPage(new LocationsPage()) { BarTextColor = Color.White }; navPage.On <Xamarin.Forms.PlatformConfiguration.iOS>().SetPrefersLargeTitles(true); MainPage = navPage; }
public MainPageView() { InitializeComponent(); masterPage.ListView.ItemSelected += ListView_ItemSelected; IsPresented = true; //Página de Detail está sendo atribuída no Constutor da View var navigationPage = new Xamarin.Forms.NavigationPage(new Views.Clientes.ListagemView()); navigationPage.On <Xamarin.Forms.PlatformConfiguration.iOS>().SetPrefersLargeTitles(true); this.Detail = navigationPage;//Atribuição sendo enviada para Tag Detail }
public App() { InitializeComponent(); var navigationPage = new Xamarin.Forms.NavigationPage(new Views.Servicos.ListagemView()); navigationPage.On <Xamarin.Forms.PlatformConfiguration.iOS>().SetPrefersLargeTitles(true); CultureInfo.DefaultThreadCurrentCulture = new CultureInfo("pt-BR"); CultureInfo.DefaultThreadCurrentUICulture = new CultureInfo("pt-BR"); MainPage = navigationPage; }
public void SetsPreferLargeTitles() { Xamarin.Forms.Mocks.MockForms.Init(Device.iOS); var _ = new Xamarin.Forms.Application(); IPageBehaviorFactory factory = new ExtendedPageBehaviorFactory(new DefaultPageBehaviorFactoryOptions()); var page = new NavigationPage(); ConfigurePage(page); factory.ApplyPageBehaviors(page); Assert.True(page.On <iOS>().PrefersLargeTitles()); }
public App() { InitializeComponent(); var navigationPage = new Xamarin.Forms.NavigationPage(new FirstPage()); navigationPage.On <Xamarin.Forms.PlatformConfiguration.iOS>().SetStatusBarTextColorMode(StatusBarTextColorMode.MatchNavigationBarTextLuminosity); navigationPage.BarBackgroundColor = Color.White; navigationPage.BackgroundColor = Color.FromRgb(10, 99, 52); navigationPage.BarTextColor = Color.FromRgb(10, 99, 52); App.Current.MainPage = navigationPage; }
public App() { Device.SetFlags(new[] { "Markup_Experimental" }); var navigationPage = new Xamarin.Forms.NavigationPage(new WelcomePage()) { BarBackgroundColor = ColorConstants.NavigationBarBackgroundColor, BarTextColor = ColorConstants.NaviagtionBarTextColor }; navigationPage.On <iOS>().SetPrefersLargeTitles(true); MainPage = navigationPage; }
public App() { Device.SetFlags(new[] { "Markup_Experimental" }); var mainPage = new Xamarin.Forms.NavigationPage(new ConversionPage()) { BarBackgroundColor = ColorConstants.DarkPurple, BarTextColor = Color.White }; mainPage.On <iOS>().SetPrefersLargeTitles(true); MainPage = mainPage; }
public App() { Device.SetFlags(new[] { "Markup_Experimental" }); var navigationPage = new Xamarin.Forms.NavigationPage(new LoadImagePage()) { BarBackgroundColor = Color.FromHex(ColorConstants.NavigationPageBarBackgroundColorHex), BarTextColor = Color.FromHex(ColorConstants.NavigationPageBarTextColorHex) }; navigationPage.On <iOS>().SetPrefersLargeTitles(true); MainPage = navigationPage; }