public PopupContent() { TitleField = new TextEntry("TITLE", true); TitleField.Field.ReturnKeyType = UIReturnKeyType.Next; TitleField.Field.Delegate = this; AddSubview(TitleField); DescriptionField = new TextEntry("DESCRIPTION", true); DescriptionField.Field.ReturnKeyType = UIReturnKeyType.Done; DescriptionField.Field.Delegate = this; AddSubview(DescriptionField); CameraField = new ImageEntry("TAKE PHOTO", "icon_camera.png"); AddSubview(CameraField); Done = new ActionButton("icon_done.png"); Done.BackgroundColor = Colors.AppleBlue; AddSubview(Done); }
public MainView() { MapView = new MapView(); AddSubview(MapView); Done = new ActionButton("icon_done.png"); Done.BackgroundColor = Colors.CartoGreen; AddSubview(Done); Cancel = new ActionButton("icon_remove.png"); Cancel.BackgroundColor = Colors.CartoRed; AddSubview(Cancel); AddLocation = new ActionButton("icon_add.png"); AddLocation.BackgroundColor = Colors.AppleBlue; AddSubview(AddLocation); Popup = new SlideInPopup(); Popup.Header.Text = "SUBMIT A NEW LOCATION"; AddSubview(Popup); Crosshair = new UIImageView(); Crosshair.Image = UIImage.FromFile("icon_crosshair.png"); AddSubview(Crosshair); Attachment = new AttachmentImage(); AddSubview(Attachment); Content = new PopupContent(); Popup.SetContent(Content); var layer = new CartoOnlineVectorTileLayer(CartoBaseMapStyle.CartoBasemapStyleVoyager); MapView.Layers.Add(layer); Crosshair.Hidden = true; BringSubviewToFront(Done); BringSubviewToFront(Cancel); BringSubviewToFront(AddLocation); SendSubviewToBack(Popup); }