private void CreateLayout() { // Create a new vertical layout for the app. var layout = new LinearLayout(this) { Orientation = Orientation.Vertical }; // Add the map view to the layout. _myGeo_View = new Geo_View(this); layout.AddView(_myGeo_View); // Show the layout in the app. SetContentView(layout); }
public override void LoadView() { // Create the views. View = new UIView(); _myGeo_View = new Geo_View(); _myGeo_View.TranslatesAutoresizingMaskIntoConstraints = false; // Add the views. View.AddSubviews(_myGeo_View); // Lay out the views. NSLayoutConstraint.ActivateConstraints(new [] { _myGeo_View.TopAnchor.ConstraintEqualTo(View.SafeAreaLayoutGuide.TopAnchor), _myGeo_View.BottomAnchor.ConstraintEqualTo(View.BottomAnchor), _myGeo_View.LeadingAnchor.ConstraintEqualTo(View.LeadingAnchor), _myGeo_View.TrailingAnchor.ConstraintEqualTo(View.TrailingAnchor) }); }