Share via


RootUri Property (SelectionEventArgs)

Topic Last Modified: 2006-11-30

The root Uniform Resource Identifier (URI) of the selected folder. The RootUri property applies to the SelectionEventArgs Class.

Syntax

Property RootUri As String
string RootUri

Remarks

This property is read-only.

Example

The following Visual Basic .NET example shows a Selection Event handler function that displays the root URI of the selected folder.

Private Sub OnSelection(ByVal o As Object, ByVal e As EventArgs) Handles treeView.Selection

     ' Declare the SelectionEventArgs object.
     Dim evtArgs As SelectionEventArgs

     ' Cast e to a SelectionEventArgs object.
     evtArgs = CType(e, SelectionEventArgs)

     Debug.WriteLine("Selected folder root uri: " + evtArgs.RootUri)

End Sub

The following C# example shows a Selection Event handler function that displays the root URI of the selected folder.

void OnSelection(object o, EventArgs e )
{
     // Cast e to a SelectionEventArgs object.
     SelectionEventArgs evtArgs = (SelectionEventArgs)e;

     Debug.WriteLine("Selected folder root uri: " + evtArgs.RootUri);
}