Section CreateButtonSection(float labelHeight, float containerWidth) { Section buttonSection = new Section(); GlassButton button = new GlassButton(new RectangleF(0, 0, containerWidth, labelHeight)); button.SetTitleColor(UIColor.FromRGBA(255, 255, 0, 255), UIControlState.Normal); button.HorizontalAlignment = UIControlContentHorizontalAlignment.Center; button.SetTitle("Create Dataset", UIControlState.Normal); button.TouchUpInside += (o, e) => { string name = _name.Summary(); if (string.IsNullOrEmpty(name)) { //show an alert if data is not filled new UIAlertView(string.Empty, "Enter a name", null, "OK", null).Show(); } else { // navigate to next screen MXTouchContainer.Navigate("Dashboard/CreateData/" + name); } }; UIViewElement imageElement = new UIViewElement(string.Empty, button, true); imageElement.Flags = UIViewElement.CellFlags.DisableSelection | UIViewElement.CellFlags.Transparent; buttonSection.Add(imageElement); return(buttonSection); }