public SearchPage() { NavigationPage.SetHasNavigationBar(this, false); View toolbar = new Toolbar(this); Content = new StackLayout { Children = { toolbar, new Label { Text = "Search Page" } } }; }
public WallPage() { // Use our own navigation NavigationPage.SetHasNavigationBar(this, false); // Create our custom toolbar View toolbar = new Toolbar(this); // Current this is just a stub - show toolbar and heading Content = new StackLayout { Children = { toolbar, new Label { Text = "Wall Page" } } }; }
public MessagesPage() { NavigationPage.SetHasNavigationBar(this, false); View toolbar = new Toolbar (this); var _header = new Label { Text = " INBOX ", FontSize = 20, FontFamily = "Helvetica Neue,Helvetica,Arial", XAlign = TextAlignment.Start, YAlign = TextAlignment.Center, //WidthRequest = 2000, // HeightRequest = 40, HorizontalOptions = LayoutOptions.FillAndExpand, BackgroundColor = Color.FromHex ("29B6F6"), TextColor = Color.White, }; var _newButton = new Button { Text = "New ", VerticalOptions = LayoutOptions.FillAndExpand, HorizontalOptions = LayoutOptions.Start, TextColor = Color.White, //WidthRequest = 150, BackgroundColor = Color.FromHex ("29B6F6"), }; var newHeader = new ContentView { Padding = new Thickness (0, 0, 0, 0), Content = _header, //WidthRequest=2000 }; var newButton = new ContentView { //Padding = new Thickness (-10, 0, 10, 0), //HorizontalOptions = LayoutOptions.FillAndExpand, Content = _newButton, //WidthRequest=2000 }; var _box = new BoxView { BackgroundColor = Color.FromHex ("29B6F6"), HorizontalOptions = LayoutOptions.FillAndExpand, VerticalOptions = LayoutOptions.Fill, //WidthRequest = 2000 }; var box = new ContentView { //Padding = new Thickness (-20, 0, 0, 0), HorizontalOptions = LayoutOptions.FillAndExpand, Content = _box, }; StackLayout header = new StackLayout { Orientation = StackOrientation.Horizontal, HorizontalOptions = LayoutOptions.FillAndExpand, VerticalOptions = LayoutOptions.FillAndExpand, Spacing = 0, Padding = new Thickness (0, -10, 0, 0), //WidthRequest = 2000, //HeightRequest = 40, // BackgroundColor = Color.FromHex ("29B6F6"), BackgroundColor = Color.Red, Children = { newHeader, newButton, box } //Children = {_header, _newButton, box} }; var searchMessages = new Entry () { Keyboard = Keyboard.Chat, VerticalOptions = LayoutOptions.CenterAndExpand, TextColor = Color.Black, HeightRequest = 30, Placeholder = "Search Messages" }; Content = new StackLayout { VerticalOptions = LayoutOptions.StartAndExpand, Children = { toolbar, header, searchMessages, new Label { Text = "Messages" } }, }; }
public MainMapPage() { NavigationPage.SetHasNavigationBar(this, false); var map = new Map( MapSpan.FromCenterAndRadius( new Xamarin.Forms.Maps.Position(37,-122), Distance.FromMiles(0.3))) { IsShowingUser = true, VerticalOptions = LayoutOptions.FillAndExpand }; _map = map; //View toolbar = CreateTopMenu(); View toolbar = new Toolbar(this); //toolbar.WidthRequest = 1000; //toolbar.HeightRequest = 50; toolbar.BackgroundColor = Color.White; Button b = new Button { Text = "GetPosition" }; lblMonthCount= new Label { Text = "Month_Steps",FontSize =8 }; lbldayCount= new Label { Text = "Day_Steps",FontSize =8 }; //Timer timer = new Timer(timerDelegate, s, 1000, 1000); b.Clicked += (sender, ea) => GetPosition1 (); var stack = new StackLayout { Spacing = 0 }; stack.BackgroundColor = Color.White; stack.Children.Add (toolbar); stack.Children.Add(map); stack.Children.Add (b); stack.Children.Add (lblMonthCount); stack.Children.Add (lbldayCount); Content = stack; //GetPosition1(); #if false try { _map = new Xamarin.Forms.Maps.Map() { VerticalOptions = LayoutOptions.FillAndExpand }; // Make map large - tried to use device size but didn't work _map.HeightRequest = 2500; //LoginPage.ScreenHeight; _map.WidthRequest = 800; //LoginPage.ScreenWidth; this.Content = _map; //_popupLayout; // Get current position GetPosition(); } catch (Exception exception) { // error } #endif }
public MainMapPage() { // Use our own Navigation NavigationPage.SetHasNavigationBar(this, false); // Create a map var map = new Map( MapSpan.FromCenterAndRadius( new Xamarin.Forms.Maps.Position(37,-122), Distance.FromMiles(0.3))) { IsShowingUser = true, VerticalOptions = LayoutOptions.FillAndExpand }; _map = map; // Create a custom toolbar View toolbar = new Toolbar(this); toolbar.BackgroundColor = Color.White; // Create a test button Button b = new Button { Text = "GetPosition" }; b.Clicked += (sender, ea) => GetPosition1 (); var stack = new StackLayout { Spacing = 0 }; stack.BackgroundColor = Color.White; stack.Children.Add (toolbar); stack.Children.Add(map); stack.Children.Add (b); Content = stack; //GetPosition1(); #if false try { _map = new Xamarin.Forms.Maps.Map() { VerticalOptions = LayoutOptions.FillAndExpand }; // Make map large - tried to use device size but didn't work _map.HeightRequest = 2500; //LoginPage.ScreenHeight; _map.WidthRequest = 800; //LoginPage.ScreenWidth; this.Content = _map; //_popupLayout; // Get current position GetPosition(); } catch (Exception exception) { // error } #endif }