section.HeaderView = new UIImageView(<your image here>);

might need to set the size tho. And possibly use a view with a text label in it.

eg:

section.HeaderView = BuildSectionHeaderView(....);

public UIView BuildSectionHeaderView(string caption)
                {

                        UIView view = new UIView(new RectangleF(0,0,320,23));

                        UIImageView background = new
UIImageView(Resources.RecordsSectionBackground); // this is a 5x23
image with a gradient
                        background.Frame = view.Frame;


                        UILabel label = new UILabel();
                        label.BackgroundColor = UIColor.Clear;
                        label.Opaque = false;
                        label.TextColor = UIColor.FromRGB(119,119,119);
                        //label.HighlightedTextColor = UIColor.White;
                        label.Font =
UIFont.BoldSystemFontOfSize(13.5f); //UIFont.FromName("Helvetica Neue
Bold", 13.5f);
                        label.Frame = new RectangleF(8,0,200,23);
                        label.Text = caption;
                        //var layer = label.Layer;
                        label.ShadowColor = UIColor.FromRGBA(255,255,255,128);
                        //layer.ShadowRadius = 5f;
                        label.ShadowOffset = new SizeF(0, 1);
                        //layer.ShadowOpacity = 1.0f;


                        view.AddSubview(background);
                        view.AddSubview(label);

                        return view;


                }

On Fri, Feb 3, 2012 at 12:53, MojoDK <[email protected]> wrote:
> I want to style Monotouch Dialog Section like this (change the blue
> background to an image of my own)...
>
> http://monotouch.2284126.n4.nabble.com/file/n4354527/styled.png
>
> How do I do that?
>
> Thanks
> Mojo
>
>
>
> --
> View this message in context: 
> http://monotouch.2284126.n4.nabble.com/Style-Monotouch-Dialog-Section-tp4354527p4354527.html
> Sent from the MonoTouch mailing list archive at Nabble.com.
> _______________________________________________
> MonoTouch mailing list
> [email protected]
> http://lists.ximian.com/mailman/listinfo/monotouch



-- 
Nic Wise
t.  +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise
b. http://www.fastchicken.co.nz/

Nearest Bus: find when the next bus is coming to your stop. http://goo.gl/Vcz1p
mobileAgent (for FreeAgent): get your accounts in your pocket.
http://goo.gl/IuBU
Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa
London Bike App: Find the nearest Boris Bike, and get riding! http://goo.gl/Icp2
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to