I'd like the UITableView which MonoTouch.Dialog creates to appear 5cm or so from the top of the screen. By default it's at the top.
Is there an easy way to put in a top marg开发者_如何学Goin?
The simplest way of adding this padding is to take advantage of the Section headers and footers. This requires the use of the Elements API instead of the Reflection one.
You need to pass a view as your header, for example:
// Create a view that is 200 points tall
var myMargin = new UIView (new RectangleF (0, 0, 1, 200));
var mySection = new Section (myMargin);
Then add your elements to that section.
精彩评论