Class DataFormLayoutManager
Represent a class to creates DataFormItemView and DataFormGroupItemView its sub views for SfDataForm.
Inheritance
Implements
Namespace: Syncfusion.XForms.DataForm
Assembly: Syncfusion.SfDataForm.XForms.dll
Syntax
public class DataFormLayoutManager : Object, IDisposable
Constructors
DataFormLayoutManager(SfDataForm)
Initializes a new instance of the DataFormLayoutManager class..
Declaration
public DataFormLayoutManager(SfDataForm dataForm)
Parameters
Type | Name | Description |
---|---|---|
SfDataForm | dataForm | The DataForm object. |
Properties
DataForm
Gets the instance of SfDataForm.
Declaration
public SfDataForm DataForm { get; }
Property Value
Type |
---|
SfDataForm |
Methods
CreateDataFormGroupItemView(Int32, Int32)
Creates DataFormGroupItemView and populates its sub view for specified index.
Declaration
protected virtual DataFormGroupItemView CreateDataFormGroupItemView(int rowIndex, int columnIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | rowIndex | The rowIndex to create the DataFormGroupItemView. |
System.Int32 | columnIndex | The columnIndex to create the DataFormGroupItemView. |
Returns
Type | Description |
---|---|
DataFormGroupItemView | Returns DataFormGroupItenView. |
CreateDataFormItemTextInputLayout(Int32, Int32)
Creates the DataFormItemTextInputLayout and populates its sub view for specified index.
Declaration
protected virtual DataFormItemView CreateDataFormItemTextInputLayout(int rowIndex, int columnIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | rowIndex | The rowIndex to create the DataFormItemTextInputLayout. |
System.Int32 | columnIndex | The columnIndex to create the DataFormItemTextInputLayout. |
Returns
Type | Description |
---|---|
DataFormItemView | Returns the created DataFormItemTextInputLayout. |
CreateDataFormItemView(Int32, Int32)
Creates the DataFormItemView and populates its sub view for specified index.
Declaration
protected virtual DataFormItemView CreateDataFormItemView(int rowIndex, int columnIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | rowIndex | The rowIndex to create the DataFormItemView. |
System.Int32 | columnIndex | The columnIndex to create the DataFormItemView. |
Returns
Type | Description |
---|---|
DataFormItemView | Returns the created DataFormItemView. |
Dispose()
Releases all resource used by the DataFormLayoutManager object.
Declaration
public void Dispose()
Remarks
Call Dispose() when you are finished using the DataFormLayoutManager. The Dispose() method leaves the DataFormLayoutManager in an unusable state. After calling Dispose(), you must release all references to the DataFormLayoutManager so the garbage collector can reclaim the memory that the DataFormLayoutManager was occupying.
Dispose(Boolean)
Dispose the specified isDisposing.
Declaration
protected virtual void Dispose(bool isDisposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isDisposing | If set to |
GenerateViewForGroupHeader(DataFormGroupItem)
Generates label to show the GroupHeader.
Declaration
protected virtual View GenerateViewForGroupHeader(DataFormGroupItem dataFormGroupItem)
Parameters
Type | Name | Description |
---|---|---|
DataFormGroupItem | dataFormGroupItem | The DataFormGroupItem to get the group information. |
Returns
Type | Description |
---|---|
Xamarin.Forms.View | Returns UILabel. |
GenerateViewForGroupIcon(DataFormGroupItem)
Generates image to show the expander icon in DataFormGroupItemView.
Declaration
protected virtual Image GenerateViewForGroupIcon(DataFormGroupItem dataFormGroupItem)
Parameters
Type | Name | Description |
---|---|---|
DataFormGroupItem | dataFormGroupItem | The DataFormGroupItem. |
Returns
Type | Description |
---|---|
Xamarin.Forms.Image | Returns UIImageView. |
GenerateViewForLabel(DataFormItem)
Generates label to show the label text.
Declaration
protected virtual View GenerateViewForLabel(DataFormItem dataFormItem)
Parameters
Type | Name | Description |
---|---|---|
DataFormItem | dataFormItem | The DataFormItem to get label properties. |
Returns
Type | Description |
---|---|
Xamarin.Forms.View | Returns UILabel. |
GetEditorWidth(DataFormItem, Double)
Gets editor width based on available width.
Declaration
protected virtual double GetEditorWidth(DataFormItem dataFormItem, double availableWidth)
Parameters
Type | Name | Description |
---|---|---|
DataFormItem | dataFormItem | The DataFormItem. |
System.Double | availableWidth | Available width. |
Returns
Type | Description |
---|---|
System.Double | Returns editor width. |
GetGroupCollapseIcon(DataFormGroupItem)
Gets group collapse icon for group.
Declaration
protected virtual ImageSource GetGroupCollapseIcon(DataFormGroupItem dataFormGroupItem)
Parameters
Type | Name | Description |
---|---|---|
DataFormGroupItem | dataFormGroupItem | The DataFormGroupItem. |
Returns
Type | Description |
---|---|
Xamarin.Forms.ImageSource | Returns CollapseIcon. |
GetGroupExpanderIcon(DataFormGroupItem)
Gets group expander icon for group.
Declaration
protected virtual ImageSource GetGroupExpanderIcon(DataFormGroupItem dataFormGroupItem)
Parameters
Type | Name | Description |
---|---|---|
DataFormGroupItem | dataFormGroupItem | The DataFormGroupItem. |
Returns
Type | Description |
---|---|
Xamarin.Forms.ImageSource | Returns ExpanderIcon. |
GetLabelWidth(DataFormItem, Double)
Gets label width based on available width.
Declaration
protected virtual double GetLabelWidth(DataFormItem dataFormItem, double availableWidth)
Parameters
Type | Name | Description |
---|---|---|
DataFormItem | dataFormItem | The DataFormItem. |
System.Double | availableWidth | Available width. |
Returns
Type | Description |
---|---|
System.Double | Returns label width. |
GetLeftPaddingForEditor(DataFormItem)
Gets left start offset for editor.
Declaration
protected virtual int GetLeftPaddingForEditor(DataFormItem dataFormItem)
Parameters
Type | Name | Description |
---|---|---|
DataFormItem | dataFormItem | The DataFormItem. |
Returns
Type | Description |
---|---|
System.Int32 | Returns left padding for editor. |
GetLeftPaddingForGroupHeader(DataFormGroupItem)
Gets left start offset for group header.
Declaration
protected virtual int GetLeftPaddingForGroupHeader(DataFormGroupItem dataFormGroupItem)
Parameters
Type | Name | Description |
---|---|---|
DataFormGroupItem | dataFormGroupItem | The DataFormGroupItem. |
Returns
Type | Description |
---|---|
System.Int32 | Returns left padding for group header. |
GetLeftPaddingForGroupIcon(DataFormGroupItem)
Gets left start offset for group icon.
Declaration
protected virtual int GetLeftPaddingForGroupIcon(DataFormGroupItem dataFormGroupItem)
Parameters
Type | Name | Description |
---|---|---|
DataFormGroupItem | dataFormGroupItem | The DataFormGroupItem. |
Returns
Type | Description |
---|---|
System.Int32 | Returns Left padding for group icon. |
GetLeftPaddingForLabel(DataFormItem)
Gets left start offset for label.
Declaration
protected virtual int GetLeftPaddingForLabel(DataFormItem dataFormItem)
Parameters
Type | Name | Description |
---|---|---|
DataFormItem | dataFormItem | The DataFormItem. |
Returns
Type | Description |
---|---|
System.Int32 | Returns left padding value for label. |
GetLeftPaddingForValidationLabel(DataFormItem)
Gets start offset for validation label.
Declaration
protected virtual int GetLeftPaddingForValidationLabel(DataFormItem dataFormItem)
Parameters
Type | Name | Description |
---|---|---|
DataFormItem | dataFormItem | The DataFormItem. |
Returns
Type | Description |
---|---|
System.Int32 | Returns left padding for validation label. |
GetRightPaddingForEditor(DataFormItem)
Gets right offset for the editor.
Declaration
protected virtual int GetRightPaddingForEditor(DataFormItem dataFormItem)
Parameters
Type | Name | Description |
---|---|---|
DataFormItem | dataFormItem | Data form item. |
Returns
Type | Description |
---|---|
System.Int32 | Returns right padding for editor. |
Remarks
Applicable for both Xamarin.Forms.LayoutOptions.
GetRightPaddingForGroupHeader(DataFormGroupItem)
Gets right offset for group header.
Declaration
protected virtual int GetRightPaddingForGroupHeader(DataFormGroupItem dataFormGroupItem)
Parameters
Type | Name | Description |
---|---|---|
DataFormGroupItem | dataFormGroupItem | Data form group item. |
Returns
Type | Description |
---|---|
System.Int32 | Returns right padding for group header. |
Remarks
Applicable for both Xamarin.Forms.LayoutOptions.
GetRightPaddingForGroupIcon(DataFormGroupItem)
Gets right offset for group icon.
Declaration
protected virtual int GetRightPaddingForGroupIcon(DataFormGroupItem dataFormGroupItem)
Parameters
Type | Name | Description |
---|---|---|
DataFormGroupItem | dataFormGroupItem | Data form group item. |
Returns
Type | Description |
---|---|
System.Int32 | Returns right padding for group icon. |
Remarks
Applicable for both Xamarin.Forms.LayoutOptions.
GetRightPaddingForLabel(DataFormItem)
Gets right offset for label.
Declaration
protected virtual int GetRightPaddingForLabel(DataFormItem dataFormItem)
Parameters
Type | Name | Description |
---|---|---|
DataFormItem | dataFormItem | Data form item. |
Returns
Type | Description |
---|---|
System.Int32 | Returns right padding value for label. |
Remarks
Applicable only for Xamarin.Forms.LayoutOptions is Default.
GetRightPaddingForValidationLabel(DataFormItem)
Gets right offset for validation label.
Declaration
protected virtual int GetRightPaddingForValidationLabel(DataFormItem dataFormItem)
Parameters
Type | Name | Description |
---|---|---|
DataFormItem | dataFormItem | Data form item. |
Returns
Type | Description |
---|---|
System.Int32 | Returns right padding for validation label. |
Remarks
Applicable only for Xamarin.Forms.LayoutOptions is Default.
GetValidationLabelWidth(DataFormItem, Double)
Gets validation label width based on available width.
Declaration
protected virtual double GetValidationLabelWidth(DataFormItem dataFormItem, double availableWidth)
Parameters
Type | Name | Description |
---|---|---|
DataFormItem | dataFormItem | The DataFormItem. |
System.Double | availableWidth | Available width. |
Returns
Type | Description |
---|---|
System.Double | Returns validation label width. |
MoveToNextFocusableEditor(DataFormItem)
Move focus to next focusable editor. IsReadOnly editor, Non-Focusable item will not get focus.
Declaration
public virtual bool MoveToNextFocusableEditor(DataFormItem dataFormItem)
Parameters
Type | Name | Description |
---|---|---|
DataFormItem | dataFormItem | The current editing DataFormItem that leave from editing. |
Returns
Type | Description |
---|---|
System.Boolean | Returns True if can move to next editor else false. |
MoveToPreviousFocusableEditor(DataFormItem)
Move focus to previous focusable editor using key down interaction. IsReadOnly editor will not get focus.
Declaration
public virtual bool MoveToPreviousFocusableEditor(DataFormItem dataFormItem)
Parameters
Type | Name | Description |
---|---|---|
DataFormItem | dataFormItem | The current editing DataFormItem that leave from editing. |
Returns
Type | Description |
---|---|
System.Boolean | Returns True if can move to previous editor else false. |
Remarks
It can be used only in UWP platform.
OnEditorCreated(DataFormItem, View)
Raises after editor has created.
Declaration
protected virtual void OnEditorCreated(DataFormItem dataFormItem, View editor)
Parameters
Type | Name | Description |
---|---|---|
DataFormItem | dataFormItem | The DataFormItem. |
Xamarin.Forms.View | editor | The Editor. |
UpdateAppliedTextEditColor(DataFormItem, Editor)
Update multiline applied theme editor color.
Declaration
protected void UpdateAppliedTextEditColor(DataFormItem dataFormItem, Editor view)
Parameters
Type | Name | Description |
---|---|---|
DataFormItem | dataFormItem | The DataFormItem. |
Xamarin.Forms.Editor | view | The editor view. |
UpdateMultilineEditorHeight(DataFormItem, Editor)
Method used to layout the DataForm when multiline editor text get changed.
Declaration
protected void UpdateMultilineEditorHeight(DataFormItem dataFormItem, Editor view)
Parameters
Type | Name | Description |
---|---|---|
DataFormItem | dataFormItem | The DataFormItem. |
Xamarin.Forms.Editor | view | the editor view. |