|
4 | 4 | [](https://docs.devexpress.com/GeneralInformation/403183) |
5 | 5 | [](#does-this-example-address-your-development-requirementsobjectives) |
6 | 6 | <!-- default badges end --> |
7 | | -<!-- default file list --> |
8 | | -*Files to look at*: |
| 7 | + |
| 8 | +# WPF Editors - Indicate Errors and Warnings by Implementing IDataErrorInfo |
| 9 | + |
| 10 | +Please implement the `IDataErrorInfo` interface on the data object. Then, pass the text and type of error in the `IDataErrorInfo.Error` property ( it is possible to easily parse this string). Implement a custom style for the `ErrorControl`. This element presents the error icon. Modify the `ErrorControl` style in such a way as to take into account a custom error type and text (use the converter). |
| 11 | + |
| 12 | +## Implementation Details |
| 13 | + |
| 14 | +... |
| 15 | + |
| 16 | +## Files to Review |
9 | 17 |
|
10 | 18 | * [MainWindow.xaml](./CS/MainWindow.xaml) (VB: [MainWindow.xaml](./VB/MainWindow.xaml)) |
11 | 19 | * [MainWindow.xaml.cs](./CS/MainWindow.xaml.cs) (VB: [MainWindow.xaml.vb](./VB/MainWindow.xaml.vb)) |
12 | | -<!-- default file list end --> |
13 | | -# WPF Editors - Indicate errors and warnings by implementing IDataErrorInfo |
14 | 20 |
|
| 21 | +## Documentation |
15 | 22 |
|
16 | | -<p>Please implement the IDataErrorInfo interface on the data object. Then, pass the text and type of error in the IDataErrorInfo.Error property ( it is possible to easily parse this string). Implement a custom style for the ErrorControl. This element presents the error icon. Modify the ErrorControl style in such a way as to take into account a custom error type and text (use the converter).</p><p><br /> |
17 | | -</p> |
| 23 | +* [TextEdit](https://docs.devexpress.com/WPF/DevExpress.Xpf.Editors.TextEdit) |
| 24 | +* [EditValue](https://docs.devexpress.com/WPF/DevExpress.Xpf.Editors.BaseEdit.EditValue) |
| 25 | +* [ErrorToolTipContentTemplate](https://docs.devexpress.com/WPF/DevExpress.Xpf.Editors.BaseEdit.ErrorToolTipContentTemplate) |
| 26 | +* [ErrorContent](https://docs.devexpress.com/WPF/DevExpress.Xpf.Editors.Validation.BaseValidationError.ErrorContent) |
18 | 27 |
|
19 | | -<br/> |
| 28 | +## More Examples |
20 | 29 |
|
| 30 | +* [WPF Data Editors - Create a Registration Form](https://github.com/DevExpress-Examples/wpf-data-editors-create-registration-form) |
| 31 | +* [WPF Data Editors - Allow Users to Enter Only Positive Numbers](https://github.com/DevExpress-Examples/wpf-editors-prevent-negative-values) |
| 32 | +* [WPF Data Grid - Use Custom Editors to Edit Cell Values](https://github.com/DevExpress-Examples/wpf-data-grid-use-custom-editors-to-edit-cell-values) |
| 33 | +* [WPF Data Grid - How to Validate Cell Editors](https://github.com/DevExpress-Examples/wpf-data-grid-validate-cell-editors) |
21 | 34 |
|
22 | 35 | <!-- feedback --> |
23 | | -## Does this example address your development requirements/objectives? |
24 | | - |
25 | | -[<img src="https://www.devexpress.com/support/examples/i/yes-button.svg"/>](https://www.devexpress.com/support/examples/survey.xml?utm_source=github&utm_campaign=wpf-editors-validate-user-input-indicate-errors-idataerrorinfo&~~~was_helpful=yes) [<img src="https://www.devexpress.com/support/examples/i/no-button.svg"/>](https://www.devexpress.com/support/examples/survey.xml?utm_source=github&utm_campaign=wpf-editors-validate-user-input-indicate-errors-idataerrorinfo&~~~was_helpful=no) |
26 | | - |
| 36 | +## Does this example address your development requirements/objectives? |
| 37 | + |
| 38 | +[<img src="https://www.devexpress.com/support/examples/i/yes-button.svg"/>](https://www.devexpress.com/support/examples/survey.xml?utm_source=github&utm_campaign=wpf-editors-validate-user-input-indicate-errors-idataerrorinfo&~~~was_helpful=yes) [<img src="https://www.devexpress.com/support/examples/i/no-button.svg"/>](https://www.devexpress.com/support/examples/survey.xml?utm_source=github&utm_campaign=wpf-editors-validate-user-input-indicate-errors-idataerrorinfo&~~~was_helpful=no) |
| 39 | + |
27 | 40 | (you will be redirected to DevExpress.com to submit your response) |
28 | 41 | <!-- feedback end --> |
0 commit comments