Class DataFormItem
Represents the class that encapsulates the layout and editor setting for a data field appearing in SfDataForm. DataForm layouts caption labels, editors and validation error message based on the property settings of this class.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.XForms.DataForm
Assembly: Syncfusion.SfDataForm.XForms.dll
Syntax
public class DataFormItem : DataFormItemBase, IDisposable
Constructors
DataFormItem()
Initializes a new instance of the DataFormItem class.
Declaration
public DataFormItem()
Fields
IsReadOnlyProperty
Identifies the IsReadOnly bindable property.
Declaration
public static readonly BindableProperty IsReadOnlyProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
Remarks
This bindable property is read-only.
Properties
CounterLabelStyle
Gets or sets the counter label style for DataFormItem to customize the counter label of the DataFormItem in DataForm.
Declaration
public LabelStyle CounterLabelStyle { get; set; }
Property Value
Type |
---|
LabelStyle |
Remarks
Applicable only for the DataformItem which TextInputLayout.
Editor
Gets or sets the editor names which denotes the renderer associated with editor.
Declaration
public string Editor { get; set; }
Property Value
Type |
---|
System.String |
EditorFontSize
Gets or sets the size of the editor text.
Declaration
public double EditorFontSize { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The size of the editor text. |
EditorView
Gets or sets the editor loaded for data field.
Declaration
public View EditorView { get; set; }
Property Value
Type |
---|
Xamarin.Forms.View |
Remarks
Applicable only for the DataformItem which Default.
ErrorMessageColor
Gets or sets the error message color for dataform item to customize the error message color of the item in dataform.
Declaration
public Color ErrorMessageColor { get; set; }
Property Value
Type |
---|
Xamarin.Forms.Color |
Remarks
Applicable only for the DataformItem which TextInputLayout.
FocusedColor
Gets or sets the focused color for dataform item to customize the color of the item when focused in dataform.
Declaration
public Color FocusedColor { get; set; }
Property Value
Type |
---|
Xamarin.Forms.Color |
Remarks
Applicable only for the DataformItem which TextInputLayout.
GroupName
Gets or sets the group name of data field that is used to group properties in View.
Declaration
public string GroupName { get; set; }
Property Value
Type |
---|
System.String |
Height
Gets or sets the height property for DataFormItem to customize the default height of the DataFormItem in DataForm.
Declaration
public GridLength Height { get; set; }
Property Value
Type |
---|
Xamarin.Forms.GridLength |
Remarks
Height of type GridLength.Auto indicating the label is automatically resized to display its entire contents. Height of type GridLength.Star indicating the label will have default height. Height of type GridLength.Absolute requires absolute value for height. Applicable only for the DataformItem which Default.
HelperLabelStyle
Gets or sets the helper label style for DataFormItem to customize the helper label of the DataFormItem in DataForm.
Declaration
public LabelStyle HelperLabelStyle { get; set; }
Property Value
Type |
---|
LabelStyle |
Remarks
Applicable only for the DataformItem which TextInputLayout.
HintLabelStyle
Gets or sets the hint label style for DataFormItem to customize the hint label of the DataFormItem in DataForm.
Declaration
public LabelStyle HintLabelStyle { get; set; }
Property Value
Type |
---|
LabelStyle |
Remarks
Applicable only for the DataformItem which TextInputLayout.
ImageSource
Gets or sets the image to show in place of label.
Declaration
public ImageSource ImageSource { get; set; }
Property Value
Type |
---|
Xamarin.Forms.ImageSource |
Remarks
Applicable only for the DataformItem which Default.
InvalidMessage
Gets a error message of DataFormItem in case of invalid data.
Declaration
public string InvalidMessage { get; }
Property Value
Type | Description |
---|---|
System.String | The in valid message. |
IsReadOnly
Gets or sets a value indicating whether to allow user to edit or not.
Declaration
public bool IsReadOnly { get; set; }
Property Value
Type |
---|
System.Boolean |
IsValid
Gets a value indicating whether this DataFormItem is valid or not.
Declaration
public bool IsValid { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
LabelPosition
Gets or sets the label position for DataFormItem to define the position of the label which associated with the editor.
Declaration
public LabelPosition LabelPosition { get; set; }
Property Value
Type |
---|
LabelPosition |
Remarks
Applicable only for the DataformItem which Default.
LabelText
Gets or sets the data field caption for the editor in View.
Declaration
public string LabelText { get; set; }
Property Value
Type |
---|
System.String |
LayoutOptions
Gets or sets the layout options for DataFormItem to define the layout type for the DataFormItem in dataform.
Declaration
public Nullable<LayoutType> LayoutOptions { get; set; }
Property Value
Type |
---|
System.Nullable<LayoutType> |
Remarks
This property not applicable to CheckBox,Switch,Segment and RadioButton Editors.
Name
Gets or sets the name of the property.
Declaration
public string Name { get; set; }
Property Value
Type |
---|
System.String |
Order
Gets or sets the order of the editor in a view. Based on this value data fields will be arrange on order by SfDataForm.
Declaration
public int Order { get; set; }
Property Value
Type |
---|
System.Int32 |
PlaceHolderText
Gets or sets the water mark for the editor to provide hint for users.
Declaration
public string PlaceHolderText { get; set; }
Property Value
Type |
---|
System.String |
PropertyInfo
Gets or the meta data of property.
Declaration
public PropertyInfo PropertyInfo { get; }
Property Value
Type |
---|
System.Reflection.PropertyInfo |
ShowCharCount
Gets or sets a value indicating whether dataformitem to show the character count label in textinputlayout.
Declaration
public bool ShowCharCount { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Remarks
Applicable only for the DataformItem which TextInputLayout.
ShowLabel
Gets or sets a value indicating whether to show label or not.
Declaration
public bool ShowLabel { get; set; }
Property Value
Type |
---|
System.Boolean |
TextInputLayoutSettings
Gets or sets the Text input Layout Settings for dataformitem to customize and configure the text input layout item in dataform.
Declaration
public TextInputLayoutSettings TextInputLayoutSettings { get; set; }
Property Value
Type |
---|
TextInputLayoutSettings |
Remarks
Applicable only for the DataformItem which TextInputLayout.
UnfocusedColor
Gets or sets the unfocused color for dataform item to customize the color of the item when lost focus in dataform.
Declaration
public Color UnfocusedColor { get; set; }
Property Value
Type |
---|
Xamarin.Forms.Color |
Remarks
Applicable only for the DataformItem which TextInputLayout.
ValidationLabelFontSize
Gets or sets the size of the validation message text.
Declaration
public double ValidationLabelFontSize { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The size of the validation message text. |
Remarks
Applicable only for the DataformItem which Default.
ValidationLabelStyle
Gets or sets the validation label style for DataFormItem to customize the validation label of the DataFormItem in DataForm.
Declaration
public LabelStyle ValidationLabelStyle { get; set; }
Property Value
Type |
---|
LabelStyle |
Remarks
Applicable only for the DataformItem which TextInputLayout.
ValidMessage
Gets a error message of DataFormItem in case of valid data.
Declaration
public string ValidMessage { get; }
Property Value
Type | Description |
---|---|
System.String | The valid message. |
ValidMessageColor
Gets or sets the Positive message color for textinputlayout.
Declaration
public Color ValidMessageColor { get; set; }
Property Value
Type |
---|
Xamarin.Forms.Color |
Remarks
Applicable only for the DataformItem which TextInputLayout.
Methods
Dispose(Boolean)
Disposes all the resources used by the DataFormItem class.
Declaration
protected override void Dispose(bool isDisposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isDisposing | Indicates whether the call is from Dispose method or from a finalizer. |