In This Article

ShellTreeListBox Class

Represents a single-column tree view control that enumerates shell objects.

public class ShellTreeListBox : TreeListBox
Inheritance:
object Visual UIElement FrameworkElement Control ItemsControl TreeListBox object

Constructors

ShellTreeListBox()

Initializes an instance of the ShellTreeListBox class.

public ShellTreeListBox()

Properties

AssemblyInfo

Gets the ActiproSoftware.Products.AssemblyInfo to use.

[Browsable(false)]
protected override sealed AssemblyInfo AssemblyInfo { get; }

Property Value

AssemblyInfo:

The ActiproSoftware.Products.AssemblyInfo to use.

CanExpandAll

Gets whether any expand all operations can occur.

protected override bool CanExpandAll { get; }

Property Value

bool:

true if any expand all operations can occur; otherwise, false. The default value is false.

CanIncludeFiles

Gets or sets whether files should be displayed.

public bool CanIncludeFiles { get; set; }

Property Value

bool:

true if files should be displayed; otherwise, false. The default value is false.

Gets or sets whether links should be displayed.

public bool CanIncludeLinks { get; set; }

Property Value

bool:

true if links should be displayed; otherwise, false. The default value is false.

DefaultShellService

Gets or sets the default IShellService that should be used when RootShellFolderParsingName or RootSpecialFolderKind are set.

public IShellService DefaultShellService { get; set; }

Property Value

IShellService:

The default IShellService that should be used when RootShellFolderParsingName or RootSpecialFolderKind are set. The default value is an instance of WindowsShellService.

Remarks

This property is not used if the RootShellFolder property is set directly.

IsDefaultItemContextMenuEnabled

Gets or sets whether the default context menu is enabled for shell objects.

public bool IsDefaultItemContextMenuEnabled { get; set; }

Property Value

bool:

true if the default context menu is enabled for shell objects; otherwise false. The default value is true.

IsNewFolderContextMenuItemAllowed

Gets or sets whether a "New / Folder" menu item can be injected into the context menu for file system folders.

public bool IsNewFolderContextMenuItemAllowed { get; set; }

Property Value

bool:

true if a "New / Folder" menu item can be injected into the context menu for file system folders; otherwise, false. The default value is false.

IsRenamingEnabled

Gets or sets whether objects can be renamed.

public bool IsRenamingEnabled { get; set; }

Property Value

bool:

true if objects can be renamed; otherwise, false. The default value is true.

Remarks

The shell objects themselves must also support renaming via CanRename.

MoveUpCommand

Gets the ICommand used to move the SelectedShellObject up a level.

public ICommand MoveUpCommand { get; }

Property Value

ICommand:

The ICommand used to move the SelectedShellObject up a level.

RootShellFolder

Gets or sets the root IShellObject to display.

public IShellObject RootShellFolder { get; set; }

Property Value

IShellObject:

The root IShellObject to display.

RootShellFolderParsingName

Gets or sets the root folder's full parsing name (commonly the same as the file system path), if known.

public string RootShellFolderParsingName { get; set; }

Property Value

string:

The root folder's full parsing name, if known.

Remarks

Setting this property will update the RootShellFolder property.

RootSpecialFolderKind

Gets or sets the SpecialFolderKind that indicates the root special folder to display.

public SpecialFolderKind RootSpecialFolderKind { get; set; }

Property Value

SpecialFolderKind:

The SpecialFolderKind that indicates the root special folder to display.

Remarks

Setting this property will update the RootShellFolder property.

SelectedShellObject

Gets or sets the primary IShellObject that is selected in this control.

public IShellObject SelectedShellObject { get; set; }

Property Value

IShellObject:

The primary IShellObject that is selected in this control.

Remarks

This property is the same as taking the ShellObjectViewModel value of the SelectedItem property, and getting its Model property.

SelectedShellObjectEditingName

Gets or sets the SelectedShellObject's full user-friendly editing name (commonly the same as the file system path), if known.

public string SelectedShellObjectEditingName { get; set; }

Property Value

string:

The SelectedShellObject's full user-friendly editing name, if known.

Remarks

Setting this property will update the SelectedShellObject property.

Methods

DisposeShellInstances()

Disposes any unmanaged resources held by the RootShellFolder and DefaultShellService instances, and also sets both property values to null.

public void DisposeShellInstances()

Remarks

This method should be called when the control will no longer be used since it ensures any unmanaged resources held by the shell object hierarchy and shell service are disposed.

NotifyDpiChanged()

Notifies that the DPI has changed.

public void NotifyDpiChanged()

Remarks

The shell controls are currently based on .NET 4.0 and can't access the DpiChanged event. If you watch the DpiChanged event for your window, call this method to tell the shell controls the DPI changed so they can adjust their images as needed.

OnApplyTemplate()

Invoked whenever application code or internal processes call ApplyTemplate.

public override void OnApplyTemplate()

OnContextMenuOpening(ContextMenuEventArgs)

Occurs when a context menu is requested.

protected override void OnContextMenuOpening(ContextMenuEventArgs e)
Parameter Type Description
e ContextMenuEventArgs

The ContextMenuEventArgs that contains the event data.

OnIsRootItemVisibleChanged(RoutedEventArgs)

Occurs after the IsRootItemVisible property is changed.

protected override void OnIsRootItemVisibleChanged(RoutedEventArgs e)
Parameter Type Description
e RoutedEventArgs

The RoutedEventArgs that contains the event data.

OnItemMenuRequested(TreeListBoxItemMenuEventArgs)

Occurs when an item requests a context menu.

protected override void OnItemMenuRequested(TreeListBoxItemMenuEventArgs e)
Parameter Type Description
e TreeListBoxItemMenuEventArgs

The TreeListBoxItemMenuEventArgs that contains the event data.

OnSelectionChanged(SelectionChangedEventArgs)

Occurs when the selection is changed.

protected override void OnSelectionChanged(SelectionChangedEventArgs e)
Parameter Type Description
e SelectionChangedEventArgs

The SelectionChangedEventArgs that contains the event data.

SelectItemByFullPath(string)

Sets the SelectedItem to the node with the specified full path.

public override bool SelectItemByFullPath(string fullPath)
Parameter Type Description
fullPath string

The full path to the node whose container should be selected.

Returns

bool:

true if a node was selected; otherwise, false.

Remarks

This method requires that the ItemAdapter supplies a path for each item.

Fields

CanIncludeFilesProperty

Identifies the CanIncludeFiles dependency property. This field is read-only.

public static readonly DependencyProperty CanIncludeFilesProperty

CanIncludeLinksProperty

Identifies the CanIncludeLinks dependency property. This field is read-only.

public static readonly DependencyProperty CanIncludeLinksProperty

DefaultShellServiceProperty

Identifies the DefaultShellService dependency property. This field is read-only.

public static readonly DependencyProperty DefaultShellServiceProperty

IsDefaultItemContextMenuEnabledProperty

Identifies the IsDefaultItemContextMenuEnabled dependency property. This field is read-only.

public static readonly DependencyProperty IsDefaultItemContextMenuEnabledProperty

IsNewFolderContextMenuItemAllowedProperty

Identifies the IsNewFolderContextMenuItemAllowed dependency property. This field is read-only.

public static readonly DependencyProperty IsNewFolderContextMenuItemAllowedProperty

IsRenamingEnabledProperty

Identifies the IsRenamingEnabled dependency property. This field is read-only.

public static readonly DependencyProperty IsRenamingEnabledProperty

RootShellFolderParsingNameProperty

Identifies the RootShellFolderParsingName dependency property. This field is read-only.

public static readonly DependencyProperty RootShellFolderParsingNameProperty

RootShellFolderProperty

Identifies the RootShellFolder dependency property. This field is read-only.

public static readonly DependencyProperty RootShellFolderProperty

RootSpecialFolderKindProperty

Identifies the RootSpecialFolderKind dependency property. This field is read-only.

public static readonly DependencyProperty RootSpecialFolderKindProperty

SelectedShellObjectEditingNameProperty

Identifies the SelectedShellObjectEditingName dependency property. This field is read-only.

public static readonly DependencyProperty SelectedShellObjectEditingNameProperty

SelectedShellObjectProperty

Identifies the SelectedShellObject dependency property. This field is read-only.

public static readonly DependencyProperty SelectedShellObjectProperty

Inherited Members