public ContactForm() { dataForm = new SfDataForm(); dataForm.LayoutManager = new DataFormLayoutManagerExt(dataForm); tableView = new UITableView(); tableView.RowHeight = 50; tableView.SeparatorColor = UIColor.Clear; dataFormController = new DataFormController(dataForm, tableView); tableView.Source = new ContactTableSource(dataFormController, new ListViewGroupingViewModel().ContactsInfo); this.AddSubview(tableView); button = new UIButton(); uIView = new UIView(); uIView.AddSubview(button); uIView.BackgroundColor = UIColor.FromRGB(242.0f / 255.0f, 242.0f / 255.0f, 242.0f / 255.0f); button.SetTitle("Add", UIControlState.Normal); button.SetTitleColor(this.TintColor, UIControlState.Normal); button.TouchDown += Button_TouchDown; this.AddSubview(this.tableView); this.AddSubview(uIView); }
public DataFormController(SfDataForm dataForm, UITableView tableView) : base() { this.dataForm = dataForm; InitializeViews(); UpdateView(); this.tableView = tableView; }
protected override void OnAttachedTo(ContentPage bindable) { base.OnAttachedTo(bindable); signUpForm = bindable.FindByName <SfDataForm>("signUpForm"); button = bindable.FindByName <Button>("signUpButton"); signUpForm.AutoGenerateItems = false; var items = new ObservableCollection <DataFormItemBase>(); items.Add(new DataFormTextItem() { Name = "Login", Editor = "Text", LabelText = App.LocalizedResources["LoginField"], ValidationLabelStyle = new LabelStyle() { FontSize = 14 }, TextInputLayoutSettings = new TextInputLayoutSettings() { ReserveSpaceForAssistiveLabels = true } }); items.Add(new DataFormTextItem() { Name = "Password", Editor = "Password", LabelText = App.LocalizedResources["PasswordField"], EnablePasswordVisibilityToggle = true, ValidationLabelStyle = new LabelStyle() { FontSize = 14 }, TextInputLayoutSettings = new TextInputLayoutSettings() { ReserveSpaceForAssistiveLabels = true } }); items.Add(new DataFormTextItem() { Name = "Confirm", Editor = "Password", EnablePasswordVisibilityToggle = true, LabelText = App.LocalizedResources["ConfirmField"], ValidationLabelStyle = new LabelStyle() { FontSize = 14 }, TextInputLayoutSettings = new TextInputLayoutSettings() { ReserveSpaceForAssistiveLabels = true } }); signUpForm.Items = items; //signUpForm.AutoGeneratingDataFormItem += SignUpForm_AutoGeneratingDataFormItem; signUpForm.Validated += SignUpForm_Validated; }
protected override void OnAttachedTo(ContentPage bindable) { base.OnAttachedTo(bindable); dataForm = bindable.FindByName <SfDataForm>("dfLogin"); dataForm.AutoGeneratingDataFormItem += DataForm_AutoGeneratingDataFormItem; }
protected override void OnAttachedTo(ContentPage bindable) { base.OnAttachedTo(bindable); dataForm = bindable.FindByName <SfDataForm>("dataForm"); dataForm.DataObject = new DayHours(); dataForm.RegisterEditor(typeof(int), "NumericUpDown"); }
public override View GetSampleContent(Context context) { this.context = context; //// Get our button from the layout resource, //// and attach an event to it var view = LayoutInflater.From(context).Inflate(Resource.Layout.ContactsLayout, null); linearLayout = view.FindViewById <RelativeLayout>(Resource.Id.linearLayout); listView = linearLayout.FindViewById <ListView>(Resource.Id.listView); var contactList = new ListViewGroupingViewModel().ContactsInfo; listView.ChoiceMode = ChoiceMode.Single; listView.Divider = null; listView.DividerHeight = 0; listView.ItemClick += OnItemSelect; listView.Adapter = new ListViewCustomAdapter(context as Activity); dataFormView = LayoutInflater.From(context).Inflate(Resource.Layout.DataFormLayout, null); var titleRelativeLayout = dataFormView.FindViewById <RelativeLayout>(Resource.Id.titleRelativeLayout); var backButton = dataFormView.FindViewById <TextView>(Resource.Id.back); backButton.SetBackgroundColor(Color.Transparent); backButton.Click += OnBack; contactLabel = dataFormView.FindViewById <TextView>(Resource.Id.label); editButton = dataFormView.FindViewById <TextView>(Resource.Id.right); editButton.SetBackgroundColor(Color.Transparent); editButton.Click += OnEditAndDone; // SfDataForm settings dataForm = new SfDataForm(context); dataForm.ColumnCount = 2; dataForm.LayoutManager = new DataFormLayoutManagerExt(dataForm); dataForm.AutoGeneratingDataFormItem += DataForm_AutoGeneratingDataFormItem; var dataFormLinearLayout = dataFormView.FindViewById <LinearLayout>(Resource.Id.dataFormLinearLayout); dataFormLinearLayout.AddView(dataForm); refreshButton = dataFormView.FindViewById <Button>(Resource.Id.moreFields); refreshButton.Text = "More Fields"; refreshButton.SetBackgroundColor(Color.Transparent); refreshButton.SetTextColor(Color.Blue); refreshButton.Click += RefreshButton_Click; addButton = linearLayout.FindViewById <ImageButton>(Resource.Id.add); addButton.SetImageResource(Resource.Drawable.AddContact); addButton.SetBackgroundColor(Color.Transparent); addButton.Click += OnAdd; linearLayout.AddView(dataFormView, WindowManagerLayoutParams.MatchParent, WindowManagerLayoutParams.MatchParent); dataFormView.Visibility = ViewStates.Gone; return(linearLayout); }
protected override void OnAttachedTo(ContentPage bindable) { base.OnAttachedTo(bindable); dataForm = bindable.FindByName <SfDataForm>("dataForm"); dataForm.RegisterEditor("MultilineText", new CustomMultilineTextEditor(dataForm)); dataForm.RegisterEditor("Text", new CustomTextEditor(dataForm)); }
protected override void OnAttachedTo(ContentPage bindable) { base.OnAttachedTo(bindable); dataForm = bindable.FindByName <SfDataForm>("dataForm"); dataForm.RegisterEditor("Numeric", new CustomNumericEditor(dataForm)); dataForm.RegisterEditor("Amount", "Numeric"); }
public override void Destroy() { (dataForm.DataObject as INotifyPropertyChanged).PropertyChanged -= DataFormGettingStarted_PropertyChanged; dataForm.AutoGeneratingDataFormItem -= DataForm_AutoGeneratingDataFormItem; dataForm.Dispose(); dataForm = null; }
public override View GetSampleContent(Context context) { this.context = context; //// Get our button from the layout resource, //// and attach an event to it var dataFormParentViewLayout = new LinearLayout(context); dataFormParentViewLayout.Orientation = Orientation.Vertical; var titlebarLayout = LayoutInflater.From(context).Inflate(Resource.Layout.TitleBarLayout, null); titlebarLayout = titlebarLayout.FindViewById <RelativeLayout>(Resource.Id.titleRelativeLayout); dataForm = new SfDataForm(context); dataForm.AutoGeneratingDataFormItem += DataForm_AutoGeneratingDataFormItem; dataForm.RegisterEditor("AccountType", "DropDown"); dataForm.LabelPosition = LabelPosition.Top; dataForm.CommitMode = CommitMode.LostFocus; dataForm.ValidationMode = ValidationMode.Explicit; dataForm.DataObject = new RecipientInfo(); (dataForm.DataObject as INotifyPropertyChanged).PropertyChanged += DataFormGettingStarted_PropertyChanged; transferButton = titlebarLayout.FindViewById <Button>(Resource.Id.label); transferButton.Text = "TRANSFER MONEY"; transferButton.SetBackgroundColor(Color.ParseColor("#2196F3")); transferButton.SetTextColor(Color.ParseColor("#FFFFFF")); transferButton.Click += Label_Click; dataFormParentViewLayout.AddView(dataForm); dataForm.LayoutParameters = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MatchParent, LinearLayout.LayoutParams.WrapContent, 1.0f); dataFormParentViewLayout.AddView(titlebarLayout, new ViewGroup.LayoutParams(LinearLayout.LayoutParams.MatchParent, 150)); return(dataFormParentViewLayout); }
protected override void OnAttachedTo(ContentPage bindable) { base.OnAttachedTo(bindable); addProfileForm = bindable.FindByName <SfDataForm>("addProfileForm"); addProfileForm.AutoGenerateItems = false; var items = new ObservableCollection <DataFormItemBase>(); items.Add(new DataFormTextItem() { Name = "Nickname", Editor = "Text", LabelText = App.LocalizedResources["NicknameField"] }); items.Add(new DataFormTextItem() { Name = "Name", Editor = "Text", LabelText = App.LocalizedResources["NameField"] }); items.Add(new DataFormTextItem() { Name = "Description", Editor = "Text", LabelText = App.LocalizedResources["DescriptionField"] }); addProfileForm.Items = items; }
protected override void OnAttachedTo(ContentPage bindable) { base.OnAttachedTo(bindable); dataForm = bindable.FindByName <SfDataForm>("dataForm"); dataForm.DataObject = new ContactInfo(); dataForm.RegisterEditor("Country", "Picker"); dataForm.SourceProvider = new SourceProviderExt(); }
protected override void OnAttachedTo(ContentPage bindable) { base.OnAttachedTo(bindable); dataForm = bindable.FindByName <SfDataForm>("dataForm"); dataForm.RegisterEditor("Text", new DataFormTextEditorExt(dataForm)); setFocus = bindable.FindByName <Button>("button"); setFocus.Clicked += OnSetFocus; }
public async override void Init(object initData) { base.Init(initData); this.newUser = new UserLogin(); DataForm = new SfDataForm(); DataForm.DataObject = newUser; ActivityIndicator = false; }
protected override void OnAttachedTo(ContentPage bindable) { base.OnAttachedTo(bindable); dataForm = bindable.FindByName <SfDataForm>("dataForm"); dataForm.DataObject = new ContactsInfo(); dataForm.ItemManager = new DataFormItemManagerExt(dataForm); }
public override void Destroy() { listView.Dispose(); listView = null; dataForm.AutoGeneratingDataFormItem -= DataForm_AutoGeneratingDataFormItem; dataForm.Dispose(); dataForm = null; }
public async override void Init(object initData) { test = true; base.Init(initData); this.newUser = new UserRegister(); DataForm = new SfDataForm(); DataForm.DataObject = newUser; test = false; }
public override void ViewDidLoad() { base.ViewDidLoad(); // Perform any additional setup after loading the view, typically from a nib. dataForm = new SfDataForm(); dataForm.DataObject = new DateInfo(); dataForm.BackgroundColor = UIColor.White; this.View = dataForm; }
protected override void OnAttachedTo(ContentPage bindable) { base.OnAttachedTo(bindable); dataForm = bindable.FindByName <SfDataForm>("dataForm"); dataForm.DataObject = new ContactInfo(); dataForm.RegisterEditor("Entry", new CustomViewEditor(dataForm)); dataForm.RegisterEditor("ContactNumber", "Entry"); dataForm.IsReadOnly = true; }
protected override void OnAttachedTo(ContentPage bindable) { base.OnAttachedTo(bindable); dataForm = bindable.FindByName <SfDataForm>("dataForm"); dataForm.RegisterEditor("numeric", new CustomTextEditor(dataForm)); dataForm.RegisterEditor("Age", "numeric"); dataForm.ValidationMode = ValidationMode.LostFocus; dataForm.DataObject = new ContactForm(); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); var dataForm = new SfDataForm(this); dataForm.RegisterEditor("Text", new DataFormTextEditorExt(dataForm)); dataForm.DataObject = new ContactInfo(); SetContentView(dataForm); }
protected override void OnAttachedTo(ContentPage bindable) { base.OnAttachedTo(bindable); dataForm = bindable.FindByName <SfDataForm>("dataForm"); dataForm.SourceProvider = new SourceProviderContactForm(); dataForm.RegisterEditor("DropDown", new CustomDropDownEditor(dataForm)); dataForm.RegisterEditor("Country", "DropDown"); dataForm.AutoGeneratingDataFormItem += DataForm_AutoGeneratingDataFormItem; }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); dataForm = new SfDataForm(this); dataForm.SetBackgroundColor(Color.White); dataForm.DataObject = new DateInfo(); // Set our view from the "main" layout resource SetContentView(dataForm); }
protected override void OnAttachedTo(ContentPage bindable) { base.OnAttachedTo(bindable); dataForm = bindable.FindByName <SfDataForm>("dataForm"); dataForm.DataObject = new DataFormModel(); (dataForm.DataObject as DataFormModel).PropertyChanged += OnDataObjectPropertyChanged; dataForm.AutoGeneratingDataFormItem += OnAutoGeneratingDataFormItem; dataForm.RegisterEditor("Country", "DropDown"); dataForm.RegisterEditor("City", "DropDown"); }
protected override void OnAttachedTo(ContentPage bindable) { base.OnAttachedTo(bindable); dataForm = bindable.FindByName <SfDataForm>("dataForm"); dataForm.DataObject = new ContactForm(); dataForm.RegisterEditor("ImageEditor", new DataFormCustomImageEditor(dataForm)); dataForm.RegisterEditor("Image", "ImageEditor"); dataForm.LayoutManager = new DataFormLayoutManagerExt(dataForm); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); dataForm = new SfDataForm(this); dataForm.DataObject = new ContactForm(); dataForm.RegisterEditor("ImageEditor", new DataFormCustomImageEditor(dataForm, this)); dataForm.RegisterEditor("Image", "ImageEditor"); dataForm.LayoutManager = new DataFormLayoutManagerExt(dataForm); dataForm.SetBackgroundColor(Color.White); SetContentView(dataForm); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); dataForm = new SfDataForm(this); var a = new ContactsInfo(); dataForm.DataObject = a;// new ContactsInfo(); dataForm.ItemManager = new DataFormItemManagerExt(dataForm); // Set our view from the "main" layout resource SetContentView(dataForm); }
public async override void Init(object initData) { var user = initData as User; this.EditedUser = GenerateNewUserEdit(user); editUser = user; DataForm = new SfDataForm(); DataForm.DataObject = new UserEdit(); ActivityIndicator = false; base.Init(initData); }
protected override void OnAttachedTo(ContentPage bindable) { base.OnAttachedTo(bindable); dataForm = bindable.FindByName <SfDataForm>("dataForm"); dataForm.DataObject = new Company(); dataForm.ValidationMode = ValidationMode.LostFocus; dataForm.RegisterEditor("TextBoxEditor", new CustomEntryEditor(dataForm)); dataForm.RegisterEditor("Name", "TextBoxEditor"); dataForm.LayoutManager = new DataFormLayoutManagerExt(dataForm); }
public override void ViewDidLoad() { base.ViewDidLoad(); // Perform any additional setup after loading the view, typically from a nib. dataForm = new SfDataForm(); dataForm.DataObject = new ExpenseInfo(); dataForm.RegisterEditor("CustomMaskEditors", new CustomMaskEditor(dataForm)); dataForm.RegisterEditor("Balance", "CustomMaskEditors"); dataForm.BackgroundColor = UIColor.White; this.View = dataForm; }