New to Telerik UI for WPF? Download free 30-day trial

Open File Dialog

RadCloudUpload allows you to open a custom dialog to browse the files for upload. To do this set the CreateOpenFileDialog property. It is of type Func<Microsoft.Win32.OpenFileDialog> and can be used to provide a function that returns an OpeFileDialog instance. This is useful to customize the dialog settings. For example, to restrict users to upload certain type of files.

Example 1: Defining the cloud upload control

<telerik:RadCloudUpload x:Name="RadCloudUpload" /> 

Example 2: Setting CreateOpenFileDialog. The function returns a dialog with a custom filter that allows only text files.

this.RadCloudUpload.CreateOpenFileDialog = () => 
    OpenFileDialog ofd = new OpenFileDialog(); 
    ofd.Filter = "txt files (.txt)|.txt|All files (.)|."; 
    return ofd; 

See Also

In this article