Modifica

Condividi tramite


SaveEvent.FileName Property

Definition

Gets the file name to be used in the OnSaveRequest event.

public:
 property System::String ^ FileName { System::String ^ get(); };
public string FileName { get; }
member this.FileName : string
Public ReadOnly Property FileName As String

Property Value

Examples

In the following example, the FileName property of the SaveEventObject object is used in a notification to the user before a save operation:

public void OnSaveRequest(SaveEvent e)
{
 thisXDocument.UI.Alert("You are about to save this file: " + e.<span class="label">FileName</span>);
}

Remarks

If the IsSaveAs property of the SaveEvent object is true, and a save operation has not yet occurred, the FileName property returns an empty string. If the IsSaveAs property is true and a save operation has already occurred, the value returned by the FileName property is the file name under which the form was saved. If the SaveEvent object represents a save operation (that is, the IsSaveAs property is false), the FileName property returns the same value as the URI property of the XDocument object.

Applies to