MonoTouch.Dialog: Setting Entry Alignment for Entr

2019-02-18 18:22发布

Using the EntryElement to enter data as is results in the data being entered being aligned sort of in the middle.

How do I specify that the entry should be right aligned on an iPad.

For example:

enter image description here

1条回答
虎瘦雄心在
2楼-- · 2019-02-18 19:04

Have you tried overriding CreateTextField on EntryElement ?

That should give you complete control on how to create the UITextField being used for the entry part of the element.

Update Notice that if you override CreateTextField, you should also override the Cellkey property, to ensure that this cell is not shared through the UITableView cell-sharing machinery with other EntryElements.

Of course you'll need to know the right size before being called (or delay settings some properties until you know for sure).

查看更多
登录 后发表回答