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));
            dataForm.LayoutManager = new DataFormLinearLayoutManager (this.Activity);

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

            dataForm.Entity = new XamarinEntity(person);

            DataFormSpinnerEditor editor = Android.Runtime.Extensions.JavaCast<DataFormSpinnerEditor> (dataForm.GetExistingEditorForProperty("EmployeeType"));
            editor.Adapter = new Com.Telerik.Widget.Dataform.Visualization.Editors.Adapters.EditorSpinnerAdapter (this.Activity, new Java.Lang.Object[] { "PROGRAMMER", "MANAGER", "SUPPORT", "MARKETING" });

            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;
        }
Esempio n. 2
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);
        }
        // << 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);
        }
        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;
        }
        // << 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;
        }
		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_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 layoutRoot = (ViewGroup) inflater.Inflate(Resource.Layout.fragment_dataform_validation, null);

            RadDataForm dataForm = new RadDataForm(this.Activity);
            dataForm.Entity = new XamarinEntity(new Person());

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

            layoutRoot.AddView(dataForm);

            return layoutRoot;
        }
Esempio n. 9
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 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));
            dataForm.LayoutManager = new DataFormLinearLayoutManager(this.Activity);

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

            dataForm.Entity = new XamarinEntity(person);

            DataFormSpinnerEditor editor = Android.Runtime.Extensions.JavaCast <DataFormSpinnerEditor> (dataForm.GetExistingEditorForProperty("EmployeeType"));

            editor.Adapter = new Com.Telerik.Widget.Dataform.Visualization.Editors.Adapters.EditorSpinnerAdapter(this.Activity, new Java.Lang.Object[] { "PROGRAMMER", "MANAGER", "SUPPORT", "MARKETING" });

            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);
        }
Esempio n. 11
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 DataFormLinearLayoutManager(this.Activity);
            Person person = new Person();

            person.Name     = "Joe";
            dataForm.Entity = new XamarinEntity(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);
        }