MonoTouch.Dialog: Setting Entry Alignment for EntryElement

对着背影说爱祢 提交于 2019-12-01 05:37:21

问题


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:


回答1:


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).



来源:https://stackoverflow.com/questions/7908991/monotouch-dialog-setting-entry-alignment-for-entryelement

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!