我已经为 IOS 和 android 的 xamarin 表单中的条目单元格使用了自定义渲染。如何为输入单元格设置左右填充。
我在 PCl 中的自定义输入单元格:
<local:MyEntryCell Placeholder="Placeholder" PlaceholderColor="Grey" TextColor="Black"/>
MyEntryCell is the custom name of my entry cell.
在我的 PCL 中,我有:
public class MyEntryCell:Entry
{
}
在 IOS 中:
namespace CustomEntry.IOS
{
public class MyEntryCellRenderer:EntryRenderer
{
// override onElementChanged
}
}
在安卓中:
namespace CustomEntry.Droid
{
public class MyEntryCellRenderer:EntryRenderer
{
// override onElementChanged
}
}