I'm looking for an code example how to get all children of parent control in Xamarin.Forms.
CodePudding user response:
Yes, you can try to use the Children
property of your control.
For example,there is a grid, we can access its Children
like this:
var children = grid.Children;
foreach(View child in children){
if (child is Entry) {
string value = ((Entry)child).Text;
System.Diagnostics.Debug.WriteLine("one value is = " value);
}
}