FileDialog::FileOk Event

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Occurs when the user selects a file name by either clicking the Open button of the OpenFileDialog or the Save button of the SaveFileDialog.

Namespace:   Microsoft.Win32
Assembly:  PresentationFramework (in PresentationFramework.dll)

public:
event CancelEventHandler^ FileOk {
	void add(CancelEventHandler^ value);
	void remove(CancelEventHandler^ value);
}

FileOk is raised after the user selects a file name, but before the dialog closes, which allows you to process the selection. If required, the user's selection can be cancelled by setting the Cancel property of the CancelEventArgs argument to true.

.NET Framework
Available since 3.0
Return to top
Show: