Share via


_XDocument3.IsDirty property

Gets a value that indicates whether the data in a Microsoft Office InfoPath form has been modified since it was last saved.

Namespace:  Microsoft.Office.Interop.InfoPath
Assembly:  Microsoft.Office.Interop.InfoPath (in Microsoft.Office.Interop.InfoPath.dll)

Syntax

'Declaration
ReadOnly Property IsDirty As Boolean
    Get
'Usage
Dim instance As _XDocument3
Dim value As Boolean

value = instance.IsDirty
bool IsDirty { get; }

Property value

Type: System.Boolean
true if the data in the form has been modified since it was last saved; otherwise false.

Implements

_XDocument2.IsDirty

Remarks

If the IsDirty property is true, data in the form's underlying XML document has been changed since it was last saved. If false, no changes have occurred.

Note

Changes that occur during an OnLoad event will not result in the IsDirty property being set to true.

Examples

In the following example, the IsDirty property of the XDocument object is used to determine whether data in the form has been changed:

if (thisXDocument.IsDirty)
{
 thisXDocument.UI.Alert("Data has been changed.");
}
else
{
 thisXDocument.UI.Alert("Data has not been changed.");
}

See also

Reference

_XDocument3 interface

_XDocument3 members

IsDirty overload

Microsoft.Office.Interop.InfoPath namespace