Edit this page

Common

This articles shows the minor features shared between all file dialogs - RadOpenFileDialog, RadSaveFileDialog and RadOpenFolderDialog.

Setting Initial Directory

All the dialog controls expose a InitialDirectory property that determines the directory that will be opened when the dialog shows.

[C#] Example 1: Setting initial directory

RadSaveFileDialog saveFileDialog = new RadSaveFileDialog(); 
saveFileDialog.Owner = this;

saveFileDialog.InitialDirectory = @"C:\Temp\";

saveFileDialog.ShowDialog();    

Setting the Initial Layout of the Tiles

All the dialog controls expose a InitialSelectedLayout property that determines the initial layout of the list with the files

[C#] Example 2: Setting initial layout

RadSaveFileDialog saveFileDialog = new RadSaveFileDialog(); 
saveFileDialog.Owner = this;

saveFileDialog.InitialSelectedLayout = Telerik.Windows.Controls.FileDialogs.LayoutType.Tiles;

saveFileDialog.ShowDialog();    

Figure 1: RadOpenFileDialog in Tile view mode in the Office2016 theme

RadOpenFileDialog in Tile view mode

The layout is determined by the LayoutType enum that provides the following modes:

  • SmallIcons

  • MediumIcons

  • LargeIcons

  • ExtraLargeIcons

  • List

  • Tiles

  • Details

New Folder Button

Since R1 2018, you can add a new folder in all the dialog controls with the New Folder button. The created folder enters edit mode in all Layout View Modes.

Figure 2: New folder button and new folder in edit mode in the Office2016 theme

New Folder button

Edit Mode

In order to edit the selected file/folder, you can press the F2 key. Alternatively, you can click on the TextBlock which holds the file/folder name in all layouts except the Details layout where you can click on the cell holding the file/folder name. If you try to add a reserved character in a file/folder name, you will receive the warning illustrated in Figure 3:

Figure 3: Reserved character warning in the Office2016 theme

Reserved character warning

Trying to change the file extension prompts the message box shown in Figure 4:

Figure 4: Changing file extension message box in the Office2016 theme

Changing file extension message box

Using the ContextMenu

As of R1 2018 RadFileDialogs has a ContextMenu. The well-known ContextMenu used in Windows is used for this purpose. It is available for the RadListBox, RadTreeView and RadGridView components used in the Main Pane.

Figure 5: Showing the ContextMenu

Showing the ContextMenu

See Also

Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy