DocumentList.SelectedDirectory Property

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Gets or sets the folder to display.

Namespace:  Microsoft.WindowsCE.Forms
Assembly:  Microsoft.WindowsCE.Forms (in Microsoft.WindowsCE.Forms.dll)

public string SelectedDirectory { get; set; }

Property Value

Type: System.String
The name of the displayed folder. The default is an empty string ("").

This property contains only the folder name without path information, such as the "Business" folder or "All Folders" folder, and has the following functionality:

  • You can only specify folders that are subfolders in the My Documents folder.

  • You cannot specify a path to access a subfolder. Any path information is interpreted as the name of one folder, and does not return an error.

  • If the specified folder does not exist or is not under the My Documents folder, DocumentList defaults to the My Documents folder.

  • Changing the value of this property raises the SelectedDirectoryChanged event.

  • The SelectedDirectoryChanged event causes this property to be updated with the current value.

The following code example sets the SelectedDirectory property. This code example is part of a larger example provided for the DocumentList class.


DocList.SelectedDirectory = "Personal";


Windows Mobile for Pocket PC

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Compact Framework

Supported in: 3.5, 2.0
Show: