2012-10-15 2 views
0

일반적으로 일반 모드에서 섹션의 특성 (글꼴, 색)을 변경하려면 처음부터 전체보기를 만들어야합니다.MonoTouch.Dialog : 섹션 색 변경

색상/크기에 간단한 변경이 필요한 경우 더 쉬운 방법이 있습니까?

var header = new UILabel(new RectangleF(0, 0, 320, 25)){ 
     Font = UIFont.BoldSystemFontOfSize (22), 
     TextColor = UIColor.White, 
     BackgroundColor = SomethingPretty, 
     Text = "Something" 
}; 

Section secGroup = new Section(header); 
이 가장 간단한 방법이 될 것으로 보인다

enter image description here

답변

2

:

var header = new UILabel(new RectangleF(0, 0, 320, 25)){ 
    Font = UIFont.BoldSystemFontOfSize (22), 
    TextColor = UIColor.White, 
    BackgroundColor = SomethingPretty, 
    Text = "Something" 
}; 

Section secGroup = new Section(header); 
+1

당신 또는 당신이 CreateSizingSource를 재정 의하여 소스를 크기 조정 소유 만들 수 있습니다() 여기

내가하는 경향이 무엇 소스에서 GetViewForHeader()를 재정의하십시오. 하지만 여전히 뷰를 처음부터 만들게 될 것입니다. – Krumelur