Click or drag to resize

ExplorerBrowser Class

This component embeds the native windows ExplorerBrowser control into a .NET component.
Inheritance Hierarchy

Namespace:  Jam.Shell
Assembly:  ShellBrowser (in ShellBrowser.dll) Version: 7.1
Syntax
public class ExplorerBrowser : UserControl, 
	IMessageFilter, IShellControl, IShellControlConnectorTarget, ISupportInitialize, ISupportInitializeNotification

The ExplorerBrowser type exposes the following members.

Constructors
  NameDescription
Public methodExplorerBrowser
Initializes a new instance of the ExplorerBrowser class.
Top
Properties
  NameDescription
Public propertyAddressBar
The ShellAddressBar if available.
Public propertyAllColumns
Gets a list of all columns that are supported in the current view. These depend on what the control currently displays.
Public propertyAllowDrop
Gets or sets a value indicating whether the control can accept data that the user drags onto it.
(Overrides ControlAllowDrop.)
Public propertyAutoCheckSelect
Gets or sets a value indicating whether the control displays checkboxes that can be used to set the selection
Public propertyBackColor
This property is not implemented.
(Overrides ControlBackColor.)
Public propertyBackgroundImage
This property is not implemented.
(Overrides ControlBackgroundImage.)
Public propertyBackgroundImageLayout
This property is not implemented.
(Overrides ControlBackgroundImageLayout.)
Public propertyCheckedItems Obsolete.
Gets the checked items. The collection is non-recursive - if a folder is checked its content is not included.
Public propertyCheckMode
Gets or sets a value defining the current CheckMode.
Public propertyCode exampleColumns
Gets the ShellViewColumns the control currently displays.
Public propertyCode exampleContentFilter
A ShellItemFilter specifiying filter criteria for this instance.
Public propertyFocusedPane
Retrieves the focused pane.
Public propertyFolderIdList
Gets or sets the current location.
Public propertyFont
This property is not implemented.
(Overrides ControlFont.)
Public propertyForeColor
This property is not implemented.
(Overrides ControlForeColor.)
Public propertyGroupBy
Gets or sets the view grouping.
Public propertyGroupDirection
Gets or sets the group direction.
Public propertyIsInitialized
Gets a value indicating whether the component is initialized.
Public propertyItems
Contains the Items in the ExplorerBrowser. The collection is gathered upon first retrieval. It is updated internally when the items change, i.e. by moving to another folder. The items returned may be sorted differently than the view.
Public propertyPath
Gets or sets the filesystem path which contents should be displayed.
Public propertySelectedItemIdList
Gets or sets the selected item identifier list. A previous selection is removed.
Public propertySelectedItems
Contains the selected item collection in the ExplorerBrowser. The collection is gathered upon first retreival. It is updated internally when the items change, i.e. by moving to another folder. The items returned may be sorted differently than the view.
Public propertyShellControlConnector
Connects this control to a ShellControlConnector component, which allows to synchronize several shell controls.
Public propertyShowErrorMessages
If set to true the ShellList component will show a MessageBox if an error occured, otherwise the errors will only be logged to the Debug output.
Public propertyShowHeader
Gets or sets a value indicating if column headers should be shown.
Public propertySpecialFolder
Gets or sets the special folder to be displayed.
Public propertyThumbnailSize
Gets or sets the size of the icons that is applied when View is set to Thumbnail.
Public propertyVersion
The current version of the ShellBrowser.
Public propertyView
Allows to set the different view modes of the ExplorerBrowser control.
Public propertyViewFolderFlags
Get or set the FolderFlags that specify how the ListView displays its content. The flags can be or'ed together, ie. "FolderFlags.NoColumnHeader | FolderFlags.AbbreviatedNames" in the designer this is specified by a comma-separation.
Public propertyCode exampleVisiblePanes
Gets or sets the panes that are/should be visible.
Top
Methods
  NameDescription
Public methodBeginInit
Signals the object that initialization is starting.
Public methodBeginUpdate
Prevent that a FullRefresh is called until EndUpdate is called. Every call of BeginUpdate() increments an UpdateCounter variable.
Public methodCanNavigate
Called when browsing to a new folder.
Public methodCheckItem Obsolete.
Checks the item at the position passed by index.
Public methodDeselectAll
Deselect all items in the listview.
Protected methodDispose
Disposes the instance.
(Overrides ContainerControlDispose(Boolean).)
Public methodEndInit
Signals the object that initialization is complete.
Public methodEndUpdate
End the updating mode.
Public methodEnsureVisible
Scrolls to the item at the specified index.
Public methodFolderChanged
Changes the displayed folder in all connected controls.
Public methodFullRefresh
Reloads the component.
Public methodGoUp
Move in all connected controls from the current to the parent folder.
Public methodIndexOf(ItemIdList)
Searches for the index of the ItemIdList within the listview. This function has O(n) complexity, since it iterates through all items within the list.
Public methodIndexOf(String)
Searches for the index of the given path within the shell-list. This function has O(n) complexity, since it iterates through all items within the list
Public methodInvokeCommand
Executes a context menu command for listed folder or selected items depending on focus.
Public methodInvokeCommandOnFolder
Use InvokeCommandOnFolder to execute a command of the context menu for the listed folder.
Public methodInvokeCommandOnSelected
Invokes a ShellCommand on the selected item(s) of the ListView.
Public methodIsColumnAvailable
Determines whether the SHCOLUMNID passed is supported by the current view, no matter if it is currently displayed or not.
Public methodIsUpdating
Query if this object is updating.
Protected methodOnBeforeFullRefresh
Issues the BeforeFullRefresh event.
Protected methodOnCreateControl
Creates the internal ComObject and initializes it
(Overrides UserControlOnCreateControl.)
Protected methodOnFocusChanged
Raises the focus changed event.
Protected methodOnHandleDestroyed
Cleans up the explorer browser events+object when the window is being taken down.
(Overrides ControlOnHandleDestroyed(EventArgs).)
Protected methodOnKeyUp
Raises the System.Windows.Forms.KeyUp event.
(Overrides ControlOnKeyUp(KeyEventArgs).)
Protected methodOnPathChanged
Issues the PathChanged event.
Protected methodOnResize
Resizes the component to the new ClientArea.
(Overrides UserControlOnResize(EventArgs).)
Public methodPreFilterMessage
Passes messages to the native Explorer Browser and/or raises matching events.
Protected methodProcessTabKey
Process the tab key described by forward.
(Overrides ContainerControlProcessTabKey(Boolean).)
Public methodRefresh(RefreshLevel)
This method indicates that the control should perform a refresh of its contents.
Public methodRefresh(RefreshLevel, ItemIdList)
This method indicates that the control should perform a refresh of its contents.
Public methodSelectedFileChange
Called when the selected file was changed in a connected control. Not handled by this control
Public methodSelectItem
Selects the item at the position passed by index.
Public methodSmartRefresh
Refreshes the view. Contrary to FullRefresh, that reloads the whole control, only the view is updated.
Public methodUngroup
Ungroups the items inside the current view.
Protected methodWndProc
Processes Windows messages.
(Overrides UserControlWndProc(Message).)
Top
Events
  NameDescription
Public eventAddItem
This event occurs if a ListItem is to be added to the list. If the "CanAdd" property of the event args is set to false in an event handler, the item will not be added to the listview.
Public eventBeforeFullRefresh
Public eventDefaultAction
This event occurs if the user triggers the default command e.g. double-click on an item.
Public eventFocusChanged
Occurs, when the focus inside the ExplorerBrowser changes. Use FocusedPane to find out where the focus is.
Public eventInitialized
Occurs when initialization of the component is completed.
Public eventNavigationComplete
Occurs when navigating to a folder has been completed successfully.
Public eventNavigationFailed
Occurs when navigating to a folder has failed.
Public eventCode exampleNavigationPending
Occurs before navigating to a folder. The operation can be cancelled using Cancel
Public eventPathChanged
This event occurs if the path changed that the control displays.
Public eventSelectionChanged
This event occurs, if a selection changed in the listview
Public eventViewChanged
This event happens on view changes of the control.
Top
Extension Methods
  NameDescription
Public Extension MethodHandleNeeded
A Control extension method that ensures that the handle for a control is created.
(Defined by ExtensionMethods.)
Public Extension MethodScaledPixels
An extension method for controls: It scales the passed pixels according to the current dpi the control is displayed with.
(Defined by ExtensionMethods.)
Public Extension MethodScaleFont
A Control extension method that scales font according to the passed factor.
(Defined by ExtensionMethods.)
Top
Remarks

This control displays the contents of a folder in a ListView like control. It is a true instance of the ExplorerBrowser (on Windows Vista and later) that is used by the Windows Explorer and therefore looks and behaves exactly like the Windows Explorer on the system it is running on.

There are some panes that can be shown or hidden by using the VisiblePanes property. The used view style can be changed using the View property. If Details is used columns are displayed. They can be edited by using Columns property.

See Also