Bug 7861 - Latest Git MonoTouch.Dialog breaks GetHeight
Summary: Latest Git MonoTouch.Dialog breaks GetHeight
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: 6.1.x
Hardware: PC Windows
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2012-10-16 08:02 UTC by Rogier van der Hee
Modified: 2012-10-24 19:27 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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 Links.

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.

Related Links:

Description Rogier van der Hee 2012-10-16 08:02:08 UTC
Run the example below it with stock Dialog: custom height. Run it with Git version: no custom height. 

I tried debugging but I got as a far as checking that the TableView creates the correct SizingSource, which contains the override for GetHeightForRow from TableView, which /*should*/ be called but is never called.

Setting unevenRows does not make a difference.

Best regards,


namespace TestDialog { 

[Register ("AppDelegate")] public partial class AppDelegate : UIApplicationDelegate { // class-level declarations UIWindow window; DialogViewController viewController; UINavigationController navigation;

    public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        window = new UIWindow(UIScreen.MainScreen.Bounds);

        var root = new RootElement("TestRoot") {
            new Section ("TestSection") {
                new CustomSizeElement ("TestString")                            
        //root.UnevenRows = true;
        viewController = new DialogViewController(root);
        navigation = new UINavigationController (viewController);

        window.RootViewController = navigation;

        return true;

public class CustomSizeElement : StringElement, IElementSizing
    public CustomSizeElement (string caption) : base (caption) {}

    public float GetHeight (UITableView tableView, NSIndexPath indexPath)
        return 100;
        //return mButton.Bounds.Height;
Comment 1 Rolf Bjarne Kvinge [MSFT] 2012-10-18 07:41:24 UTC
I just tried this with MonoTouch.Dialog master (hash: 2715ddbafee500ccdaf80b55cf6e35b91661b168) and couldn't reproduce this. Are you sure you're using the latest version of MonoTouch.Dialog from git?
Comment 2 Rogier van der Hee 2012-10-18 14:00:06 UTC
This is exceptionally weird, I just tried to make a sample solution to attach. and copy paste my example in. At first startup, the issue was still there. As soon as I changed my deployment target from 3.2 to 4.0 and back by opening the pList editor, the issue was resolved.

I tried to create a fresh new project, but I cannot reproduce the error myself anymore!

Could it be with a local installation thingy?

I'm using MonoTouch 6.04 and MonoDevelop.
Comment 3 Rolf Bjarne Kvinge [MSFT] 2012-10-18 17:17:35 UTC
It might be some state saved by the simulator - have you ever been able to reproduce this on a device?
Comment 4 Rogier van der Hee 2012-10-24 12:18:51 UTC
Not that I can remember.

Let's keep it at a fluke of my system, although I have read users on StackOverflow experiencing similar issues:

Comment 5 Rolf Bjarne Kvinge [MSFT] 2012-10-24 19:27:37 UTC
OK, I'll close this for now. If you ever run into it again just reopen this bug report and we'll have another look at it.