MonoTouch.Dialog UITableView without margins
Asked Answered
C

1

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?

Crawl answered 1/10, 2012 at 8:14 Comment(0)
H
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.

Handsel answered 1/10, 2012 at 12:43 Comment(2)
Thank you, exactly what I was looking for! :) Sorry can't up vote as I don't have enough points yet.Crawl
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.Masurium

© 2022 - 2024 — McMap. All rights reserved.