MonoTouch.Dialog: Setting Entry Alignment for Entr

2019-02-18 18:53发布

问题:

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