PrepareForSegue is the right place for this. For example, if the controller that creates the CustomerViewController is called CustomerListViewController , it overrides this method in CustomerListViewController as follows:
public override void PrepareForSegue (UIStoryboardSegue segue, NSObject sender) { base.PrepareForSegue (segue, sender);
where CustomerViewController has a public property similar to the following:
public SomeTypeData MyData { get; set; }
You can see this in action in Xamarin samples .
Hope this helps.
source share