ShellListView Class
Represents a list view control that enumerates shell objects.
public class ShellListView : TreeListView
- Inheritance:
- object Visual UIElement FrameworkElement Control ItemsControl TreeListBox TreeListView object
Constructors
ShellListView()
Initializes an instance of the ShellListView class.
public ShellListView()
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 isfalse
.
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 istrue
.
CanIncludeFolders
Gets or sets whether folders should be displayed.
public bool CanIncludeFolders { get; set; }
Property Value
- bool:
true
if folders should be displayed; otherwise,false
. The default value istrue
.
CanIncludeLinks
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 istrue
.
CanNavigateIntoChildFolders
Gets or sets whether the default action for folders should be to navigate into the child folder.
public bool CanNavigateIntoChildFolders { get; set; }
Property Value
- bool:
true
if the default action for folders should be to navigate into the child folder; otherwise,false
. The default value istrue
.
CanResetSortOnRootShellFolderChange
Gets or sets whether the list's sort should be reset when changing the RootShellFolder.
public bool CanResetSortOnRootShellFolderChange { get; set; }
Property Value
- bool:
true
if the list's sort should be reset when changing the RootShellFolder; otherwise,false
. The default value istrue
.
CanUseThumbnails
Gets or sets whether thumbnail images can be used in place of icons when available.
public bool CanUseThumbnails { get; set; }
Property Value
- bool:
true
if thumbnail images can be used in place of icons when available; otherwise,false
. The default value istrue
.
Remarks
Thumbnails are only used in certain LayoutMode options that render larger images.
ColumnHeaderTemplate
Gets or sets the DataTemplate
to use for rendering column headers.
public DataTemplate ColumnHeaderTemplate { get; set; }
Property Value
- DataTemplate:
The
DataTemplate
to use for rendering column headers.
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.
DetailsLayoutModeItemTemplate
Gets or sets the DataTemplate to use as the ItemTemplate
when the LayoutMode is Details
.
public DataTemplate DetailsLayoutModeItemTemplate { get; set; }
Property Value
- DataTemplate:
The DataTemplate to use as the
ItemTemplate
when the LayoutMode isDetails
.
ExtraLargeIconsLayoutModeItemTemplate
Gets or sets the DataTemplate to use as the ItemTemplate
when the LayoutMode is ExtraLargeIcons
.
public DataTemplate ExtraLargeIconsLayoutModeItemTemplate { get; set; }
Property Value
- DataTemplate:
The DataTemplate to use as the
ItemTemplate
when the LayoutMode isExtraLargeIcons
.
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; otherwisefalse
. The default value istrue
.
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 istrue
.
Remarks
The shell objects themselves must also support renaming via CanRename.
LargeIconsLayoutModeItemTemplate
Gets or sets the DataTemplate to use as the ItemTemplate
when the LayoutMode is LargeIcons
.
public DataTemplate LargeIconsLayoutModeItemTemplate { get; set; }
Property Value
- DataTemplate:
The DataTemplate to use as the
ItemTemplate
when the LayoutMode isLargeIcons
.
LayoutMode
Gets or sets a ShellListViewLayoutMode value indicating the item layout mode.
public ShellListViewLayoutMode LayoutMode { get; set; }
Property Value
- ShellListViewLayoutMode:
A ShellListViewLayoutMode value indicating the item layout mode. The default value is
Details
.
ListLayoutModeItemTemplate
Gets or sets the DataTemplate to use as the ItemTemplate
when the LayoutMode is List
.
public DataTemplate ListLayoutModeItemTemplate { get; set; }
Property Value
- DataTemplate:
The DataTemplate to use as the
ItemTemplate
when the LayoutMode isList
.
MediumIconsLayoutModeItemTemplate
Gets or sets the DataTemplate to use as the ItemTemplate
when the LayoutMode is MediumIcons
.
public DataTemplate MediumIconsLayoutModeItemTemplate { get; set; }
Property Value
- DataTemplate:
The DataTemplate to use as the
ItemTemplate
when the LayoutMode isMediumIcons
.
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.
SmallIconsLayoutModeItemTemplate
Gets or sets the DataTemplate to use as the ItemTemplate
when the LayoutMode is SmallIcons
.
public DataTemplate SmallIconsLayoutModeItemTemplate { get; set; }
Property Value
- DataTemplate:
The DataTemplate to use as the
ItemTemplate
when the LayoutMode isSmallIcons
.
SortDirection
Gets or sets the ColumnSortDirection that indicates the current sort direction.
public ColumnSortDirection SortDirection { get; set; }
Property Value
- ColumnSortDirection:
The ColumnSortDirection that indicates the current sort direction. The default value is
Ascending
.
SortShellPropertyKey
Gets or sets the Key
of the IShellProperty whose column should be sorted.
public object SortShellPropertyKey { get; set; }
Property Value
- object:
The
Key
of the IShellProperty whose column should be sorted.
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.
GetContainerForItemOverride()
Creates or identifies the element used to display the specified item.
protected override DependencyObject GetContainerForItemOverride()
Returns
- DependencyObject:
The element that is used to display the given item.
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()
OnColumnHeaderTapped(TreeListViewColumnEventArgs)
Occurs when a column's header is tapped.
protected override void OnColumnHeaderTapped(TreeListViewColumnEventArgs e)
Parameter | Type | Description |
---|---|---|
e | TreeListViewColumnEventArgs | The |
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. |
OnItemDefaultActionExecuting(TreeListBoxItemEventArgs)
Occurs before the default action is executed for an item.
protected override void OnItemDefaultActionExecuting(TreeListBoxItemEventArgs e)
Parameter | Type | Description |
---|---|---|
e | TreeListBoxItemEventArgs | The |
OnItemMenuRequested(TreeListBoxItemMenuEventArgs)
Occurs when an item requests a context menu.
protected override void OnItemMenuRequested(TreeListBoxItemMenuEventArgs e)
Parameter | Type | Description |
---|---|---|
e | TreeListBoxItemMenuEventArgs | The |
ProcessKeyDown(KeyEventArgs)
Processes a key down event.
protected override void ProcessKeyDown(KeyEventArgs e)
Parameter | Type | Description |
---|---|---|
e | KeyEventArgs | The KeyEventArgs that contains the event data. |
RefreshColumns()
Refreshes the list's columns by requerying the CreateProperties(IList<IShellObject>, ShellPropertyRequestKind) method for properties.
public void RefreshColumns()
Fields
CanIncludeFilesProperty
Identifies the CanIncludeFiles dependency property. This field is read-only.
public static readonly DependencyProperty CanIncludeFilesProperty
CanIncludeFoldersProperty
Identifies the CanIncludeFolders dependency property. This field is read-only.
public static readonly DependencyProperty CanIncludeFoldersProperty
CanIncludeLinksProperty
Identifies the CanIncludeLinks dependency property. This field is read-only.
public static readonly DependencyProperty CanIncludeLinksProperty
CanNavigateIntoChildFoldersProperty
Identifies the CanNavigateIntoChildFolders dependency property. This field is read-only.
public static readonly DependencyProperty CanNavigateIntoChildFoldersProperty
CanResetSortOnRootShellFolderChangeProperty
Identifies the CanResetSortOnRootShellFolderChange dependency property. This field is read-only.
public static readonly DependencyProperty CanResetSortOnRootShellFolderChangeProperty
CanUseThumbnailsProperty
Identifies the CanUseThumbnails dependency property. This field is read-only.
public static readonly DependencyProperty CanUseThumbnailsProperty
ColumnHeaderTemplateProperty
Identifies the ColumnHeaderTemplate dependency property. This field is read-only.
public static readonly DependencyProperty ColumnHeaderTemplateProperty
DefaultShellServiceProperty
Identifies the DefaultShellService dependency property. This field is read-only.
public static readonly DependencyProperty DefaultShellServiceProperty
DetailsLayoutModeItemTemplateProperty
Identifies the DetailsLayoutModeItemTemplate dependency property. This field is read-only.
public static readonly DependencyProperty DetailsLayoutModeItemTemplateProperty
ExtraLargeIconsLayoutModeItemTemplateProperty
Identifies the ExtraLargeIconsLayoutModeItemTemplate dependency property. This field is read-only.
public static readonly DependencyProperty ExtraLargeIconsLayoutModeItemTemplateProperty
IsDefaultItemContextMenuEnabledProperty
Identifies the IsDefaultItemContextMenuEnabled dependency property. This field is read-only.
public static readonly DependencyProperty IsDefaultItemContextMenuEnabledProperty
IsRenamingEnabledProperty
Identifies the IsRenamingEnabled dependency property. This field is read-only.
public static readonly DependencyProperty IsRenamingEnabledProperty
LargeIconsLayoutModeItemTemplateProperty
Identifies the LargeIconsLayoutModeItemTemplate dependency property. This field is read-only.
public static readonly DependencyProperty LargeIconsLayoutModeItemTemplateProperty
LayoutModeProperty
Identifies the LayoutMode dependency property. This field is read-only.
public static readonly DependencyProperty LayoutModeProperty
ListLayoutModeItemTemplateProperty
Identifies the ListLayoutModeItemTemplate dependency property. This field is read-only.
public static readonly DependencyProperty ListLayoutModeItemTemplateProperty
MediumIconsLayoutModeItemTemplateProperty
Identifies the MediumIconsLayoutModeItemTemplate dependency property. This field is read-only.
public static readonly DependencyProperty MediumIconsLayoutModeItemTemplateProperty
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
SmallIconsLayoutModeItemTemplateProperty
Identifies the SmallIconsLayoutModeItemTemplate dependency property. This field is read-only.
public static readonly DependencyProperty SmallIconsLayoutModeItemTemplateProperty
SortDirectionProperty
Identifies the SortDirection dependency property. This field is read-only.
public static readonly DependencyProperty SortDirectionProperty
SortShellPropertyKeyProperty
Identifies the SortShellPropertyKey dependency property. This field is read-only.
public static readonly DependencyProperty SortShellPropertyKeyProperty
Inherited Members
- TreeListView.AreColumnHeadersVisibleProperty
- TreeListView.CanColumnsReorderProperty
- TreeListView.CanColumnsResizeProperty
- TreeListView.CanColumnsToggleVisibilityProperty
- TreeListView.ColumnHeaderHeightProperty
- TreeListView.ColumnHeaderVisibilityProperty
- TreeListView.ExpansionColumnIndexProperty
- TreeListView.FrozenColumnCountProperty
- TreeListView.FrozenColumnsWidthProperty
- TreeListView.ColumnHeaderMenuRequestedEvent
- TreeListView.ColumnHeaderTappedEvent
- TreeListView.ColumnIsVisibleChangedEvent
- TreeListView.ColumnReorderedEvent
- TreeListView.ColumnsResizedEvent
- TreeListView.IsDefaultColumnHeaderContextMenuEnabledProperty
- TreeListView.ArrangeOverride(Size)
- TreeListView.ClearContainerForItemOverride(DependencyObject, object)
- TreeListView.GetColumnHeaderVisibility(ScrollViewer)
- TreeListView.SetColumnHeaderVisibility(ScrollViewer, Visibility)
- TreeListView.GetFrozenColumnsWidth(ScrollViewer)
- TreeListView.SetFrozenColumnsWidth(ScrollViewer, double)
- TreeListView.IsItemItsOwnContainerOverride(object)
- TreeListView.MeasureOverride(Size)
- TreeListView.OnCreateAutomationPeer()
- TreeListView.OnScrollViewerScrollChanged(ScrollChangedEventArgs)
- TreeListView.PrepareContainerForItemOverride(DependencyObject, object)
- TreeListView.SizeAllColumnsToFit()
- TreeListView.OnColumnHeaderMenuRequested(TreeListViewColumnMenuEventArgs)
- TreeListView.OnColumnIsVisibleChanged(TreeListViewColumnEventArgs)
- TreeListView.OnColumnReordered(TreeListViewColumnEventArgs)
- TreeListView.OnColumnsResized(RoutedEventArgs)
- TreeListView.AreColumnHeadersVisible
- TreeListView.CanColumnsReorder
- TreeListView.CanColumnsResize
- TreeListView.CanColumnsToggleVisibility
- TreeListView.ColumnHeaderHeight
- TreeListView.Columns
- TreeListView.ExpansionColumnIndex
- TreeListView.FrozenColumnCount
- TreeListView.IsKeyboardFocusWithinContent
- TreeListView.SizeAllColumnsToFitCommand
- TreeListView.IsDefaultColumnHeaderContextMenuEnabled
- TreeListView.ColumnHeaderMenuRequested
- TreeListView.ColumnHeaderTapped
- TreeListView.ColumnIsVisibleChanged
- TreeListView.ColumnReordered
- TreeListView.ColumnsResized
- 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.FilterAppliedEvent
- TreeListBox.IsRootItemVisibleChangedEvent
- TreeListBox.ItemCollapsedEvent
- TreeListBox.ItemCollapsingEvent
- TreeListBox.ItemDefaultActionExecutingEvent
- TreeListBox.ItemExpandedEvent
- TreeListBox.ItemExpandingEvent
- TreeListBox.ItemMenuRequestedEvent
- TreeListBox.ItemSelectingEvent
- TreeListBox.RootItemChangedEvent
- TreeListBox.SelectionChangedEvent
- TreeListBox.CanSelectItemOnFocusProperty
- TreeListBox.MultiSelectionKindProperty
- TreeListBox.SelectionModeProperty
- TreeListBox.SelectedItemProperty
- TreeListBox.HasTreeLinesProperty
- TreeListBox.IsSelectionActiveProperty
- TreeListBox.BringItemIntoView(object)
- TreeListBox.BringItemIntoViewByFullPath(string)
- TreeListBox.CollapseAll()
- TreeListBox.ExpandAll()
- TreeListBox.GetFullPath(object)
- TreeListBox.GetItemByFullPath(string)
- TreeListBox.GetItemNavigator(object)
- TreeListBox.InvalidateChildren(object)
- TreeListBox.OnDragEnter(DragEventArgs)
- TreeListBox.OnDragLeave(DragEventArgs)
- TreeListBox.OnDragOver(DragEventArgs)
- TreeListBox.OnDrop(DragEventArgs)
- TreeListBox.OnKeyDown(KeyEventArgs)
- TreeListBox.OnFilterApplied(RoutedEventArgs)
- TreeListBox.OnIsRootItemVisibleChanged(RoutedEventArgs)
- TreeListBox.OnItemCollapsed(TreeListBoxItemExpansionEventArgs)
- TreeListBox.OnItemCollapsing(TreeListBoxItemExpansionEventArgs)
- TreeListBox.OnItemExpanded(TreeListBoxItemExpansionEventArgs)
- TreeListBox.OnItemExpanding(TreeListBoxItemExpansionEventArgs)
- TreeListBox.OnItemSelecting(TreeListBoxItemEventArgs)
- TreeListBox.OnRootItemChanged(RoutedEventArgs)
- TreeListBox.OnSelectionChanged(SelectionChangedEventArgs)
- TreeListBox.FocusItem(object)
- TreeListBox.FocusItemByFullPath(string)
- TreeListBox.CreateSelectionBatch()
- TreeListBox.SelectItemByFullPath(string)
- 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.IsRootItemVisible
- TreeListBox.ItemAdapter
- TreeListBox.MultiDragKind
- TreeListBox.PathSeparator
- TreeListBox.RootItem
- TreeListBox.TopLevelIndent
- TreeListBox.CanSelectItemOnFocus
- TreeListBox.MultiSelectionKind
- TreeListBox.SelectionMode
- TreeListBox.SelectedItem
- TreeListBox.SelectedItems
- TreeListBox.HasTreeLines
- TreeListBox.FilterApplied
- TreeListBox.IsRootItemVisibleChanged
- TreeListBox.ItemCollapsed
- TreeListBox.ItemCollapsing
- TreeListBox.ItemDefaultActionExecuting
- TreeListBox.ItemExpanded
- TreeListBox.ItemExpanding
- TreeListBox.ItemMenuRequested
- TreeListBox.ItemSelecting
- TreeListBox.RootItemChanged
- TreeListBox.SelectionChanged