6

How can I create UITableView with MonoTouch.Dialog which has no margins?

At the moment once you create new Section it will add margins around the table and makes elements rounded. I want the look of simple UITableView which has no margins (top, left, bottom etc.), is this achievable anyhow?

poupou
  • 43,413
  • 6
  • 77
  • 174
ErnestJ
  • 167
  • 12

1 Answers1

7

I think what you want is to create your DialogViewController with the UITableViewStyle.Plain style. E.g.

var root = new RootElement ();
var d = new DialogViewController (UITableViewStyle.Plain, root);

The default style value is UITableViewStyle.Grouped and gives each element a rounded-rect look.

poupou
  • 43,413
  • 6
  • 77
  • 174
  • Thank you, exactly what I was looking for! :) Sorry can't up vote as I don't have enough points yet. – ErnestJ Oct 01 '12 at 22:52
  • I kept trying to find how to accomplish this by figuring out a way to make a subclass of `Section` or `Element` that would force its way to be full width. Glad to be pointed in the right direction. Searches for "full width MonoTouch.Dialog Section" are not helpful for a reason, I guess. – patridge Nov 07 '12 at 16:16