Exemplo n.º 1
0
 protected override void OnAttachedTo(ContentPage bindable)
 {
     base.OnAttachedTo(bindable);
     dataForm = bindable.FindByName <SfDataForm>("dataForm");
     dataForm.RegisterEditor("Numeric", new CustomNumericEditor(dataForm));
     dataForm.RegisterEditor("Amount", "Numeric");
 }
 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.SourceProvider = new SourceProviderContactForm();
     dataForm.RegisterEditor("DropDown", new CustomDropDownEditor(dataForm));
     dataForm.RegisterEditor("Country", "DropDown");
     dataForm.AutoGeneratingDataFormItem += DataForm_AutoGeneratingDataFormItem;
 }
 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();
 }
Exemplo n.º 6
0
 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");
 }
Exemplo n.º 7
0
        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);
 }
Exemplo n.º 9
0
 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;
 }
        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);
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            dataForm            = new SfDataForm(this);
            dataForm.DataObject = new ExpenseInfo();
            dataForm.SetBackgroundColor(Color.White);
            dataForm.RegisterEditor("CustomMaskEditors", new CustomMaskEditor(dataForm, this));
            dataForm.RegisterEditor("Balance", "CustomMaskEditors");
            // 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 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 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);
        }
Exemplo n.º 14
0
        protected override void OnAttachedTo(ContentPage bindable)
        {
            base.OnAttachedTo(bindable);
            dataForm                = bindable.FindByName <SfDataForm>("dataForm");
            dataForm.DataObject     = new CityInfo();
            dataForm.SourceProvider = new SourceProviderExt();
            if (Device.RuntimePlatform == Device.UWP)
            {
                dataForm.RegisterEditor("CityName", "DropDown");
            }
            else
            {
                dataForm.RegisterEditor("CityName", "Picker");
            }

            dataForm.AutoGeneratingDataFormItem += DataForm_AutoGeneratingDataFormItem;
        }
 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.DataObject = new ContactInfo();
            dataForm.RegisterEditor("CustomPickerEditor", new DataFormEditorExe(dataForm));
            dataForm.RegisterEditor("Color", "CustomPickerEditor");

            picker = bindable.FindByName <SfPicker>("picker");
            picker.BindingContext    = new ColorInfo();
            picker.SelectionChanged += Picker_SelectionChanged;

            var footerView = bindable.FindByName <Button>("footerView");

            footerView.Clicked += OnPickerClosed;
        }
Exemplo n.º 17
0
 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;
 }
        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);
        }
Exemplo n.º 19
0
 protected override void OnAttachedTo(ContentPage bindable)
 {
     base.OnAttachedTo(bindable);
     dataForm = bindable.FindByName <SfDataForm>("dataForm");
     dataForm.ValidationMode = ValidationMode.PropertyChanged;
     dataForm.CommitMode     = CommitMode.LostFocus;
     //dataForm.SourceProvider = new SourceProviderExt();
     //dataForm.RegisterEditor("Goal", "DropDown");
     dataForm.RegisterEditor("MaxPushUps", "NumericUpDown");
     dataForm.RegisterEditor("MaxPullUps", "NumericUpDown");
     dataForm.RegisterEditor("MaxSquats", "NumericUpDown");
     dataForm.RegisterEditor("Weight", "NumericUpDown");
     dataForm.RegisterEditor("Height", "NumericUpDown");
     button              = bindable.FindByName <Button>("createPlan");
     button.IsEnabled    = false;
     dataForm.Validated += DataForm_Validated;
     dataForm.AutoGeneratingDataFormItem += DataForm_AutoGeneratingDataFormItem;
     dataForm.Validating += DataForm_Validating;
 }
 protected override void OnAttachedTo(ContentPage bindable)
 {
     base.OnAttachedTo(bindable);
     dataForm = bindable.FindByName <SfDataForm>("dataForm");
     button   = bindable.FindByName <Button>("button");
     dataForm.SourceProvider = new SourceProviderExt();
     button.Clicked         += Button_Clicked;
     dataForm.RegisterEditor("LastName", "MultilineText");
     dataForm.RegisterEditor("Password", "Password");
     dataForm.RegisterEditor("DateOfBith", "Date");
     dataForm.RegisterEditor("TimeOfBirth", "Time");
     dataForm.RegisterEditor("Age", "NumericUpDown");
     dataForm.RegisterEditor("Indian", "Switch");
     dataForm.RegisterEditor("City", "DropDown");
     dataForm.RegisterEditor("State", "RadioGroup");
     dataForm.RegisterEditor("Planet", "Segment");
 }
Exemplo n.º 21
0
 public override void ViewDidLoad()
 {
     base.ViewDidLoad();
     // Perform any additional setup after loading the view, typically from a nib.
     dataForm                = new SfDataForm();
     dataForm.DataObject     = new CityInfo();
     dataForm.SourceProvider = new SourceProviderExt();
     dataForm.RegisterEditor("CityName", "Picker");
     dataForm.BackgroundColor             = UIColor.White;
     dataForm.AutoGeneratingDataFormItem += DataForm_AutoGeneratingDataFormItem;
     this.View = 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 ContactForm();
            dataForm.RegisterEditor("ImageEditor", new DataFormCustomImageEditor(dataForm));
            dataForm.RegisterEditor("Image", "ImageEditor");

            //dataForm.LayoutManager = new DataFormLayoutManagerExt(dataForm);
            // Set our view from the "main" layout resource
            dataForm.BackgroundColor = (UIColor.White);
            dataForm.Frame           = new CoreGraphics.CGRect(0, 50, 400, 1000);
            UIView uIView = new UIView();

            uIView.Frame         = new CoreGraphics.CGRect(0, 0, 50, 50);
            dataForm.ColumnCount = 2;
            View.AddSubview(uIView);
            View.AddSubview(dataForm);
        }
Exemplo n.º 23
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            dataForm                = new SfDataForm(this);
            dataForm.DataObject     = new CityInfo();
            dataForm.SourceProvider = new SourceProviderExt();
            dataForm.RegisterEditor("CityName", "Picker");
            dataForm.SetBackgroundColor(Color.White);
            dataForm.AutoGeneratingDataFormItem += DataForm_AutoGeneratingDataFormItem;
            SetContentView(dataForm);
        }
Exemplo n.º 24
0
 protected override void OnAttachedTo(ContentPage bindable)
 {
     ViewModel = new ViewModel();
     base.OnAttachedTo(bindable);
     dataForm            = bindable.FindByName <SfDataForm>("dataForm");
     dataForm.DataObject = ViewModel.OrderItemCollection[0];
     dataForm.AutoGeneratingDataFormItem += DataForm_AutoGeneratingDataFormItem;
     if (Device.RuntimePlatform != Device.UWP)
     {
         dataForm.RegisterEditor("City", "Picker");
     }
 }
Exemplo n.º 25
0
 protected override void OnAttachedTo(ContentPage bindable)
 {
     base.OnAttachedTo(bindable);
     dataForm = bindable.FindByName <SfDataForm>("dataForm");
     dataForm.SourceProvider = new SourceProviderExt();
     dataForm.RegisterEditor("Fruits", "DropDown");
     dataForm.PropertyChanged += DataForm_PropertyChanged;
     formModel       = dataForm.DataObject as DataFormModel;
     save            = bindable.FindByName <Button>("save");
     save.Clicked   += OnSaved;
     cancel          = bindable.FindByName <Button>("cancel");
     cancel.Clicked += OnCancel;
 }
Exemplo n.º 26
0
        protected override void OnAttachedTo(ContentPage bindable)
        {
            buttonDoc = bindable.FindByName <SfButton>("buttonDocs");
            Grid       grid = bindable.FindByName <Grid>("Grid_NRP");
            ScrollView sv   = bindable.FindByName <ScrollView>("SV_NRP");

            base.OnAttachedTo(bindable);
            dataForm = bindable.FindByName <SfDataForm>("dfTramite");

            //buttonDoc = dataForm.Parent.Parent.AutomationId;
            string t  = string.Empty;//dataForm?.Parent?.Parent?.AutomationId;
            string tt = dataForm?.Parent?.ToString();

            App.Current.MainPage.DisplayAlert("DataFormTramiteBehavior", $"OnAttachedTo: [{buttonDoc.AutomationId}] - [{grid.AutomationId} - [{sv.AutomationId}]", MessageCenter.appLabelAceptar);
            dataForm.SourceProvider = new SourceProviderExt();
            dataForm.RegisterEditor("TipoTramite", "Picker");
            //  dataForm.RegisterEditor("image"        , new CustomImageEditor(dataForm));
            //  dataForm.RegisterEditor("TenenciaImage", "image");

            dataForm.AutoGeneratingDataFormItem += DataForm_AutoGeneratingDataFormItem;

            //dataForm.ItemManager = new DataFormItemManagerExt(dataForm);
        }