Reputation: 1926
I am rather new with MonoTouch and noticed the MonoTouch Dialog api which is very useful. What I want to achieve is something like this:
http://img641.imageshack.us/img641/8514/consumentstartscherm.png
So I want regular text in the table view cell.. but how can I achieve this? Currently I am placing my text in the Caption section but thats a bold font.
Upvotes: 2
Views: 1245
Reputation: 43553
Something like this will get you close:
var label = new UILabel ();
var frame = label.Frame;
frame.Inflate (0, 32);
label.Frame = frame;
label.Font = UIFont.BoldSystemFontOfSize (32);
label.Text = "Ad4You";
label.TextAlignment = UITextAlignment.Center;
label.BackgroundColor = UIColor.FromWhiteAlpha (0f, 0f);
Section s = new Section ("Ad4You");
s.HeaderView = label;
s.Add (new StyledMultilineElement (String.Empty,
"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
UITableViewCellStyle.Subtitle));
var root = new RootElement ("Home");
root.Add (s);
var dv = new DialogViewController (root, true) { Autorotate = true };
NavigationController.PushViewController (dv, true);
Have fun with MonoTouch and MonoTouch.Dialog :-)
Upvotes: 3