monotouch.dialog を使用してカスタム エントリ要素を作成しようとしています。StringElement をサブクラス化して独自の文字列要素のスタイルを設定する方法を理解しています - 以下の例を参照してください。
public class CustomStyledStringElementPlain : MonoTouch.Dialog.StyledStringElement
{
public CustomStyledStringElementPlain (string _caption, UIColor _backgroundcolour, UITextAlignment _alignment) : base(string.Empty,string.Empty)
{
TextColor = UIColor.White;
Font = UIFont.FromName ("Helvetica-Bold", 14f);
Caption = _caption;
Alignment = _alignment;
BackgroundColor = _backgroundcolour;
}
}
ただし、EntryElement をサブクラス化すると、たとえば、BackgroundColor のプロパティにアクセスできません (これが主に変更したいことです!) これまでのところ、次のようなものがあります...背景色またはその他のスタイルのエントリ要素は大歓迎です!
public class CustomStyledEntryElementPlain : MonoTouch.Dialog.EntryElement
{
public CustomStyledEntryElementPlain (string _caption, UIColor _colour, UITextAlignment _alignment) : base(string.Empty,string.Empty)
{
ReturnKeyType = UIReturnKeyType.Done;
Caption = _caption;
}
}