ShellTreeListBox Class
Represents a single-column tree view control that enumerates shell objects.
public class ShellTreeListBox : TreeListBox, DUCE.IResource, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IHaveResources, IQueryAmbient, IAddChild, IGeneratorHost, IShellTreeControl
- Inheritance:
- Object DispatcherObject DependencyObject 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.
protected override sealed AssemblyInfo AssemblyInfo { get; }
Property Value
- ActiproSoftware.Products.AssemblyInfo:
The ActiproSoftware.Products.AssemblyInfo to use.
CanExpandAll
Gets whether any expand all operations can occur.
protected override bool CanExpandAll { get; }
Property Value
- Boolean:
true
if any expand all operations can occur; otherwise,false
. The default value isfalse
.
CanIncludeFiles
Gets or sets whether files should be displayed.
public bool CanIncludeFiles { get; set; }
Property Value
- Boolean:
true
if files should be displayed; otherwise,false
. The default value isfalse
.
CanIncludeLinks
Gets or sets whether links should be displayed.
public bool CanIncludeLinks { get; set; }
Property Value
- Boolean:
true
if links should be displayed; otherwise,false
. The default value isfalse
.
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
- Boolean:
true
if the default context menu is enabled for shell objects; otherwisefalse
. The default value istrue
.
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
- Boolean:
true
if a "New / Folder" menu item can be injected into the context menu for file system folders; otherwise,false
. The default value isfalse
.
IsRenamingEnabled
Gets or sets whether objects can be renamed.
public bool IsRenamingEnabled { get; set; }
Property Value
- Boolean:
true
if objects can be renamed; otherwise,false
. The default value istrue
.
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 |
OnItemMenuRequested(TreeListBoxItemMenuEventArgs)
Occurs when an item requests a context menu.
protected override void OnItemMenuRequested(TreeListBoxItemMenuEventArgs e)
Parameter | Type | Description |
---|---|---|
e | TreeListBoxItemMenuEventArgs | The |
OnSelectionChanged(SelectionChangedEventArgs)
Occurs when the selection is changed.
protected override void OnSelectionChanged(SelectionChangedEventArgs e)
Parameter | Type | Description |
---|---|---|
e | SelectionChangedEventArgs | The |
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
- Boolean:
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
- TreeListBox.AutoExpandItemsOnFilterProperty
- TreeListBox.CanDragItemsProperty
- TreeListBox.DataFilterProperty
- TreeListBox.EmptyContentProperty
- TreeListBox.EmptyContentTemplateProperty
- TreeListBox.IndentIncrementProperty
- TreeListBox.IsDataVirtualizationEnabledProperty
- TreeListBox.IsEmptyProperty
- TreeListBox.IsFilterActiveProperty
- TreeListBox.IsRootItemVisibleProperty
- TreeListBox.ItemAdapterProperty
- TreeListBox.MultiDragKindProperty
- TreeListBox.PathSeparatorProperty
- TreeListBox.RootItemProperty
- TreeListBox.TopLevelIndentProperty
- TreeListBox.ItemDataFormat
- TreeListBox.IsRootItemVisibleChangedEvent
- TreeListBox.ItemCollapsedEvent
- TreeListBox.ItemCollapsingEvent
- TreeListBox.ItemDefaultActionExecutingEvent
- TreeListBox.ItemExpandedEvent
- TreeListBox.ItemExpandingEvent
- TreeListBox.ItemMenuRequestedEvent
- TreeListBox.ItemSelectingEvent
- TreeListBox.RootItemChangedEvent
- TreeListBox.SelectionChangedEvent
- TreeListBox.MultiSelectionKindProperty
- TreeListBox.SelectionModeProperty
- TreeListBox.SelectedItemProperty
- TreeListBox.HasTreeLinesProperty
- TreeListBox.IsSelectionActiveProperty
- TreeListBox.ArrangeOverride(Size)
- TreeListBox.BringItemIntoView(Object)
- TreeListBox.BringItemIntoViewByFullPath(String)
- TreeListBox.ClearContainerForItemOverride(DependencyObject, Object)
- TreeListBox.CollapseAll()
- TreeListBox.ExpandAll()
- TreeListBox.GetContainerForItemOverride()
- TreeListBox.GetFullPath(Object)
- TreeListBox.GetItemByFullPath(String)
- TreeListBox.GetItemNavigator(Object)
- TreeListBox.InvalidateChildren(Object)
- TreeListBox.IsItemItsOwnContainerOverride(Object)
- TreeListBox.OnCreateAutomationPeer()
- TreeListBox.OnDragEnter(DragEventArgs)
- TreeListBox.OnDragLeave(DragEventArgs)
- TreeListBox.OnDragOver(DragEventArgs)
- TreeListBox.OnDrop(DragEventArgs)
- TreeListBox.OnKeyDown(KeyEventArgs)
- TreeListBox.OnScrollViewerScrollChanged(ScrollChangedEventArgs)
- TreeListBox.PrepareContainerForItemOverride(DependencyObject, Object)
- TreeListBox.ProcessKeyDown(KeyEventArgs)
- TreeListBox.OnItemCollapsed(TreeListBoxItemExpansionEventArgs)
- TreeListBox.OnItemCollapsing(TreeListBoxItemExpansionEventArgs)
- TreeListBox.OnItemDefaultActionExecuting(TreeListBoxItemEventArgs)
- TreeListBox.OnItemExpanded(TreeListBoxItemExpansionEventArgs)
- TreeListBox.OnItemExpanding(TreeListBoxItemExpansionEventArgs)
- TreeListBox.OnItemSelecting(TreeListBoxItemEventArgs)
- TreeListBox.OnRootItemChanged(RoutedEventArgs)
- TreeListBox.FocusItem(Object)
- TreeListBox.FocusItemByFullPath(String)
- TreeListBox.CreateSelectionBatch()
- TreeListBox.GetIsSelectionActive(TreeListBox)
- TreeListBox.OnGotKeyboardFocus(KeyboardFocusChangedEventArgs)
- TreeListBox.OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs)
- TreeListBox.OnItemsSourceChanged(IEnumerable, IEnumerable)
- TreeListBox.AutoExpandItemsOnFilter
- TreeListBox.CanDragItems
- TreeListBox.DataFilter
- TreeListBox.EmptyContent
- TreeListBox.EmptyContentTemplate
- TreeListBox.IndentIncrement
- TreeListBox.IsDataVirtualizationEnabled
- TreeListBox.IsEmpty
- TreeListBox.IsFilterActive
- TreeListBox.IsKeyboardFocusWithinContent
- TreeListBox.IsRootItemVisible
- TreeListBox.ItemAdapter
- TreeListBox.MultiDragKind
- TreeListBox.PathSeparator
- TreeListBox.RootItem
- TreeListBox.TopLevelIndent
- TreeListBox.MultiSelectionKind
- TreeListBox.SelectionMode
- TreeListBox.SelectedItem
- TreeListBox.SelectedItems
- TreeListBox.HasTreeLines
- TreeListBox.IsRootItemVisibleChanged
- TreeListBox.ItemCollapsed
- TreeListBox.ItemCollapsing
- TreeListBox.ItemDefaultActionExecuting
- TreeListBox.ItemExpanded
- TreeListBox.ItemExpanding
- TreeListBox.ItemMenuRequested
- TreeListBox.ItemSelecting
- TreeListBox.RootItemChanged
- TreeListBox.SelectionChanged
- Object.ToString()
- Object.Equals(Object)
- Object.Equals(Object, Object)
- Object.ReferenceEquals(Object, Object)
- Object.GetHashCode()
- Object.GetType()
- Object.MemberwiseClone()