开发者

Monotouch - Change View Title Background Color

开发者 https://www.devze.com 2023-02-04 06:17 出处:网络
Hy guys, I have this view and I wonder how to change its title background color. This code here just change view\'s body background c开发者_JS百科olor:

Hy guys,

I have this view and I wonder how to change its title background color. This code here just change view's body background c开发者_JS百科olor:

var invoices = new MainInvoicesView(this);
invoices.Title = "Invoices";
invoices.View.BackgroundColor = UIColor.Gray;

Any ideas?

Regards,

Claudio


What type of view is this? UIViews do not have a Title property, so you're obviously creating a different kind of view.

If you have a UILabel called TitleLabel in your view, and it's public, you should be able to just call:

invoices.TitleLabel.BackgroundColor = UIColor.Blue;
0

精彩评论

暂无评论...
验证码 换一张
取 消