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 class.
public ShellListView()
Properties
AssemblyInfo
The UIAssemblyInfoBase to use.
[Browsable(false)]
protected override sealed UIAssemblyInfoBase AssemblyInfo { get; }
Property Value
CanExpandAll
Indicates whether any expand all operations can occur.
protected override bool CanExpandAll { get; }
Property Value
- bool:
trueif any expand all operations can occur; otherwise,false. The default value istrue.
CanIncludeFiles
Whether files should be displayed.
public bool CanIncludeFiles { get; set; }
Property Value
- bool:
trueif files should be displayed; otherwise,false. The default value istrue.
CanIncludeFolders
Whether folders should be displayed.
public bool CanIncludeFolders { get; set; }
Property Value
- bool:
trueif folders should be displayed; otherwise,false. The default value istrue.
CanIncludeLinks
Whether links should be displayed.
public bool CanIncludeLinks { get; set; }
Property Value
- bool:
trueif links should be displayed; otherwise,false. The default value istrue.
CanNavigateIntoChildFolders
Whether the default action for folders should be to navigate into the child folder.
public bool CanNavigateIntoChildFolders { get; set; }
Property Value
- bool:
trueif the default action for folders should be to navigate into the child folder; otherwise,false. The default value istrue.
CanResetSortOnRootShellFolderChange
Whether the list's sort should be reset when changing the RootShellFolder.
public bool CanResetSortOnRootShellFolderChange { get; set; }
Property Value
- bool:
trueif the list's sort should be reset when changing the RootShellFolder; otherwise,false. The default value istrue.
CanUseThumbnails
Whether thumbnail images can be used in place of icons when available.
public bool CanUseThumbnails { get; set; }
Property Value
- bool:
trueif 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
The DataTemplate to use for rendering column headers.
DefaultShellService
The default IShellService that should be used when RootShellFolderParsingName or RootSpecialFolderKind are set.
public IShellService? DefaultShellService { get; set; }
Property Value
- IShellService:
The default value is an instance of WindowsShellService.
Remarks
This property is not used if the RootShellFolder property is set directly.
DetailsLayoutModeItemTemplate
The DataTemplate to use as the ItemTemplate when the LayoutMode is Details.
ExtraLargeIconsLayoutModeItemTemplate
The DataTemplate to use as the ItemTemplate when the LayoutMode is ExtraLargeIcons.
public DataTemplate? ExtraLargeIconsLayoutModeItemTemplate { get; set; }
Property Value
IsDefaultItemContextMenuEnabled
Whether the default context menu is enabled for shell objects.
public bool IsDefaultItemContextMenuEnabled { get; set; }
Property Value
- bool:
trueif the default context menu is enabled for shell objects; otherwisefalse. The default value istrue.
IsRenamingEnabled
Whether objects can be renamed.
public bool IsRenamingEnabled { get; set; }
Property Value
- bool:
trueif objects can be renamed; otherwise,false. The default value istrue.
Remarks
The shell objects themselves must also support renaming via CanRename.
LargeIconsLayoutModeItemTemplate
The DataTemplate to use as the ItemTemplate when the LayoutMode is LargeIcons.
LayoutMode
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
The DataTemplate to use as the ItemTemplate when the LayoutMode is List.
MediumIconsLayoutModeItemTemplate
The DataTemplate to use as the ItemTemplate when the LayoutMode is MediumIcons.
RootShellFolder
The root IShellObject to display.
RootShellFolderParsingName
The root folder's full parsing name (commonly the same as the file system path), if known.
public string? RootShellFolderParsingName { get; set; }
Property Value
Remarks
Setting this property will update the RootShellFolder property.
RootSpecialFolderKind
The SpecialFolderKind that indicates the root special folder to display.
public SpecialFolderKind RootSpecialFolderKind { get; set; }
Property Value
Remarks
Setting this property will update the RootShellFolder property.
SmallIconsLayoutModeItemTemplate
The DataTemplate to use as the ItemTemplate when the LayoutMode is SmallIcons.
SortDirection
The ColumnSortDirection that indicates the current sort direction.
public ColumnSortDirection SortDirection { get; set; }
Property Value
- ColumnSortDirection:
The default value is Ascending.
See Also
SortShellPropertyKey
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 that is used to display the given item.
protected override DependencyObject GetContainerForItemOverride()
Returns
- DependencyObject:
The element that is used to display the given item.
NotifyDpiChanged()
Notifies that the DPI has changed.
[Obsolete("This method to manually notify of a DPI change was only necessary for .NET Framework targets prior to .NET 4.6.2 and is no longer necessary since DPI changes are now processed automatically.")]
public void NotifyDpiChanged()
Remarks
This method is only included for backwards compatibility and is no longer necessary.
OnApplyTemplate()
When overridden in a derived class, is 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 event data. |
Remarks
This method has no default implementation. Because an intermediate class in the inheritance might implement this method, we recommend that you call the base implementation in your implementation.
OnContextMenuOpening(ContextMenuEventArgs)
Invoked whenever an unhandled ContextMenuOpening routed event reaches this class in its route. Implement this method to add class handling for this event.
protected override void OnContextMenuOpening(ContextMenuEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | ContextMenuEventArgs | The RoutedEventArgs that contains the event data. |
OnDpiChanged(DpiScale, DpiScale)
Called when the DPI at which this View is rendered changes.
protected override void OnDpiChanged(DpiScale oldDpi, DpiScale newDpi)
| Parameter | Type | Description |
|---|---|---|
| oldDpi | DpiScale | The previous DPI scale setting. |
| newDpi | DpiScale | The new DPI scale setting. |
OnItemDefaultActionExecuting(TreeListBoxItemEventArgs)
Occurs before the default action is executed for an item.
protected override void OnItemDefaultActionExecuting(TreeListBoxItemEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | TreeListBoxItemEventArgs | The event data. |
Remarks
This method has no default implementation. Because an intermediate class in the inheritance might implement this method, we recommend that you call the base implementation in your implementation.
OnItemMenuRequested(TreeListBoxItemMenuEventArgs)
Occurs when an item requests a context menu.
protected override void OnItemMenuRequested(TreeListBoxItemMenuEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | TreeListBoxItemMenuEventArgs | The event data. |
Remarks
This method has no default implementation. Because an intermediate class in the inheritance might implement this method, we recommend that you call the base implementation in your implementation.
ProcessKeyDown(KeyEventArgs)
Processes a key down event.
protected override void ProcessKeyDown(KeyEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | KeyEventArgs | The event data. |
RefreshColumns()
Refreshes the list's columns by requerying the CreateProperties(IList<IShellObject>, ShellPropertyRequestKind) method for properties.
public void RefreshColumns()
Fields
CanIncludeFilesProperty
Defines the CanIncludeFiles property.
public static readonly DependencyProperty CanIncludeFilesProperty
CanIncludeFoldersProperty
Defines the CanIncludeFolders property.
public static readonly DependencyProperty CanIncludeFoldersProperty
CanIncludeLinksProperty
Defines the CanIncludeLinks property.
public static readonly DependencyProperty CanIncludeLinksProperty
CanNavigateIntoChildFoldersProperty
Defines the CanNavigateIntoChildFolders property.
public static readonly DependencyProperty CanNavigateIntoChildFoldersProperty
CanResetSortOnRootShellFolderChangeProperty
Defines the CanResetSortOnRootShellFolderChange property.
public static readonly DependencyProperty CanResetSortOnRootShellFolderChangeProperty
CanUseThumbnailsProperty
Defines the CanUseThumbnails property.
public static readonly DependencyProperty CanUseThumbnailsProperty
ColumnHeaderTemplateProperty
Defines the ColumnHeaderTemplate property.
public static readonly DependencyProperty ColumnHeaderTemplateProperty
DefaultShellServiceProperty
Defines the DefaultShellService property.
public static readonly DependencyProperty DefaultShellServiceProperty
DetailsLayoutModeItemTemplateProperty
Defines the DetailsLayoutModeItemTemplate property.
public static readonly DependencyProperty DetailsLayoutModeItemTemplateProperty
ExtraLargeIconsLayoutModeItemTemplateProperty
Defines the ExtraLargeIconsLayoutModeItemTemplate property.
public static readonly DependencyProperty ExtraLargeIconsLayoutModeItemTemplateProperty
IsDefaultItemContextMenuEnabledProperty
Defines the IsDefaultItemContextMenuEnabled property.
public static readonly DependencyProperty IsDefaultItemContextMenuEnabledProperty
IsRenamingEnabledProperty
Defines the IsRenamingEnabled property.
public static readonly DependencyProperty IsRenamingEnabledProperty
LargeIconsLayoutModeItemTemplateProperty
Defines the LargeIconsLayoutModeItemTemplate property.
public static readonly DependencyProperty LargeIconsLayoutModeItemTemplateProperty
LayoutModeProperty
Defines the LayoutMode property.
public static readonly DependencyProperty LayoutModeProperty
ListLayoutModeItemTemplateProperty
Defines the ListLayoutModeItemTemplate property.
public static readonly DependencyProperty ListLayoutModeItemTemplateProperty
MediumIconsLayoutModeItemTemplateProperty
Defines the MediumIconsLayoutModeItemTemplate property.
public static readonly DependencyProperty MediumIconsLayoutModeItemTemplateProperty
RootShellFolderParsingNameProperty
Defines the RootShellFolderParsingName property.
public static readonly DependencyProperty RootShellFolderParsingNameProperty
RootShellFolderProperty
Defines the RootShellFolder property.
public static readonly DependencyProperty RootShellFolderProperty
RootSpecialFolderKindProperty
Defines the RootSpecialFolderKind property.
public static readonly DependencyProperty RootSpecialFolderKindProperty
SmallIconsLayoutModeItemTemplateProperty
Defines the SmallIconsLayoutModeItemTemplate property.
public static readonly DependencyProperty SmallIconsLayoutModeItemTemplateProperty
SortDirectionProperty
Defines the SortDirection property.
public static readonly DependencyProperty SortDirectionProperty
SortShellPropertyKeyProperty
Defines the SortShellPropertyKey property.
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.HasTreeLinesProperty
- TreeListBox.IndentIncrementProperty
- TreeListBox.IsDataVirtualizationEnabledProperty
- TreeListBox.IsEmptyProperty
- TreeListBox.IsFilterActiveProperty
- TreeListBox.IsRootItemVisibleProperty
- TreeListBox.IsSelectionActiveProperty
- 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.BringItemIntoView(object)
- TreeListBox.BringItemIntoViewByFullPath(string)
- TreeListBox.CollapseAll()
- TreeListBox.ExpandAll()
- TreeListBox.GetFullPath(object)
- TreeListBox.GetItemByFullPath(string)
- TreeListBox.GetItemNavigator(object)
- TreeListBox.InvalidateChildren(object)
- TreeListBox.GetIsSelectionActive(TreeListBox)
- TreeListBox.OnDragEnter(DragEventArgs)
- TreeListBox.OnDragLeave(DragEventArgs)
- TreeListBox.OnDragOver(DragEventArgs)
- TreeListBox.OnDrop(DragEventArgs)
- TreeListBox.OnGotKeyboardFocus(KeyboardFocusChangedEventArgs)
- TreeListBox.OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs)
- TreeListBox.OnItemsSourceChanged(IEnumerable, IEnumerable)
- 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.AutoExpandItemsOnFilter
- TreeListBox.CanDragItems
- TreeListBox.DataFilter
- TreeListBox.EmptyContent
- TreeListBox.EmptyContentTemplate
- TreeListBox.HasTreeLines
- 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.FilterApplied
- TreeListBox.IsRootItemVisibleChanged
- TreeListBox.ItemCollapsed
- TreeListBox.ItemCollapsing
- TreeListBox.ItemDefaultActionExecuting
- TreeListBox.ItemExpanded
- TreeListBox.ItemExpanding
- TreeListBox.ItemMenuRequested
- TreeListBox.ItemSelecting
- TreeListBox.RootItemChanged
- TreeListBox.SelectionChanged