internal static Cell IntCell(PropertyInfo property, IContact context, Page parent = null) { var label = CreateLabel(property); var entryCell = new EntryCell(); entryCell.SetValue(EntryCell.LabelProperty, label); entryCell.LabelColor = Color.FromHex("999999"); entryCell.SetBinding(EntryCell.TextProperty, new Binding(property.Name, mode: BindingMode.TwoWay, converter: DefaultConverter)); entryCell.BindingContext = context; return entryCell; }
internal static Cell DecimalCell(PropertyInfo property, IContact context, Page parent = null) { var label = CreateLabel(property); var currencyAttrib = property.GetCustomAttribute<CurrencyAttribute>(); var entryCell = new EntryCell(); entryCell.SetValue(EntryCell.LabelProperty, label); entryCell.LabelColor = Color.FromHex("999999"); entryCell.SetBinding(EntryCell.TextProperty, new Binding(property.Name, mode: BindingMode.TwoWay, converter: DefaultConverter, converterParameter: currencyAttrib)); entryCell.BindingContext = context; return entryCell; }