Hi
Iain,
Thank
you for reaching out. When `AutoGenerateItems` is set to `false`, you can
manually define the items in XAML, and the `FieldName` will map to the
corresponding property in your model. The values for these items will be
automatically updated based on the data object of the `SfDataForm`.
For
example, you can set the value for the `DataFormTimeItem` in the model class as
shown below:
|
<dataForm:SfDataForm
x:Name="dataForm"
DataObject="{Binding
ContactInfo}"
AutoGenerateItems="False">
<dataForm:SfDataForm.Items>
<dataForm:DataFormTimeItem
FieldName="EventTime" />
</dataForm:SfDataForm.Items>
</dataForm:SfDataForm>
|
Model
class:
|
public
class ContactInfo
{
[DataType(DataType.Time)]
[Display(Name = "Event
Time")]
public TimeSpan? EventTime { get; set; } = new TimeSpan(18,
30, 0);
}
|
We’ve
also prepared a simple sample to demonstrate this. Please review the attached sample
and let us know if you need any further assistance.
Regards,
Vidyalakshmi
M.
Attachment:
MAUIDataForm_d965a32f.zip