public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            ViewGroup layoutRoot = (ViewGroup)inflater.Inflate(Resource.Layout.fragment_dataform_features, null);

            CheckBox readOnly = (CheckBox)layoutRoot.FindViewById(Resource.Id.readOnly);
            readOnly.SetOnCheckedChangeListener(this);

            dataForm = Android.Runtime.Extensions.JavaCast<RadDataForm>(layoutRoot.FindViewById(Resource.Id.dataForm));

            person = new Person();
            person.AddPropertyChangedListener(this);

            dataForm.SetEntity (person);

            RangeValidator validator = (RangeValidator) dataForm.GetExistingEditorForProperty("Age").Property().Validator;
            validator.Max = 30;
            validator.Min = 18;

            Spinner commitModes = (Spinner)layoutRoot.FindViewById(Resource.Id.commitModeSpinner);
            commitModes.Adapter = new ArrayAdapter(this.Activity, Android.Resource.Layout.SimpleSpinnerItem, CommitMode.Values());
            commitModes.OnItemSelectedListener = this;

            personText = (TextView)layoutRoot.FindViewById(Resource.Id.personText);

            commitButton = (Button) layoutRoot.FindViewById(Resource.Id.manualCommit);
            commitButton.SetOnClickListener(this);

            return layoutRoot;
        }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            ViewGroup rootLayout = (ViewGroup) inflater.Inflate(Resource.Layout.fragment_dataform_validation_mode, null);

            Spinner validationModeSpinner = (Spinner) rootLayout.FindViewById(Resource.Id.data_form_validation_mode_spinner);
            validationModeSpinner.OnItemSelectedListener = this;
            validationModeSpinner.Adapter = new ArrayAdapter(this.Activity, Android.Resource.Layout.SimpleSpinnerItem, new ValidationMode[]{ValidationMode.Immediate, ValidationMode.OnLostFocus, ValidationMode.Manual});

            dataForm = new RadDataForm(this.Activity);

            dataForm.LayoutManager = new DataFormLinearLayoutManager(this.Activity);
            dataForm.CommitMode = CommitMode.Manual;
            dataForm.ValidationMode = ValidationMode.Immediate;

            Person joe = new Person();
            joe.Name = "Joe";
            joe.Mail = "*****@*****.**";
            dataForm.SetEntity (joe);

            validateButton = (Button)rootLayout.FindViewById(Resource.Id.data_form_validate_button);
            validateButton.SetOnClickListener(this);

            rootLayout.AddView(dataForm, 0);

            return rootLayout;
        }
        // << data-form-commit-listener-implementation
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            ViewGroup rootLayout = (ViewGroup)inflater.Inflate(Resource.Layout.fragment_dataform_commit_events, null);

            RadDataForm dataForm = new RadDataForm(this.Activity);

            // >> data-form-global-commit-listener
            dataForm.BeforeCommit += (object sender, Com.Telerik.Widget.Dataform.Engine.BeforeCommitEventArgs e) => {
                e.Handled = true;
            };

            dataForm.AfterCommit += (object sender, Com.Telerik.Widget.Dataform.Engine.AfterCommitEventArgs e) => {
            };
            // << data-form-global-commit-listener

            dataForm.SetEntity (new Person ());

            // >> data-form-local-commit-listener
            CommitListener commitListener = new CommitListener ();
            dataForm.GetExistingEditorForProperty ("Age").Property().AddCommitListener(commitListener);
            // << data-form-local-commit-listener

            rootLayout.AddView(dataForm);

            return rootLayout;
        }
        // << data-form-commit-listener-implementation

        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            ViewGroup rootLayout = (ViewGroup)inflater.Inflate(Resource.Layout.fragment_dataform_commit_events, null);

            RadDataForm dataForm = new RadDataForm(this.Activity);

            // >> data-form-global-commit-listener
            dataForm.BeforeCommit += (object sender, Com.Telerik.Widget.Dataform.Engine.BeforeCommitEventArgs e) => {
                e.Handled = true;
            };

            dataForm.AfterCommit += (object sender, Com.Telerik.Widget.Dataform.Engine.AfterCommitEventArgs e) => {
            };
            // << data-form-global-commit-listener

            dataForm.SetEntity(new Person());

            // >> data-form-local-commit-listener
            CommitListener commitListener = new CommitListener();

            dataForm.GetExistingEditorForProperty("Age").Property().AddCommitListener(commitListener);
            // << data-form-local-commit-listener

            rootLayout.AddView(dataForm);

            return(rootLayout);
        }
예제 #5
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            ViewGroup layoutRoot = (ViewGroup)inflater.Inflate(Resource.Layout.fragment_dataform_features, null);

            CheckBox readOnly = (CheckBox)layoutRoot.FindViewById(Resource.Id.readOnly);

            readOnly.SetOnCheckedChangeListener(this);

            dataForm = Android.Runtime.Extensions.JavaCast <RadDataForm>(layoutRoot.FindViewById(Resource.Id.dataForm));

            person = new Person();
            person.AddPropertyChangedListener(this);

            dataForm.SetEntity(person);

            RangeValidator validator = (RangeValidator)dataForm.GetExistingEditorForProperty("Age").Property().Validator;

            validator.Max = 30;
            validator.Min = 18;

            Spinner commitModes = (Spinner)layoutRoot.FindViewById(Resource.Id.commitModeSpinner);

            commitModes.Adapter = new ArrayAdapter(this.Activity, Android.Resource.Layout.SimpleSpinnerItem, CommitMode.Values());
            commitModes.OnItemSelectedListener = this;

            personText = (TextView)layoutRoot.FindViewById(Resource.Id.personText);

            commitButton = (Button)layoutRoot.FindViewById(Resource.Id.manualCommit);
            commitButton.SetOnClickListener(this);

            return(layoutRoot);
        }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            ViewGroup rootLayout = (ViewGroup)inflater.Inflate(Resource.Layout.fragment_dataform_grouping, null);

            RadDataForm dataForm = new RadDataForm(this.Activity);

            dataForm.LayoutManager = new DataFormLinearLayoutManager(this.Activity);
            Person person = new Person();

            person.Name = "Joe";
            dataForm.SetEntity(person);

            EntityPropertyEditor nameEditor = Android.Runtime.Extensions.JavaCast <EntityPropertyEditor>(dataForm.GetExistingEditorForProperty("Name"));

            nameEditor.Property().Validator = new NonEmptyValidator();
            nameEditor.ValidationViewBehavior = new ValidationAnimationBehavior(this.Activity);

            EntityPropertyEditor mailEditor = Android.Runtime.Extensions.JavaCast <EntityPropertyEditor>(dataForm.GetExistingEditorForProperty("Mail"));

            mailEditor.ValidationViewBehavior = new BlinkValidationBehavior(this.Activity);

            rootLayout.AddView(dataForm);

            return(rootLayout);
        }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            ViewGroup rootLayout = (ViewGroup)inflater.Inflate(Resource.Layout.fragment_dataform_validation_mode, null);

            Spinner validationModeSpinner = (Spinner)rootLayout.FindViewById(Resource.Id.data_form_validation_mode_spinner);

            validationModeSpinner.OnItemSelectedListener = this;
            validationModeSpinner.Adapter = new ArrayAdapter(this.Activity, Android.Resource.Layout.SimpleSpinnerItem, new ValidationMode[] { ValidationMode.Immediate, ValidationMode.OnLostFocus, ValidationMode.Manual });

            dataForm = new RadDataForm(this.Activity);

            dataForm.LayoutManager  = new DataFormLinearLayoutManager(this.Activity);
            dataForm.CommitMode     = CommitMode.Manual;
            dataForm.ValidationMode = ValidationMode.Immediate;

            Person joe = new Person();

            joe.Name = "Joe";
            joe.Mail = "*****@*****.**";
            dataForm.SetEntity(joe);

            validateButton = (Button)rootLayout.FindViewById(Resource.Id.data_form_validate_button);
            validateButton.SetOnClickListener(this);

            rootLayout.AddView(dataForm, 0);

            return(rootLayout);
        }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            ViewGroup rootLayout = (ViewGroup)inflater.Inflate(Resource.Layout.fragment_dataform_getting_started, container, false);

            RadDataForm dataForm = (RadDataForm)rootLayout.FindViewById(Resource.Id.data_form_getting_started);

            dataForm.SetEntity(new Person());

            return(rootLayout);
        }
예제 #9
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            ViewGroup rootLayout = (ViewGroup)inflater.Inflate(Resource.Layout.fragment_dataform_editors, container, false);

            dataForm = (RadDataForm)rootLayout.FindViewById(Resource.Id.data_form_editors);
            dataForm.Adapter.SetEditorProvider(this);

            dataForm.SetEntity(new Person());

            return(rootLayout);
        }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            ViewGroup layoutRoot = (ViewGroup)inflater.Inflate(Resource.Layout.fragment_dataform_image_labels, container, false);

            dataForm = (RadDataForm)layoutRoot.FindViewById(Resource.Id.dataForm);
            employee = new Employee();
            dataForm.SetEntity(employee);


            return(layoutRoot);
        }
예제 #11
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            ViewGroup rootLayout = (ViewGroup)inflater.Inflate(Resource.Layout.fragment_dataform_grouping, container, false);

            RadDataForm dataForm = (RadDataForm)rootLayout.FindViewById(Resource.Id.data_form_grouping);

            dataForm.FillViewport  = true;
            dataForm.LayoutManager = new DataFormPlaceholderLayoutManager(this.Activity, Resource.Layout.dataform_placeholder_layout);
            dataForm.SetEntity(new Person());

            return(rootLayout);
        }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            ViewGroup rootLayout = (ViewGroup)inflater.Inflate(Resource.Layout.fragment_dataform_getting_started, null);

            RadDataForm dataForm = new RadDataForm(this.Activity);

            dataForm.SetEntity(new Person());

            rootLayout.AddView(dataForm);

            return(rootLayout);
        }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            ViewGroup layoutRoot = (ViewGroup)inflater.Inflate(Resource.Layout.fragment_dataform_validation, container, false);

            RadDataForm dataForm = (RadDataForm)layoutRoot.FindViewById(Resource.Id.data_form_validation);

            dataForm.SetEntity(new Person());

            dataForm.GetExistingEditorForProperty("Name").Property().Validator = new NonEmptyValidator();

            return(layoutRoot);
        }
		public override View OnCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
		{
			ViewGroup rootLayout = (ViewGroup)inflater.Inflate(Resource.Layout.fragment_dataform_getting_started, null);

			RadDataForm dataForm = new RadDataForm(this.Activity);

			dataForm.SetEntity(new Person());

			rootLayout.AddView(dataForm);

			return rootLayout;
		}
		public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
			ViewGroup rootLayout = (ViewGroup)inflater.Inflate(Resource.Layout.fragment_dataform_grouping, null);

			RadDataForm dataForm = new RadDataForm(this.Activity);
			dataForm.FillViewport = true;
			dataForm.LayoutManager = new DataFormPlaceholderLayoutManager(this.Activity, Resource.Layout.dataform_placeholder_layout);
			dataForm.SetEntity (new Person());

			rootLayout.AddView(dataForm);

			return rootLayout;
		}
		public override View OnCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
		{
			ViewGroup layoutRoot = (ViewGroup) inflater.Inflate(Resource.Layout.fragment_dataform_validation, null);

			RadDataForm dataForm = new RadDataForm(this.Activity);
			dataForm.SetEntity (new Person ());

			dataForm.GetExistingEditorForProperty ("Name").Property ().Validator = new NonEmptyValidator();

			layoutRoot.AddView(dataForm);

			return layoutRoot;
		}
예제 #17
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            ViewGroup rootLayout = (ViewGroup)inflater.Inflate(Resource.Layout.fragment_dataform_grouping, null);

            RadDataForm dataForm = new RadDataForm(this.Activity);

            dataForm.LayoutManager = new DataFormPlaceholderLayoutManager(this.Activity, Resource.Layout.dataform_placeholder_layout);
            dataForm.SetEntity(new Person());

            rootLayout.AddView(dataForm);

            return(rootLayout);
        }
예제 #18
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            ViewGroup layoutRoot = (ViewGroup)inflater.Inflate(Resource.Layout.fragment_dataform_validation, null);

            RadDataForm dataForm = new RadDataForm(this.Activity);

            dataForm.SetEntity(new Person());

            dataForm.GetExistingEditorForProperty("Name").Property().Validator = new NonEmptyValidator();

            layoutRoot.AddView(dataForm);

            return(layoutRoot);
        }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            ViewGroup rootLayout = (ViewGroup)inflater.Inflate(Resource.Layout.fragment_dataform_grouping, container, false);

            RadDataForm dataForm = (RadDataForm)rootLayout.FindViewById(Resource.Id.data_form_grouping);

            DataFormGroupLayoutManager groupManager = new DataFormGroupLayoutManager(this.Activity);

            groupManager.CreateGroup = this;

            dataForm.LayoutManager = groupManager;
            dataForm.SetEntity(new Person());

            return(rootLayout);
        }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            ViewGroup layoutRoot = (ViewGroup)inflater.Inflate(Resource.Layout.fragment_dataform_label_positions, container, false);

            dataForm = (RadDataForm)layoutRoot.FindViewById(Resource.Id.dataForm);
            person   = new Person();
            dataForm.SetEntity(person);
            dataForm.LayoutManager = (new DataFormLinearLayoutManager(Activity));

            // >> data-form-label-positions
            dataForm.LabelPosition = LabelPosition.Left;
            // << data-form-label-positions

            return(layoutRoot);
        }
예제 #21
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            ViewGroup   layoutRoot = (ViewGroup)inflater.Inflate(Resource.Layout.fragment_data_form_json_edit, container, false);
            RadDataForm dataForm   = (RadDataForm)layoutRoot.FindViewById(Resource.Id.data_form_json_edit);

            String json = LoadJSONFromAsset("Person.json");

            try {
                JSONObject jsonObject = new JSONObject(json);
                dataForm.SetEntity(jsonObject);
            } catch (JSONException e) {
                Log.Error("json", "error parsing json", e);
            }

            return(layoutRoot);
        }
		public override View OnCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
		{
			ViewGroup rootLayout = (ViewGroup)inflater.Inflate(Resource.Layout.fragment_dataform_grouping, null);

			RadDataForm dataForm = new RadDataForm(this.Activity);

			DataFormGroupLayoutManager groupManager = new DataFormGroupLayoutManager(this.Activity);
			groupManager.CreateGroup = this;

			dataForm.LayoutManager = groupManager;
			dataForm.SetEntity(new Person());

			rootLayout.AddView(dataForm);

			return rootLayout;
		}
예제 #23
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            ViewGroup layoutRoot = (ViewGroup)inflater.Inflate(Resource.Layout.fragment_dataform_editor_styles, container, false);

            dataForm = (RadDataForm)layoutRoot.FindViewById(Resource.Id.dataForm);
            person   = new Person();
            dataForm.SetEntity(person);
            dataForm.LayoutManager = new DataFormLinearLayoutManager(Activity);

            // >> data-form-customizations-editor-styles
            dataForm.EditorCustomizations = new EditorCustomizationsExample();
            // ...
            // >> (hide)

            return(layoutRoot);
        }
		public override View OnCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
		{
			ViewGroup layoutRoot = (ViewGroup)inflater.Inflate(Resource.Layout.fragment_data_form_json_edit, container, false);
			RadDataForm dataForm = new RadDataForm(Activity);

			String json = LoadJSONFromAsset ("Person.json");
			try {
				JSONObject jsonObject = new JSONObject (json);
				dataForm.SetEntity(jsonObject);
			} catch(JSONException e) {
				Log.Error ("json", "error parsing json", e);
			}

			layoutRoot.AddView(dataForm);

			return layoutRoot;
		}
		public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
			ViewGroup rootLayout = (ViewGroup)inflater.Inflate(Resource.Layout.fragment_dataform_grouping, null);

			RadDataForm dataForm = new RadDataForm(this.Activity);
			dataForm.LayoutManager = new DataFormLinearLayoutManager(this.Activity);
			Person person = new Person();
			person.Name = "Joe";
			dataForm.SetEntity(person);

			EntityPropertyEditor nameEditor = Android.Runtime.Extensions.JavaCast<EntityPropertyEditor>(dataForm.GetExistingEditorForProperty("Name"));
			nameEditor.Property().Validator = new NonEmptyValidator();
			nameEditor.ValidationViewBehavior = new ValidationAnimationBehavior(this.Activity);

			EntityPropertyEditor mailEditor = Android.Runtime.Extensions.JavaCast<EntityPropertyEditor>(dataForm.GetExistingEditorForProperty("Mail"));
			mailEditor.ValidationViewBehavior = new BlinkValidationBehavior(this.Activity);

			rootLayout.AddView(dataForm);

			return rootLayout;
		}
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            ViewGroup   layoutRoot = (ViewGroup)inflater.Inflate(Resource.Layout.fragment_data_form_schema_setup, container, false);
            RadDataForm dataForm   = new RadDataForm(Activity);

            String json = LoadJSONFromAsset("PersonExtended.json");

            try {
                JSONObject jsonObject = new JSONObject(json);
                dataForm.SetEntity(jsonObject);

                String           schema     = LoadJSONFromAsset("PersonSchema.json");
                JSONObject       jsonSchema = new JSONObject(schema);
                DataFormMetadata metadata   = new DataFormMetadata(jsonSchema);
                dataForm.Metadata = metadata;
            } catch (JSONException e) {
                Log.Error("json", "error parsing json", e);
            }

            layoutRoot.AddView(dataForm);

            return(layoutRoot);
        }