Hello,
========Update========
Firstly, if you want to clear the text and save the previous date in the DataPicker,
You need to pop up a new DatePickerDialog
in the custom renderer and add a bindable property for nullable property.
You can invoke clear text function in the ClearData
method with myBirthdayDatePickerControl.Clear();
Second, if you want to clear the check item for RadioButton, you need to traverse all of RadioButton and set the radioButton.IsChecked = false;
End, if you want to clear the image, you can set source to null with Imgresult.Source = ImageSource.FromFile("");
.
Here is code about ClearData
method.
public void ClearData()
{
textbox_firstname.Text = string.Empty;
textbox_lastname.Text = string.Empty;
myBirthdayDatePickerControl.Clear();
var childs= ID_Type.Children;
foreach (var child in childs) {
RadioButton radioButton = child as RadioButton;
radioButton.IsChecked = false;
}
Imgresult.Source = ImageSource.FromFile("");
}
Best Regards,
Leon Lu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.