Skip to content

Commit ee2df26

Browse files
Edit Form Example: Update Readme files
1 parent be5b7a5 commit ee2df26

File tree

6 files changed

+33
-44
lines changed

6 files changed

+33
-44
lines changed

CS/EditFormExample/MainPage.xaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,4 @@
7171
</VerticalStackLayout>
7272
</ScrollView>
7373
</Grid>
74-
</ContentPage>
74+
</ContentPage>

CS/EditFormExample/MainPage.xaml.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,4 @@ await Dispatcher.DispatchAsync(() => {
8787
editorPage.Handler.DisconnectHandler();
8888
}
8989
}
90-
}
90+
}

CS/EditFormExample/Readme.md

+24-40
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,22 @@
11
# DataFormView for .NET MAUI - Edit a Contact’s Data
22

3-
This example demonstrates how to use a [DataFormView](https://docs.devexpress.com/MAUI/DevExpress.Maui.DataForm.DataFormView) to implement a contact edit form.
4-
5-
<img src="https://user-images.githubusercontent.com/12169834/228216536-48240713-be2f-45e7-9dda-dbf843682500.png" width="30%"/>
6-
7-
Included controls and their properties:
8-
9-
* [DataFormView](https://docs.devexpress.com/MAUI/DevExpress.Maui.DataForm.DataFormView): [ValidateProperty](https://docs.devexpress.com/MAUI/DevExpress.Maui.DataForm.DataFormView.ValidateProperty), [DataObject](https://docs.devexpress.com/MAUI/DevExpress.Maui.DataForm.DataFormView.DataObject)
10-
11-
* [StatusBarBehavior](https://learn.microsoft.com/en-us/dotnet/communitytoolkit/maui/behaviors/statusbar-behavior): [StatusBarColor](https://learn.microsoft.com/en-us/dotnet/communitytoolkit/maui/behaviors/statusbar-behavior?tabs=ios#using-the-statusbarbehavior), [StatusBarStyle](https://learn.microsoft.com/en-us/dotnet/communitytoolkit/maui/behaviors/statusbar-behavior?tabs=ios#using-the-statusbarbehavior)
3+
This example demonstrates how to use the [`DataFormView`](https://docs.devexpress.com/MAUI/DevExpress.Maui.DataForm.DataFormView) control to implement a contact edit form. To edit the user avatar, you can use the [`ImageEdit`](https://docs.devexpress.com/MAUI/DevExpress.Maui.Editors.ImageEdit) control.
124

5+
<img src="../../Images/data-form-with-image-edit-upload.png" alt="DevExpress Data Form for iOS" height="700"/> <img src="../../Images/data-form-with-image-edit-bs.png" alt="DevExpress Data Form for Android" height="700"/>
136

147
## Implementation Details
158

16-
17-
* To bind a DataFormView to an object, specify the [DataFormView.DataObject](https://docs.devexpress.com/MAUI/DevExpress.Maui.DataForm.DataFormView.DataObject) property.
9+
* Specify the [`DataFormView.DataObject`](https://docs.devexpress.com/MAUI/DevExpress.Maui.DataForm.DataFormView.DataObject) property to bind a `DataFormView` to an object.
1810

19-
* Specify a [DataFormView](https://docs.devexpress.com/MAUI/DevExpress.Maui.DataForm.DataFormView) editor's [FieldName](https://docs.devexpress.com/MAUI/DevExpress.Maui.DataForm.DataFormItem.FieldName) property to bind the editor to a view model's property:
11+
* Use a `DataFormView` editor's [`FieldName`](https://docs.devexpress.com/MAUI/DevExpress.Maui.DataForm.DataFormItem.FieldName) property to bind the editor to a view model's property:
2012

2113
```xml
2214
<dxdf:DataFormTextItem FieldName="FirstName" .../>
2315
```
2416

25-
File to Look At: [MainPage.xaml](MainPage.xaml)
26-
27-
* Call the [DataFormView.Commit](https://docs.devexpress.com/MAUI/DevExpress.Maui.DataForm.DataFormView.Commit) method to validate input values and send changes to the data source.
17+
* Call the [`DataFormView.Commit`](https://docs.devexpress.com/MAUI/DevExpress.Maui.DataForm.DataFormView.Commit) method to validate input values and send changes to the data source.
2818

29-
* [DataFormView](https://docs.devexpress.com/MAUI/DevExpress.Maui.DataForm.DataFormView) supports validation events and attributes. The following code uses a validation event for `Email` values:
19+
* `DataFormView` supports validation events and attributes. The following code uses a validation event for `Email` values:
3020

3121
```csharp
3222
private void ValidateCustomerProperties(object sender, DevExpress.Maui.DataForm.DataFormPropertyValidationEventArgs e) {
@@ -40,8 +30,6 @@ Included controls and their properties:
4030
}
4131
```
4232

43-
File to Look At: [MainPage.xaml.cs](MainPage.xaml.cs)
44-
4533
The following code snippet defines validation attributes for `FirstName` and `LastName` properties:
4634

4735
```csharp
@@ -56,20 +44,15 @@ Included controls and their properties:
5644
}
5745
```
5846

59-
File to Look At: [MainPage.xaml](MainPage.xaml)
60-
61-
* [DataFormView](https://docs.devexpress.com/MAUI/DevExpress.Maui.DataForm.DataFormView) automatically aligns its editors. You can customize the color and width of editor labels:
47+
* `DataFormView` automatically aligns its editors. You can customize the color and width of editor labels:
6248

6349
```xaml
6450
<dxdf:DataFormView EditorLabelColor="{StaticResource Primary}" EditorLabelWidth="40">
6551
```
6652

67-
File to Look At: [MainPage.xaml](MainPage.xaml)
68-
69-
* Embedded [DataFormView](https://docs.devexpress.com/MAUI/DevExpress.Maui.DataForm.DataFormView)'s editors contain customization options such as [LabelIcon](https://docs.devexpress.com/MAUI/DevExpress.Maui.DataForm.DataFormItem.LabelIcon), [InplaceLabelText](https://docs.devexpress.com/MAUI/DevExpress.Maui.DataForm.DataFormItem.InplaceLabelText), [LabelText](https://docs.devexpress.com/MAUI/DevExpress.Maui.DataForm.DataFormItem.LabelText), and [IsInplaceLabelFloating](https://docs.devexpress.com/MAUI/DevExpress.Maui.Editors.EditBase.IsLabelFloating).
70-
71-
* You can use the [LabelIcon](https://docs.devexpress.com/MAUI/DevExpress.Maui.DataForm.DataFormItem.LabelIcon) property to divide editors into visual groups. To do this, specify the [LabelIcon](https://docs.devexpress.com/MAUI/DevExpress.Maui.DataForm.DataFormItem.LabelIcon) property of the first editor in a group.
53+
* Embedded `DataFormView`'s editors contain customization options such as [`LabelIcon`](https://docs.devexpress.com/MAUI/DevExpress.Maui.DataForm.DataFormItem.LabelIcon), [`InplaceLabelText`](https://docs.devexpress.com/MAUI/DevExpress.Maui.DataForm.DataFormItem.InplaceLabelText), [`LabelText`](https://docs.devexpress.com/MAUI/DevExpress.Maui.DataForm.DataFormItem.LabelText), and [`IsInplaceLabelFloating`](https://docs.devexpress.com/MAUI/DevExpress.Maui.Editors.EditBase.IsLabelFloating).
7254

55+
* You can use the `LabelIcon` property to divide editors into visual groups.
7356

7457
```xml
7558
<dxdf:DataFormView ...>
@@ -78,37 +61,38 @@ Included controls and their properties:
7861
</dxdf:DataFormView>
7962
```
8063

81-
File to Look At: [MainPage.xaml](MainPage.xaml)
82-
83-
* If an editor's [LabelIcon](https://docs.devexpress.com/MAUI/DevExpress.Maui.DataForm.DataFormItem.LabelIcon) property is not specified, [DataFormView](https://docs.devexpress.com/MAUI/DevExpress.Maui.DataForm.DataFormView) displays the bound property's name in the editor's label area. You can set the editor's [LabelIcon](https://docs.devexpress.com/MAUI/DevExpress.Maui.DataForm.DataFormItem.LabelIcon) property to an empty string to hide this text.
64+
* If an editor's `LabelIcon` property is not specified, `DataFormView` displays the bound property's name in the editor's label area. You can set the editor's `LabelIcon` property to an empty string to hide this text.
8465

8566
```xml
8667
<dxdf:DataFormTextItem FieldName="LastName" LabelText="" InplaceLabelText="Last Name" .../>
8768
```
8869

89-
* [DataFormView](https://docs.devexpress.com/MAUI/DevExpress.Maui.DataForm.DataFormView) items support masks. Specify the [DataFormMaskedItem.Mask](https://docs.devexpress.com/MAUI/DevExpress.Maui.DataForm.DataFormMaskedItem.Mask) property to define a mask.
70+
* `DataFormView` items support masks. Specify the [`DataFormMaskedItem.Mask`](https://docs.devexpress.com/MAUI/DevExpress.Maui.DataForm.DataFormMaskedItem.Mask) property to define a mask.
9071

9172
```xml
9273
<dxdf:DataFormMaskedItem Mask="+1 (000) 000-0000" />
9374
```
94-
* Specify a [DataFormItem](https://docs.devexpress.com/MAUI/DevExpress.Maui.DataForm.DataFormItem)'s [Keyboard](https://docs.devexpress.com/MAUI/DevExpress.Maui.DataForm.DataFormTextItemBase.Keyboard) property to define a type of keyboard used to input text.
75+
* Specify a [`DataFormItem`](https://docs.devexpress.com/MAUI/DevExpress.Maui.DataForm.DataFormItem)'s [`Keyboard`](https://docs.devexpress.com/MAUI/DevExpress.Maui.DataForm.DataFormTextItemBase.Keyboard) property to define a type of keyboard used to input text.
9576

9677
## Files to Look At
9778

9879
<!-- default file list -->
99-
* [MainPage.xaml](MainPage.xaml)
100-
* [MainPage.xaml.cs](MainPage.xaml.cs)
101-
* [MainViewModel.cs](MainViewModel.cs)
102-
* [App.xaml](App.xaml)
80+
* [MainPage.xaml](CS/MainPage.xaml)
81+
* [MainPage.xaml.cs](CS/MainPage.xaml.cs)
82+
* [MainViewModel.cs](CS/MainViewModel.cs)
83+
* [App.xaml](CS/App.xaml)
10384
<!-- default file list end -->
10485

10586
## Documentation
10687

107-
* [Featured Scenario: Context Menu Actions in Popup](https://docs.devexpress.com/MAUI/404342)
108-
* [Featured Scenarios](https://docs.devexpress.com/MAUI/404291)
109-
* [SimpleButton.Content](https://docs.devexpress.com/MAUI/DevExpress.Maui.Controls.SimpleButton.Content)
110-
* [DXPopup](https://docs.devexpress.com/MAUI/DevExpress.Maui.Controls.DXPopup)
88+
* [DataFormView](https://docs.devexpress.com/MAUI/DevExpress.Maui.DataForm.DataFormView)
89+
* [StatusBarBehavior](https://learn.microsoft.com/en-us/dotnet/communitytoolkit/maui/behaviors/statusbar-behavior)
90+
* [ImageEdit](https://docs.devexpress.com/MAUI/DevExpress.Maui.Editors.ImageEdit)
91+
* [DXBorder](https://docs.devexpress.com/MAUI/DevExpress.Maui.Core.DXBorder)
11192

11293
## More Examples
11394

114-
* [DevExpress Mobile UI for .NET MAUI](https://github.com/DevExpress-Examples/maui-demo-app/)
95+
* [Get Started with DevExpress Data Form for .NET MAUI](../DataFormGetStarted)
96+
* [Add and Remove DataFormItems at Runtime](../AddingDataEditorsAtRuntime)
97+
* [Customize a DataFrom Appearance](../CustomAppearance)
98+
* [Display a ComboBoxEdit in the DataForm](../ComboBoxEditor)
82.1 KB
Loading
58.6 KB
Loading

README.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ See the following help topic for more information: [DevExpress Data Form for .NE
2929

3030
You can also refer to the following YouTube video for instructions on how to get started with the Data Form Control: [Adding a Data Form to Your .NET MAUI App](https://www.youtube.com/watch?v=imUCmru5Lwc&ab_channel=DevExpress).
3131

32-
3332
### Customize the Data Form Appearance
3433

3534
The [CustomAppearance](./CS/CustomAppearance/) project shows how to customize the appearance of Data Form items.
@@ -40,7 +39,6 @@ The [CustomAppearance](./CS/CustomAppearance/) project shows how to customize th
4039

4140
The [AddingDataEditorsAtRuntime](./CS/AddingDataEditorsAtRuntime/) project shows how to add and remove Data Form items at runtime.
4241

43-
4442
<img src="./Images/data-form-runtime-iphone.png" alt="DevExpress Data Form for iOS" height="700"/> <img src="./Images/data-form-runtime-android.png" alt="DevExpress Data Form for Android" height="700"/>
4543

4644
### Display ComboBox
@@ -49,6 +47,12 @@ The [ComboBoxEditor](./CS/ComboBoxEditor/) project shows how to display a Combob
4947

5048
<img src="./Images/data-form-combobox-iphone.png" alt="DevExpress Data Form for iOS" height="700"/> <img src="./Images/data-form-combobox-android.png" alt="DevExpress Data Form for Android" height="700"/>
5149

50+
### Upload and Edit Avatar
51+
52+
The [EditFormExample](./CS/EditFormExample/) project shows how to integrate the [ImageEdit](https://docs.devexpress.com/MAUI/DevExpress.Maui.Editors.ImageEdit) control within the Data Form to edit the avatar.
53+
54+
<img src="./Images/data-form-with-image-edit-upload.png" alt="DevExpress Data Form for iOS" height="700"/> <img src="./Images/data-form-with-image-edit-bs.png" alt="DevExpress Data Form for Android" height="700"/>
55+
5256
## Documentation
5357

5458
- [Data Grid](https://docs.devexpress.com/MAUI/403255/data-grid/data-grid)
@@ -57,6 +61,7 @@ The [ComboBoxEditor](./CS/ComboBoxEditor/) project shows how to display a Combob
5761
- [Navigation](https://docs.devexpress.com/MAUI/403297/navigation/index)
5862
- [Data Editors](https://docs.devexpress.com/MAUI/403427/editors/index)
5963
- [Collection View](https://docs.devexpress.com/MAUI/403324/collection-view/index)
64+
- [Image Editor](https://docs.devexpress.com/MAUI/DevExpress.Maui.Editors.ImageEdit)
6065

6166
## More Examples
6267

0 commit comments

Comments
 (0)