Click or drag to resize

ShellListView Class

Wrapper for the Winforms ShellListView. For easy use with WPF.
Inheritance Hierarchy

Namespace:  Jam.Shell.WPF.Controls.Winforms
Assembly:  ShellBrowser.Winforms (in ShellBrowser.Winforms.dll) Version: 6.3.1
Syntax
public class ShellListView : JamWindowsFormsHost

The ShellListView type exposes the following members.

Constructors
  NameDescription
Public methodShellListView
Default constructor.
Top
Properties
  NameDescription
Public propertyAllowDrag
Use this property to turn on or off drag support with the Windows Explorer.
Public propertyAutomaticRefresh
Enables the automatic refreshes of the control, e.g. when a file is added or deleted in the current directory.
Public propertyAutoScrollDelay
The delay in milliseconds after that the control scrolls automatically during a drag and drop operation. A value of 0 disables the auto scroll feature.
Public propertyAutoSizeColumn
Adjust the size of the given column so that it fills the remaining horizontal space.
Public propertyBackgroundContextMenu
Gets or sets the ContextMenu that is displayed if no item of the listview is under the cursor if the user clicks the right mouse button.
Public propertyCheckBoxes
Use this property to turn on or off the checkboxes for file and folder selection. The checkboxes will only work, if a ShellControlConnector has been assigned to the ShellControlConnector property of this component. It will automatically synchronize the selection state of the items in multiple shell controls linked together with this ShellControlConnector.
Public propertyColumns
Gets the collection of all column headers that appear in the control.
Public propertyContextMenuRenderMode
Gets or sets the ToolStripRenderMode of the BackgroundContextMenu and the HeaderContextMenu.
Public propertyControl
Returns the Winforms control wrapped by this instance. This might be necessary to access other properties not exposed by this wrapper.
Public propertyCopyMode
Copy mode allows you to control the behaviour when files or folders get dropped.
Public propertyFileSystemOnly
If FileSystemOnly is set to True, objects and virtual folders which do not have a file system path, will not be displayed. Exceptions are 'My Computer', 'Libraries' and 'Network'
Public propertyFilter
You can use a single pattern, e.g. '*.doc' or concatenate several patterns using semicolons to separate them, e.g. '*.exe;*.com'.
Public propertyFolderIdList
FolderIdList contains a pointer to the ItemIdList of the current folder. This is a dependency property.
Public propertyFullRowSelect
Gets or sets a value indicating whether clicking an item selects all its subitems.
Public propertyHeaderContextMenu
Gets or sets the ContextMenuStrip that will be shown if the user rightclicks on the headerbar. Get: If it's null, we generate a list of available columns.
Public propertyHideSelection
Gets or sets a value indicating whether the selected item in the control remains highlighted when the control loses focus.
Public propertyItems
Returns a collection containing all ShellListItems in the ShellListView. Items are of type ShellListItem
Public propertyLabelEdit
Gets or sets a value indicating whether the label text of the list items can be edited.
Public propertyNoFillOnStartup
If set to true, the control will not fill automatically after it was created.
Public propertyPath
This property allows you to get or set the folder, which contents should be displayed. If you want to display a non file system folder, use the SpecialFolder property.
Public propertySelectedFiles
This property provides access to a list of all files including their extension, which are currently selected in the ShellListView. You can also use the SelectedFiles property to add files to the selection by using SelectedFiles.Add method.
Public propertySelectedIndices
Gets the selected indices.
Public propertySelectedItemIdLists
Gets the ItemIdLists that are currently selected.
Public propertySelectedItems
Gets the items that are selected in the control.
Public propertyShellContextMenu
Indicates whether the Windows ShellContextMenu should be shown or not.
Public propertyShellControlConnector
Connects this control to a ShellControlConnector component, which allows to synchronize several shell controls.
Public propertyShellDragDrop
Activates/deactivates the internal drag drop handling of the component.
Public propertyShowContextMenu
If set to true, the context menu will be shown if a right click event occurs.
Public propertyShowErrorMessages
If set to true, messages boxes will be shown to the user for errors that occured. If set to false, errors will be handled as well, but no message will be shown to the user.
Public propertyShowFiles
If set to true, files will be shown in the control. If set to false, files will not be visible in the control.
Public propertyShowFolders
The property ShowFolders allows you to include the folders in the ShellListView, similar to FrontPage 2000.
Public propertyShowHidden
Is set to 'true', hidden elements will be shown too.
Public propertyShowInfoToolTips
Whether to show the informational shell tooltips, the default is true
Public propertyShowNetHood
If set to 'false', the Network Neighbourhood will be hidden.
Public propertyShowOverlayIcons
If set to 'false', no overlay icons will be show, which improves the performance of the control.
Public propertyShowParentFolder
Use this property to show an additional folder with the caption '..' that allows the user to navigate to the parent folder of the current folder.
Public propertyShowRecycleBin
If set to true, the recycly bin will be visible. If set to false, the recycle bin will be hidden.
Public propertyShowShellContextMenuOnTop
If set to to 'true', the shell context menu will be shown on top of the provided popup menu. If set to 'false', the shell context menu will be shown below the provided popup menu. The value true is currently not supported. The menu items will be shown correctly, however their Click event cannot be triggered.
Public propertySortColumn
Public propertySorting
Gets or sets the sort order for items in the control.
Public propertySpecialFolder
Gets or sets the selected special folder.
Public propertyThumbnailSize
Use the ThumbnailSize property to get or set the size in pixels of the thumbnail images.
Public propertyUseSlowInfoTip
If true, the slow tooltip that contains additional information like the folder size is used. Setting this value to false increases the performance.
Public propertyUseSystemFont
Set this property to true if you want the component to utilize the default system font. It is also set to true if the UseSystemStyles property is set.
Public propertyUseSystemStyles
Use this property to turn on or off the usage of the system specific design, i.e. enable Vista visual styles of the explorer components.
Public propertyVersion
The current version of the ShellBrowser.
(Inherited from JamWindowsFormsHost.)
Public propertyViewState
Gets or sets how items are displayed in the ShellListView control. This is a dependency property.
Protected propertyWrappedControl
Gets or sets the control hosted by this instance.
(Inherited from JamWindowsFormsHost.)
Top
Methods
  NameDescription
Protected methodAfterInit
Must be called in "Initialized" eventhandler. Applies some common WPF settings to Windows.Forms.Control.
(Overrides JamWindowsFormsHostAfterInit.)
Protected methodApplyBackGround
Applies the backround.
(Inherited from JamWindowsFormsHost.)
Protected methodApplyFontSettings
Applies the font settings.
(Inherited from JamWindowsFormsHost.)
Protected methodApplyForeGround
If possible, sets the ForeColor property of the inner control to the Foreground property of the wrapper.
(Inherited from JamWindowsFormsHost.)
Public methodFullRefresh
Executes a full refresh of the contents of the control.
(Inherited from JamWindowsFormsHost.)
Public methodGoUp (Inherited from JamWindowsFormsHost.)
Protected methodOnPropertyChanged
Forces the translation of a mapped property.
(Overrides JamWindowsFormsHostOnPropertyChanged(DependencyPropertyChangedEventArgs).)
Public methodRefresh(RefreshLevel)
This method indicates that the control should perform a refresh of its contents.
(Inherited from JamWindowsFormsHost.)
Public methodRefresh(RefreshLevel, ItemIdList)
This method indicates that the control should perform a refresh of its contents.
(Inherited from JamWindowsFormsHost.)
Public methodSmartRefresh
Executes a smart refresh of the contents of the control.
(Inherited from JamWindowsFormsHost.)
Top
Events
  NameDescription
Public eventCode exampleAddItem
This event is fired whenever a new item is added to a ShellListView.
Public eventBeforeFullRefresh
Public eventBeforeInvokeCommandOnSelected Obsolete.
Assign this event to be able to control the behaviour of the control when the user double-clicks on an item to start the default action
Public eventBeforeShellColumnChanged
This event is fired when a column is selected/deselected from the context menu of the list header.
Public eventBeforeShellCommand
This event is fired when a shell command is to be executed, ie. via the context menu It is possible to permit the execution of the shell command by modifying the BeforeShellCommandEventArgs
Public eventBeforeShellDrop
This event is fired before a shell item is dropped on the list. For details see BeforeShellDrop.
Public eventCheckStateChanged
This event is fired when the state of a checkbox was changed by the user.
Public eventControlInitialized
Occurs when initialization of the component is completed.
Public eventCode exampleCreatedColumns
This event is fired after the columns were created.
Public eventItemChecked
Occurs when the checked state of an item was changed by the user.
Public eventItemShowToolTip
Public eventOperationPerformed
This event is fired after a JamBaseShellListView executed a shell operation like copying.
Public eventPathChanged
This event is fired when the users changes the path.
Public eventPopulated
This event is fired after a ShellListView was filled completely.
Public eventSelectionChanged
Occurs when the selection of the ShellListView changes.
Top
Fields
  NameDescription
Public fieldStatic memberFolderIdListProperty
The DependencyProperty for FolderIdList.
Public fieldStatic memberSelectionChangedEvent
Identifies the SelectionChanged routed event.
Public fieldStatic memberViewStateProperty
Identifies the ViewState dependency property.
Top
Remarks
The class wraps most of the configuration options available in the ShellListView. If there is no wrapper for a property or method, the hosted Windows Forms control, they are easily accessible using the Control property. Call e.g.
shellList.Control.CreateDir("", false)
to create a new subdirectory in the ShellListView.
See Also