Share via


DocumentList.SelectedDirectory Property

Gets or sets the folder to display.

Namespace: Microsoft.WindowsCE.Forms
Assembly: Microsoft.WindowsCE.Forms (in microsoft.windowsce.forms.dll)

Syntax

'Declaration
Public Property SelectedDirectory As String
'Usage
Dim instance As DocumentList
Dim value As String

value = instance.SelectedDirectory

instance.SelectedDirectory = value
public string SelectedDirectory { get; set; }
public:
property String^ SelectedDirectory {
    String^ get ();
    void set (String^ value);
}
/** @property */
public String get_SelectedDirectory ()

/** @property */
public void set_SelectedDirectory (String value)
public function get SelectedDirectory () : String

public function set SelectedDirectory (value : String)
Not applicable.

Property Value

The name of the displayed folder. The default is an empty string ("").

Remarks

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.

Example

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

.SelectedDirectory = "Business"
DocList.SelectedDirectory = "Personal";

Platforms

Windows Mobile for Pocket PC

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

Version Information

.NET Compact Framework

Supported in: 2.0

See Also

Reference

DocumentList Class
DocumentList Members
Microsoft.WindowsCE.Forms Namespace