To make the migration from the Xamarin SfDataForm to the .NET MAUI SfDataForm easier, most of the APIs from the Xamarin SfDataForm
were kept in the .NET MAUI SfDataForm
. However, to maintain the consistency of API naming in the .NET MAUI SfDataForm
, some of the APIs have been renamed. Please find the difference in the following topics.
Expand Table
Xamarin SfDataForm
.NET MAUI SfDataForm
Syncfusion.SfDataForm.XForms
Syncfusion.Maui.DataForm
To initialize the control, import the DataForm namespace and initialize the SfDataForm
as shown in the following code sample.
Expand Table
Xamarin SfDataForm
.NET MAUI SfDataForm
<ContentPage
...
xmlns:dataForm= "clr-namespace:Syncfusion.XForms.DataForm;assembly=Syncfusion.SfDataForm.XForms" >
<dataForm:SfDataForm x:Name= "dataForm" />
</ContentPage>
using Syncfusion.XForms.DataForm ;
...
SfDataForm dataForm = new SfDataForm ();
this . Content = dataForm ;
<ContentPage
...
xmlns:dataForm= "clr-namespace:Syncfusion.Maui.DataForm;assembly=Syncfusion.Maui.DataForm" >
<dataForm:SfDataForm x:Name= "dataForm" />
</ContentPage>
using Syncfusion.Maui.DataForm ;
…
SfDataForm dataForm = new SfDataForm ();
this . Content = dataForm ;
<ContentPage
...
xmlns:dataForm= "clr-namespace:Syncfusion.Maui.DataForm;assembly=Syncfusion.Maui.DataForm" >
<dataForm:SfDataForm x:Name= "dataForm"
DataObject= "{Binding DataModel}"
ColumnCount= "2" />
</ContentPage>
using Syncfusion.Maui.DataForm ;
...
SfDataForm dataForm = new SfDataForm ();
dataForm . DataObject = new DataModel ();
dataForm . ColumnCount = 2 ;
this . Content = dataForm ;
public class DataModel
{
public string Name { get ; set ; }
public string Email { get ; set ; }
public int PhoneNumber { get ; set ; }
public string Address { get ; set ; }
}
Expand Table
Xamarin SfDataForm
.NET MAUI SfDataForm
Description
DataObject
DataObject
Gets or sets the value which is used to set the editors to the data form.
IsReadOnly
IsReadOnly
Gets or sets a value indicating whether editors are enabled for editing.
CommitMode
CommitMode
Gets or sets the value that determines when to commit values that users enter in the data form’s editors to the bound data object.
ValidationMode
ValidationMode
Gets or sets a value that denotes when the user input should be validated based on IDataErrorInfo and ValidationAttributes.
Items
Items
Gets or sets the value which used to set the DataFormViewItem collection in the SfDataForm.
ColumnCount
ColumnCount
Gets or sets the value representing the number of editors to be arranged per row in the data form.
SourceProvider
ItemsSourceProvider
Gets or sets the value to get the source for the picker type editors.
AutoGenerateItems
AutoGenerateItems
Gets or sets a value indicating whether to auto-generate the DataFormItems in the data form.
ItemManager
ItemManager
Get or set the item manager.
Nil
EditorTextStyle
Gets or sets the style of the editor text used to customize the text color, font, font size, font family, and font attributes.
Nil
LabelTextStyle
Gets or sets the label text style used to customize the text color, font, font size, font family, and font attributes.
Nil
ErrorLabelTextStyle
Gets or sets the style of error label text used to customize the text color, font, font size, font family, and font attributes.
Nil
ValidMessageLabelTextStyle
Gets or sets the style of the validation label text used to customize the text color, font size, font family, and font attributes.
Nil
DefaultLayoutSettings
Gets or sets the settings to customize the default layout (Holds label and editor) settings.
LayoutOptions
LayoutType
Gets or sets the layout options for DataForm to define the layout type for the Dataform.
Nil
TextInputLayoutSettings
Gets or sets the floating label layout settings for Dataform.
DataFormTextStyle
The properties of the Xamarin SfDataForm
LabelStyle are grouped to the DataFormTextStyle in .NET MAUI SfDataForm
.
<ContentPage
...
xmlns:DataForm= "clr-namespace:Syncfusion.Maui.DataForm;assembly=Syncfusion.Maui.DataForm" >
<dataForm:SfDataForm
x:Name= "dataForm" >
<dataForm:SfDataForm.LabelTextStyle>
<dataForm:DataFormTextStyle
TextColor= "Red"
FontAttributes= "Italic"
FontSize= "12" >
</dataForm:DataFormTextStyle>
</dataForm:SfDataForm.LabelTextStyle>
</dataForm:SfDataForm>
</ContentPage>
using Syncfusion.Maui.DataForm ;
…
SfDataForm dataForm = new SfDataForm ();
this . dataForm . DataObject = new DataModel ();
this . dataForm . LabelTextStyle = new DataFormTextStyle ()
{
TextColor = Colors . Red ,
FontAttributes = FontAttributes . Italic ,
FontSize = 12 ,
};
this . Content = dataForm ;
public class DataModel
{
public string Name { get ; set ; }
public string Email { get ; set ; }
public int PhoneNumber { get ; set ; }
public string Address { get ; set ; }
}
Expand Table
Xamarin SfDataForm
.NET MAUI SfDataForm
Description
Nil
TextColor
Gets or sets the editor text color in the data form.
FontSize
FontSize
Gets or sets the double value that represents the text font size in the data form.
FontFamily
FontFamily
Gets or sets the string that represents the text font family in the data form.
FontAttributes
FontAttributes
Gets or sets the text font attributes in the data form.
Expand Table
Xamarin SfDataForm
.NET MAUI SfDataForm
Description
RowSpan
RowSpan
Gets or sets the number of rows this item spans, which increases the item's height.
ColumnSpan
ColumnSpan
Gets or sets the number of columns this item spans to increase the item's width.
IsVisible
IsVisible
Gets or sets a value indicating whether the data form item layout (Holds editor and label) is visible or not.
Nil
RowOrder
Gets or sets the row order of the editor in the data form.
Nil
Padding
Gets or sets the space between the data form item’s editor and label.
Expand Table
Xamarin SfDataForm
.NET MAUI SfDataForm
Description
GroupName
GroupName
Gets or sets the name of the group to the editor.
Name
FieldName
Gets or sets the editor's name in the data form.
LabelText
LabelText
Gets or sets the editor’s label text.
PlaceHolderText
PlaceholderText
Gets or sets the prompt string displayed or the water mark to provide hint for users in the editors.
Nil
PlaceholderColor
Gets or sets the color of the prompt string displayed or the watermark to provide hints for users in the editors.
ShowLabel
ShowLabel
Gets or sets a value indicating whether to show the label to the editor.
IsReadOnly
IsReadOnly
Gets or sets a value indicating whether the editor can be enabled or disabled.
EditorFontSize
EditorTextStyle
Gets or sets the style of editor text used to customize the text color, font, font size, font family, and font attributes.
ErrorMessageColor
ErrorLabelTextStyle
Gets or sets the style of the error message label used to customize the text color, font, font size, font family, and font attributes.
ValidationLabelStyle
ValidMessageLabelTextStyle
Gets or sets the style of a valid message label used to customize the text color, font size, font family, and font attributes.
Nil
LabelTextStyle
Gets or sets the style of editor label text used to customize the text color, font size, font family, and font attributes.
Nil
Background
Gets or sets the background to the data form item layout, which is used to render the label and editor for the data field.
Nil
DefaultLayoutSettings
Gets or sets the value of the layout (holds label and editor) settings used to customize the label position, label width, and editor width.
Nil
ItemsOrderInRow
Gets or sets the editor’s position in a row.
ImageSource
LeadingView
Gets or sets an image used as the editor’s label.
IsValid
IsValid
Gets a value indicating whether this DataFormItem is valid or not.
PropertyInfo
PropertyInfo
Gets the property info of the data field.
LayoutOptions
LayoutType
Gets or sets the layout options for DataFormItem to define the layout type for the DataFormItem in dataform.
TextInputLayoutSettings
TextInputLayoutSettings
Gets or sets the Text input Layout Settings for dataformitem to customize and configure the text input layout item in dataform.
Nil
ShowLeadingView
Nil
LeadingViewPosition
Gets or sets the value that determines whether to place the leading view within the floating label layout.
Nil
TrailingView
Gets or sets a value for a view to place after input view.
Nil
TrailingViewPosition
Gets or sets a value that determines whether to place the trailing view within the layout.
Nil
ShowTrailingView
Gets or sets a value that indicates whether to display the trailing view.
Height
EditorHeight
Gets or sets the height of the editor.
The following properties of the Xamarin SfDataForm
is moved to the DataFormDefaultLayoutSettings class of .NET MAUI SfDataForm
.
TextInputLayoutSettings
Expand Table
Xamarin SfDataForm
.NET MAUI SfDataForm
Description
ContainerType
ContainerType
Gets or sets a value determining the container types for floating label layout.
OutlineCornerRadius
OutlineCornerRadius
Gets or sets a value to customize the customize the corner radius of outline border in the floating label layout.
Nil
EnableFloating
Gets or sets a value that indicates whether to float the label when it is focused or unfocused.
Nil
IsHintAlwaysFloated
Gets or sets a value that indicates whether to fix the hint label always at the top even when the text is empty in the floating label layout.
Nil
EnableHintAnimation
Gets or sets a value that indicates whether to enable animation for the hint text when the input view is focused or unfocused in the floating label layout.
Nil
HelperTextStyle
Gets or sets the style for helper label in the floating label layout.
Nil
Stroke
Gets or sets the border color based on the container in the floating label layout.
Nil
FocussedStrokeThickness
Gets or sets as a value to customize the stroke width in a focused state in the floating label layout. It applies to the bottom line and outline border when setting the container type as filled and outlined.
Nil
UnfocussedStrokeThickness
Gets or sets as a value to customize the stroke width in an unfocused state in the floating label layout. It applies to the bottom line and outline border when setting the container type as filled and outlined.
ShowHelperText
ShowHelperText
Gets or sets a value indicating whether to display the helper and error text. It determines the visibility of the helper text and error text.
Nil
FocusedStroke
Gets or sets the focused border color or focused baseline color based on the container type of the data form floating label layout type.
Expand Table
Xamarin SfDataForm
.NET MAUI SfDataForm
Description
ColumnCount
ColumnCount
Gets or sets the value representing the number of editors to be arranged per row in the DataFormGroupItem.
DataFormItems
Items
Gets or sets the value which used to set the items grouped under the group.
IsExpanded
IsExpanded
Gets or sets a value indicating whether the group of editors is expanded or not.
AllowExpandCollapse
AllowExpandCollapse
Gets or sets a value indicating whether users can collapse and expand the group of editors.
Nil
HeaderTextStyle
Gets or sets the style of group header text, that used to customize the text color, font, font size, font family and font attributes.
Nil
HeaderBackground
Gets or sets the background color for the header of the editor group.
Nil
ItemsPadding
Gets or sets the distance between editors and the data form’s borders or group headers.
GroupName
Name
Gets or sets the name of the editor group.
Expand Table
Xamarin SfDataForm
.NET MAUI SfDataForm
Description
CheckedColor
Color
Gets or sets the color of CheckBox editor.
Expand Table
Xamarin SfDataForm
.NET MAUI SfDataForm
Description
Nil
OnColor
Gets or sets the color of the switch when it is in the on state.
Nil
ThumbColor
Gets or sets the thumb color of the switch editor.
DataFormTextEditorItem
Expand Table
Xamarin SfDataForm
.NET MAUI SfDataForm
Description
KeyBoard
Keyboard
Gets or sets the type of keyboard used to display the text, multiline, and password editor.
Expand Table
Xamarin SfDataForm
.NET MAUI SfDataForm
Description
AllowNull
AllowNull
Get or set a value indicating whether the DataFormNumericEditor allows a null value or not.
FormatString
CustomFormat
Get or set the format used to specify the formatting of the editor value.
Maximum
Maximum
Get or set the numerical maximum value for DataFormNumericEditor.
Minimum
Minimum
Get or set the numerical minimum value for DataFormNumericEditor.
CultureInfo
Culture
Get or set the culture for DataFormNumericEditor.
DataFormMaskedTextItem
Expand Table
Xamarin SfDataForm
.NET MAUI SfDataForm
Description
CultureInfo
Culture
Get or set the culture for mask values based on the given culture.
Mask
Mask
Get or set the mask value which restricts the inputs provided in the control.
MaskType
MaskType
Get or set the mask type for the DataFormMaskedTextEditor.
PromptChar
PromptChar
Get or set a char which is used as a prompt char of DataFormMaskedTextEditor.
ValueMaskFormat
ValueMaskFormat
Get or set the format for the value.
Expand Table
Xamarin SfDataForm
.NET MAUI SfDataForm
Description
Format
Format
Gets or sets the time format for the Time Picker.
The common properties of Xamarin SfDataForm
list items ( DataFormPickerEditor , DataFormAutoCompleteEditor , DataFormDropDownEditor and DataFormRadioGroupEditor ) are added to the DataFormListItem class in the .NET MAUI SfDataForm
.
Expand Table
Xamarin SfDataForm
.NET MAUI SfDataForm
Description
ItemsSource
ItemsSource
Gets or sets the collection, which will be displayed in the picker where the user can select from available items.
DisplayMemberPath
DisplayMemberPath
Gets or sets a path to a value on the source object that will get displayed in the picker.
ValueMemberPath
SelectedValuePath
Gets or sets a path to a value on the source object which will get saved to the data field.
Expand Table
Xamarin SfDataForm
.NET MAUI SfDataForm
Description
Nil
IsEditable
Gets or sets a value indicating whether the ComboBox can be edited.
Nil
TextSearchMode
Gets or sets the text search mode for the ComboBox editor.
Expand Table
Xamarin SfDataForm
.NET MAUI SfDataForm
Description
ColumnSpan
ColumnSpan
Gets or sets the number of columns this item spans to increase the item's width.
RowSpan
RowSpan
Gets or sets the number of rows this item spans, which is used to increase the item's height.
Nil
RowOrder
Gets or sets the row order of the editor in the data form.
Nil
ItemsOrderInRow
Gets or sets the editor’s position in a row.
ShowLabel
ShowLabel
Gets or sets a value indicating whether to show the label to the DataForm editor.
ValidMessage
ValidMessage
Gets or sets a string displayed when the user enters a valid value for the data field as a success message.
Expand Table
Xamarin SfDataForm
.NET MAUI SfDataForm
Description
MinDay
MinimumDate
Gets or sets the minimum date that users can assign to the date editor.
MaxDay
MaximumDate
Gets or sets the maximum date that users can assign to the date editor.
MinMonth
Nil
Gets or sets the minimum month of a date.
MaxMonth
Nil
Gets or sets the maximum month of a date.
MinYear
Nil
Gets or sets the minimum year of a date.
MaxYear
Nil
Gets or sets the maximum year of a date.
Nil
DisplayFormat
Gets or sets the attribute date display format of the date editor.
[MacCatalyst] - TimePicker popup is not working.
[MacCatalyst, iOS] - Multiline editor placeholder text font size not changing based on editor font size.
[MacCatalyst, iOS] – Date and Time picker text styles are not changing.
[MacCatalyst, iOS] – Date picker minimum and maximum display dates are not working.
[MacCatalyst, iOS] - Text style not applied to radio button.
[Android, iOS, MacCatalyst] - In RTL mode, the multiline text editor text is not showing from the right.
[Windows] - Picker editor text style is not changing.
[iOS] - Maximum input length is not working in Text and Password editors.
[Windows] - Time picker format not changing.
[MacCatalyst, iOS] - RTL FlowDirection is not working for Date and Time pickers.
[MacCatalyst, iOS] - In RTL FlowDirection, the ScrollView scroll bar shows at the right.
[Android] - in RTL mode Radio button’s content does not arrange from the right.
RTL
flow direction not working for ComboBox and AutoComplete editors.
IsReadOnly
not working for AutoComplete editor.
Dark and light theme - There is no border and focused border stroke customization for the default editors (Text, password, multiline text, picker, DatePicker, and TimePicker).
Dark and light theme - [iOS] There is no border and focused border stroke customization for the default editor (Text, password, picker, DatePicker, and TimePicker).
Dark and light theme -[MacOS] There is no border and focused border stroke customization for the default editor (Text, password, and picker).
Dark and light theme - MacOS The text color customization will not work for the DatePicker and TimePicker.