[C#]
//DataFormPickerItem
dataFormItem = new DataFormPickerItem() { Name = propertyInfo.Key, DisplayMemberPath = "Description", ValueMemberPath = "Code", Editor = "Picker", ItemsSource = this.GetItemSource("CustomerGroup") };
//DataFormDropDownItem
dataFormItem = new DataFormDropDownItem() { Name = propertyInfo.Key, DisplayMemberPath = "Description", SelectedValuePath = "Code", Editor = "DropDown" , ItemsSource = this.GetItemSource("CustomerGroup") };
private IList GetItemSource(string sourceName)
{
var list = new List<SimpleInfo>();
if (sourceName == "CustomerGroup")
{
list.Add(new SimpleInfo() { Code = "", Description = "No Group" });
list.Add(new SimpleInfo() { Code = "W", Description = "W. Wholesales" });
list.Add(new SimpleInfo() { Code = "O", Description = "O. Online" });
list.Add(new SimpleInfo() { Code = "R", Description = "R. Retails" });
}
return list;
} |
[C#]
//DataFormDropDownItem
dataFormItem = new DataFormDropDownItem() { Name = propertyInfo.Key, DisplayMemberPath = "Description", SelectedValuePath = "Code", Editor = "DropDown" , ItemsSource = this.GetItemSource("CustomerGroup"), LayoutOptions = LayoutType.Default }; |
iOS project -> Properties -> iOS Build -> Additional mtouch arguments -> add --linkskip=System.core |
[c#]
[assembly: Preserve(typeof(System.Linq.Queryable), AllMembers = true)]
namespace FormLayout.iOS
{
public class Application
{
// This is the main entry point of the application.
}
} |