ErrorProvider

The ErrorProvider component provides indication that a control on a form has an associated error. An error description and an associated icon can be configured for the component to 'flash' in a configurable BlinkStyle and BlinkRate. A ToolTip can also be configured to display the error description when a user hovers over the icon.

An error provider can be preferable to a message dialog in some situations, because once a dialog is dismissed, the message is no longer visible. The ErrorProvider component displays an icon next to the control that is in error for as long as the error has not been addressed. The error message can be displayed on hover.

Properties

The key properties for the ErrorProvider component include:

  • Icon. Determines the icon that is displayed on presentation of the error.

  • BlinkRate. The rate (in milliseconds) at which the error icon for the ErrorProvider blinks.

  • BlinkStyle. The blink style for the error. The default is BlinkIfDifferentError. If you set the BlinkRate to 0, the BlinkStyle will be forced to NeverBlink.

In the control with which you want to associate the ErrorProvider, the following property can be set:

  • Error on [errorProvider]. Specifies the error message that is displayed on hover of the error icon.

Events

Events can be configured for the ErrorProvider to specify the behaviour of the control. For example, an action can be configured to occur when the RightToLeft property for the control changes using the RightToLeftChanged event property.

For information on configuring events and other components of the design using a script, see: Working with Scripts.

Adding an ErrorProvider

When you drag an ErrorProvider component from the Toolbox to a form in the Flow Designer, it will appear as an entry in the design space. You can select the control and configure it using the Properties pane.

When you have configured the ErrorProvider, you can associate it with a control on the form. To do this, select the control and enter the error message in the Error on [ErrorProvider] property. For example, for the MaskedTextBox control below:

When the masked text is not properly formatted, the error message will appear as follows:

More information on the ErrorProvider component can be viewed at the link to Microsoft® Documentation.