Skip to content

OpenFileDialog

Summary

Represents a common dialog box that allows a user to specify a filename for one or more files to open.

Signature

1
public class OpenFileDialog

Namespace

cAlgo.API

Methods

ResetInternal

Signature

1
private void ResetInternal()

Return Value

void

Reset

Summary

Resets all dialog properties to their default values.

Signature

1
public void Reset()

Return Value

void

ShowDialog (2)

ShowDialog (1 of 2)

Summary

Shows a file dialog, with the owner as the main Window

Signature

1
public FileDialogResult ShowDialog()

Return Value

FileDialogResult

ShowDialog (2 of 2)

Summary

Shows a file dialog, with the passed owner window.

Signature

1
public FileDialogResult ShowDialog(Window owner)

Parameters

Name Type Description
owner Window The window that owns the file dialog.

Return Value

FileDialogResult

SetProperty

Signature

1
private void SetProperty(T& field, T value)

Parameters

Name Type Description
field T&
value T

Return Value

void

GetProperty

Signature

1
private T GetProperty(T& field)

Parameters

Name Type Description
field T&

Return Value

T

Properties

Title

Summary

Gets or sets a string shown in the title bar of the dialog.If this property is null, a localized default from the operatingsystem itself will be used.

Signature

1
public string Title {get; set;}

Return Value

string

AddExtension

Summary

Gets or sets a value indicating whether a file dialog automatically adds an extension to a file name if the useromits an extension.

Signature

1
public bool AddExtension {get; set;}

Return Value

bool

DefaultExt

Summary

Gets or sets a value that specifies the default extension string to use to filter the list of files that aredisplayed.

Signature

1
public string DefaultExt {get; set;}

Return Value

string

Filter

Summary

Gets or sets the filter string that determines what types of files are displayed in file dialog.

Signature

1
public string Filter {get; set;}

Return Value

string

InitialDirectory

Summary

Gets or sets the initial directory that is displayed by a file dialog.

Signature

1
public string InitialDirectory {get; set;}

Return Value

string

ValidateNames

Summary

Gets or sets a value indicating whether the dialog accepts only valid file names.

Signature

1
public bool ValidateNames {get; set;}

Return Value

bool

Multiselect

Summary

Gets or sets an option indicating whether OpenFileDialog allows users to select multiple files.

Signature

1
public bool Multiselect {get; set;}

Return Value

bool

FileName

Summary

Gets a string containing the full path of the file selected in a file dialog.

Signature

1
public string FileName {get;}

Return Value

string

FileNames

Summary

Gets an array that contains one file name for each selected file.

Signature

1
public string[] FileNames {get;}

Return Value

string[]