Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Created attachment 7073 [details]
Minimal reproduction of the problem
Description of Problem:
In a UITableViewController subclass, I normally use GetHeightForRow to implement dynamically sized cells. This works fine, until I register an event listener using TableView.Scrolled += (...). As soon as I do this, GetHeightForRow is no longer called.
Steps to reproduce the problem:
1. Run the attached minimal project
2. Observe that the rows are sized dynamically
3. Uncomment the event listener in the controller's ViewDidLoad method and run again
4. Observe that the rows now have fixed height
This is a variation of the Xamarin.iOS limitation where you can't use the Objective-C delegate logic and C# events at the same time 
What happens is managed events (TableView.Scrolled) uses the [Weak]Delegate property under the hood, but in this case Objective-C has set the WeakDelegate to the TestTableViewController instance (which is what's driving the GetHeightForRow overload to actually work). So when you attach to the Scrolled event, you end up setting WeakDelegate to something else, thus breaking GetHeightForRow.
Here's a potential solution: http://stackoverflow.com/a/17474025/183422