0

I was developing app with custom Element using MonoTouch.Dialog. I did not update source code for several weeks. Yesterday I did it and realized that GetHeight for IElementSizing is not longer called. I even used new flag for root : UnevenRows but it doesn't help. I made simple test and it appears that it doesn't work even for standard Elements like MessageElement, code below presents cell with standard height 44f even if MessageElement implements GetHeight and returns 78f. Is it a bug or am I doing something wrong?

var root = new RootElement ("Test"){
             new Section ("Text View"){
                new MessageElement {Sender="Sender", Body="Body", Subject="Subject", Caption="Caption"}
             }
        };

root.UnevenRows = true;
var form = new DialogViewController (root, true);
Yoorek
  • 1,003
  • 1
  • 12
  • 30
  • Please edit your question to include which exact version of MonoTouch and MonoTouch.Dialog (e.g. if you used the source from GIT) you're using. FWIW it works for me, i.e. the debugging hit `MessageElement.GetHeight`, when using the **Sample** application (in github). – poupou Mar 30 '12 at 11:58

2 Answers2

0

I had the same issue and by opening closing the pList editor the issue was magically resolved.

https://bugzilla.xamarin.com/show_bug.cgi?id=7861

Rogier
  • 1,170
  • 1
  • 10
  • 21
0

I have the same problem, but luckily I found also found an workaround.

Calling ReloadData() after setting Root.UnevenRows = true;

            this.Root.UnevenRows = true;
            this.ReloadData (); 
Michal Dobrodenka
  • 1,104
  • 8
  • 27