XmlFormCancelEventArgs Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides data for the custom message that is displayed when canceling events raised by the form and its underlying XML document.
public ref class XmlFormCancelEventArgs abstract : System::ComponentModel::CancelEventArgs
public abstract class XmlFormCancelEventArgs : System.ComponentModel.CancelEventArgs
type XmlFormCancelEventArgs = class
inherit CancelEventArgs
Public MustInherit Class XmlFormCancelEventArgs
Inherits CancelEventArgs
- Inheritance
-
XmlFormCancelEventArgs
- Derived
Remarks
The XmlFormCancelEvent object provides the Message and MessageDetails properties to specify or retrieve a custom message when canceling the Changing, Validating, Save, Merge, Submit, VersionUpgrade, and Loading events.
By default, the Message and MessageDetails properties have a a null reference (Nothing in Visual Basic) value.
- When both values are a null reference (Nothing in Visual Basic), the default error message is displayed when an event is cancelled.
- When both values are non-null, then the values specified for the Message and MessageDetails properties are displayed in the error message dialog box.
- If both properties are set to the empty string, then no text is displayed in the error message dialog box.
- The Message property can be a null reference (Nothing in Visual Basic) and the MessageDetails property can be non-null, and vice-versa. If either one of the values is non-null, then InfoPath will display the specified value. For example, if Message is a null reference (Nothing in Visual Basic), but MessageDetails has a value specified, InfoPath displays an error message dialog box with only the details section and no top-level text.
- In the InfoPath design mode user interface, you can specify a custom message that is displayed when submitting succeeds or fails by using the Form Submit Options command on the Tools menu. If either the Message or MessageDetails properties are set in code, these values override any text specified in the InfoPath user interface.
Constructors
XmlFormCancelEventArgs() |
Properties
Message |
Gets or sets the short message that is displayed when the event is cancelled. |
MessageDetails |
Gets or sets the detailed message when the event is cancelled. |