private bool validateForm() { Gdk.Color redColor = new Gdk.Color(); Gdk.Color.Parse("red", ref redColor); Gdk.Color whiteColor = new Gdk.Color(); Gdk.Color.Parse("white", ref whiteColor); if (String.IsNullOrEmpty(VehicleOwnerEntry.Text)) { VehicleOwnerEntry.ModifyBase(StateType.Normal, redColor); return(false); } else { VehicleOwnerEntry.ModifyBase(StateType.Normal, whiteColor); } if (String.IsNullOrEmpty(RegistrationEntry.Text)) { RegistrationEntry.ModifyBase(StateType.Normal, redColor); return(false); } else { RegistrationEntry.ModifyBase(StateType.Normal, whiteColor); } if (String.IsNullOrEmpty(VehicleTypeEntry.Text)) { VehicleTypeEntry.ModifyBase(StateType.Normal, redColor); return(false); } else { VehicleTypeEntry.ModifyBase(StateType.Normal, whiteColor); } if (String.IsNullOrEmpty(DescriptionTextView.Buffer.Text)) { DescriptionTextView.ModifyBase(StateType.Normal, redColor); return(false); } else { DescriptionTextView.ModifyBase(StateType.Normal, whiteColor); } return(true); }