Click or drag to resize

ShellFolder Class

Represents a Windows Shell Folder.
Inheritance Hierarchy

Namespace:  callback.ShellBoost.Core
Assembly:  callback.CBFSShell (in callback.CBFSShell.dll) Version: 22.0.0.0
Syntax
C#
public class ShellFolder : ShellItem

The ShellFolder type exposes the following members.

Constructors
  NameDescription
Protected methodShellFolder(ShellItemIdList)
Initializes a new instance of the ShellFolder class. This constructor is reserved for root shell folders.
Public methodShellFolder(ShellFolder, ShellItemId)
Initializes a new instance of the ShellFolder class.
Public methodShellFolder(ShellFolder, Guid)
Initializes a new instance of the ShellFolder class. This folders's PIDL will be constructed using the parent's root PIDL (instead of the parent pidl) plus the passed in uniqueGuid.
Public methodShellFolder(ShellFolder, DirectoryInfo)
Initializes a new instance of the ShellFolder class.
Public methodShellFolder(ShellFolder, ShellItemId, String)
Initializes a new instance of the ShellFolder class.
Top
Properties
  NameDescription
Public propertyAddNewMenuTemplatePath
Gets or sets the add 'New' menu template path.
Public propertyAssociationElementList
Gets the association element list of this item.
(Inherited from ShellItem.)
Public propertyAttributes
Gets or sets the System.SFGAOFlags property value.
(Inherited from ShellItem.)
Public propertyCanBeCached
Gets or sets a value indicating whether this instance can be cached.
(Inherited from ShellItem.)
Public propertyCanCopy
Gets or sets a value indicating whether this instance can be copied.
(Inherited from ShellItem.)
Public propertyCanDelete
Gets or sets a value indicating whether this instance can be deleted.
(Inherited from ShellItem.)
Public propertyCanLink
Gets or sets a value indicating whether this instance supports shortcut creation.
(Inherited from ShellItem.)
Public propertyCanMove
Gets or sets a value indicating whether this instance can be moved.
(Inherited from ShellItem.)
Public propertyCanPaste
Gets or sets a value indicating whether this instance supports clipboard paste operations. This property value is the aggregation of CanMove, CanCopy and IsDropTarget values.
(Inherited from ShellItem.)
Public propertyCanRename
Gets or sets a value indicating whether this instance can be renamed.
(Inherited from ShellItem.)
Public propertyColumns
Gets this folder's columns.
Public propertyDateAccessed
Gets or sets the System.DateAccessed property value.
(Inherited from ShellItem.)
Public propertyDateCreated
Gets or sets the System.DateCreated property value.
(Inherited from ShellItem.)
Public propertyDateModified
Gets or sets the System.DateModified property value.
(Inherited from ShellItem.)
Public propertyDisplayName
Gets or sets the System.ItemNameDisplay property value.
(Inherited from ShellItem.)
Public propertyFileName
Gets or sets the System.FileName property value.
(Inherited from ShellItem.)
Public propertyFileSystemPath
Gets or sets the physical file system path. A shell item does not need to have a corresponding file system path.
(Inherited from ShellItem.)
Public propertyFlags
Gets or sets the folder flags.
Public propertyFolderServer
Gets the folder server. Will be automatically set after the folder has been requested by the ShellFolderServer.
Public propertyFullDisplayName
Gets this item's display name, that is, including the parent's full display name. The full disply name is also what is used in the Windows Explorer's Address Bar.
(Overrides ShellItemFullDisplayName.)
Public propertyFullParsingName
Gets this item's parsing name, that is, including the parent's full parsing name.
(Overrides ShellItemFullParsingName.)
Public propertyHasPropertySheet
Gets or sets a value indicating whether this instance supports the property sheet.
(Inherited from ShellItem.)
Public propertyId
Gets this item identifier, which is this item's PIDL last segment.
(Inherited from ShellItem.)
Public propertyIdList
Gets this item's PIDL.
(Inherited from ShellItem.)
Public propertyInitializeOptions
Gets or sets the options used when the folder instance is initialized.
Public propertyIsDropTarget
Gets or sets a value indicating whether this instance is a drop target.
(Inherited from ShellItem.)
Public propertyIsFolder
Gets a value indicating whether this instance is a folder.
(Inherited from ShellItem.)
Public propertyIsHidden
Gets or sets a value indicating whether this instance is hidden.
(Inherited from ShellItem.)
Public propertyIsPlaceholder
Gets or sets a value indicating whether this instance is a placeholder.
(Inherited from ShellItem.)
Public propertyIsRoot
Gets a value indicating whether this instance is the root folder.
Public propertyItemType
Gets or sets the System.ItemType property value.
(Inherited from ShellItem.)
Public propertyKindList
Gets the Windows KIND list of this item.
(Inherited from ShellItem.)
Public propertyParent
Gets the parent folder.
(Inherited from ShellItem.)
Public propertyParsingName
Gets this item's parsing name.
(Inherited from ShellItem.)
Public propertyPerceived
Gets the System.PerceivedType property value.
(Inherited from ShellItem.)
Protected propertyPropertyStore
Gets the property store.
(Inherited from ShellItem.)
Public propertyReadPropertiesFromShell
Gets or sets a value indicating whether to read properties from shell, if FileSystemPath is not null, when they are not defined by this instance.
(Inherited from ShellItem.)
Public propertyRoot
Gets the root folder.
Public propertySize
Gets or sets the System.Size property value.
(Inherited from ShellItem.)
Public propertyThumbnail
Gets or sets this item's thumbnail.
(Inherited from ShellItem.)
Public propertyViewMode
Gets or sets the folder view mode.
Top
Methods
  NameDescription
Protected methodAddColumn(ShellFolderColumn)
Adds a column to this folder. If a column with the same property key was already present in the Columns collection, it will be replaced.
Protected methodAddColumn(PropertyDescription, SHCOLSTATE)
Adds a column, defined as a property, to this folder. If a column with the same property key was already present in the Columns collection, it will be replaced.
Protected methodAddColumn(PropertyKey, SHCOLSTATE)
Adds a column, defined as a property key, to this folder. If a column with the same property key was already present in the Columns collection, it will be replaced.
Protected methodAddColumn(String, SHCOLSTATE)
Adds a column, using a property key canonical name, to this folder. If a column with the same property key was already present in the Columns collection, it will be replaced.
Public methodAddNewMenuToMenu
Adds the New menu to a menu. It only works if the AddNewMenuTemplatePath value is not null nor empty. If this doesn't work, you can validate the path using Item.FromParsingName() method.
Public methodCommitProperties
Commits the property store.
(Inherited from ShellItem.)
Protected methodCreateFileSystemFolder(DirectoryInfo)
Creates a file system ShellItem instance for a folder under this folder. The info's full path must a direct child of this full path.
Protected methodCreateFileSystemFolder(ShellItemId, String)
Creates a file system ShellItem instance for a folder under this folder. The file system path must a direct child of this full path.
Protected methodCreateFileSystemItem(FileInfo)
Creates a file system ShellItem instance for a file under this folder. The info's full path must a direct child of this full path.
Protected methodCreateFileSystemItem(FileSystemInfo, ShellItemIdList)
Creates a file system ShellItem or ShellFolder instance for a file system entry. The file system entry path must be a child at any level of this full path.
Protected methodCreateFileSystemItem(ShellItemId, String)
Creates a file system ShellItem instance for a file under this folder The file system path must a direct child of this full path.
Protected methodCreateInformationBarMenu
Called when ShellBoost asks for an information bar menu. It expects items to be added as children of the menu instance. This implementation does not add any items to the menu instance.
Protected methodCreatePropertyStore
Creates the property store instance.
(Inherited from ShellItem.)
Protected methodEnumerateFileSystemInfos(DirectoryInfo)
Enumerates file system files and folders.
Protected methodEnumerateFileSystemInfos(DirectoryInfo, SHCONTF)
Enumerates file system files and folders.
Protected methodEnumerateFileSystemInfos(DirectoryInfo, String)
Enumerates file system files and folders.
Protected methodEnumerateFileSystemInfos(DirectoryInfo, SHCONTF, String)
Enumerates file system files and folders.
Protected methodEnumFileSystemItems
Enumerates File System Shell Items
Public methodEnumItems
Enumerates Shell Items. To maximize performance, the GetItem(ShellItemId) and GetItem(string) methods should be overriden.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Protected methodFreezePropertyStore
Freezes the property store. The property store can be frozen when a client asks for the property store as a whole. Overriding this method allows you to add properties to the frozen store.
(Inherited from ShellItem.)
Public methodGetContent
Gets the content of this item.
(Inherited from ShellItem.)
Protected methodGetDefaultDisplayColumn
Gets the index of the default display column. The default implementation returns -1 (unspecified).
Protected methodGetDefaultSortedColumn
Gets the index of the default sorted column. The default implementation returns -1 (unspecified).
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Protected methodGetInformationBar
Called when ShellBoost asks for an information bar. This implementation returns null. To be valid, an information bar must have a non empty guid and a non null nor empty message.
Public methodGetItem(ShellItemId)
Gets an item using its identifier. This method should be overriden for direct access as the current implementation uses the EnumItems method.
Public methodGetItem(ShellItemIdList)
Gets a Shell Item using its full PIDL from the root. This method is only supported if this instance is the root folder.
Protected methodGetItem(String)
Gets an item using its display name. This method should be overriden for direct access as the current implementation uses the EnumItems method.
Public methodGetItemT(ShellItemIdList)
Gets a typed Shell Item using its full PIDL from the root. This method is only supported if this instance is the root folder.
Public methodGetNullifiedPropertyValue(PropertyKey)
Gets a string property key value. The string will be trimmed and converted to null if its length is 0.
(Inherited from ShellItem.)
Public methodGetNullifiedPropertyValue(PropertyKey, String)
Gets a string property key value. The string will be trimmed and converted to the default value if its length is 0.
(Inherited from ShellItem.)
Public methodGetNullifiedPropertyValue(PropertyKey, IFormatProvider, String)
Gets a string property key value. The string will be trimmed and converted to the default value if its length is 0.
(Inherited from ShellItem.)
Public methodGetPaneState
Gets the Windows Explorer pane state.
Public methodGetPropertyIndex
Gets a property key index from this item's property store.
(Inherited from ShellItem.)
Public methodGetPropertyValue(PropertyKey, Object)
Gets a property key value.
(Inherited from ShellItem.)
Public methodGetPropertyValueT(PropertyKey, T)
Gets a typed property key value.
(Inherited from ShellItem.)
Public methodGetPropertyValueT(PropertyKey, FuncT)
Gets a typed property key value.
(Inherited from ShellItem.)
Protected methodGetRootFullDisplayName
Gets this item's display name, that is, including the parent's full display name.
Protected methodGetRootFullParsingName
Gets this item's display name, that is, including the parent's full display name.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetUri
Gets the URI corresponding to this item.
(Inherited from ShellItem.)
Protected methodHandleFileSystemSFGAO
Handles flags for File System Shell item.
(Inherited from ShellItem.)
Protected methodHandleInformationBarMenu
Called when an information bar menu item has been clicked. This implementation does nothing.
Protected methodInitialize
Initializes this instance.
(Overrides ShellItemInitialize.)
Protected methodInitializeFileSystem
Initializes the file system. Called when the FileSystemPath property is set.
(Overrides ShellItemInitializeFileSystem.)
Public methodIsPropertyWritable
Determines whether the specified property key value is writable, from this item's property store.
(Inherited from ShellItem.)
Protected methodMapContextMenuCommand
Maps a context menu command.
(Inherited from ShellItem.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodMergeContextMenu
Allows to add items to context menu.
(Inherited from ShellItem.)
Protected methodMergeContextMenuBottom
Allows to add items to the bottom of the context menu.
(Inherited from ShellItem.)
Protected methodMergeContextMenuTop
Allows to add items to the top of the context menu.
(Inherited from ShellItem.)
Protected methodMergeViewMenu
Merges a view menu.
(Inherited from ShellItem.)
Protected methodModifyContextMenuFlags
The Shell is calling this method to ask for context menu flags modification.
(Inherited from ShellItem.)
Public methodNotifyAttributes
Notifies the Windows Shell that this item attributes have changed.
(Inherited from ShellItem.)
Public methodNotifyCreate
Notifies the Windows Shell that this item has been created.
(Inherited from ShellItem.)
Public methodNotifyDelete
Notifies the Windows Shell that this item has been deleted.
(Inherited from ShellItem.)
Public methodNotifyRename(ShellItemId)
Notifies the Windows Shell that this item has been renamed.
(Inherited from ShellItem.)
Public methodNotifyRename(ShellItemIdList)
Notifies the Windows Shell that this item has been renamed.
(Inherited from ShellItem.)
Public methodNotifyUpdate
Notifies the Windows Shell that this item has been updated.
(Inherited from ShellItem.)
Protected methodOnAssociationElementListChanged
Called when the AssociationElementList changes.
(Inherited from ShellItem.)
Protected methodOnCommandExec
Called when a specified command is executed.
Protected methodOnCommandQueryStatus
Called when the status of one or more commands, generated by user interface events, is queried for.
Protected methodOnDragDropTarget
Called on drag and drop events.
(Inherited from ShellItem.)
Protected methodOnFileDialogEvent
Called when a notification is sent by a Dialog Box.
Protected methodOnGetDataObjectEvent
Called when a data object is requested for a shell item. This will not be called if OnGetOnDemandDataObjectEvent has set a valid OnDemandDataObject instance.
Protected methodOnGetDragDropParametersEvent
Called before a drag & drop operation is executed.
Protected methodOnGetDynamicColumnDetailsEvent
Called when the native proxy is asking for a dynamic column details.
Protected methodOnGetFileDialogPropertiesEvent
Called for determining what properties to gather for a future file dialog event.
Protected methodOnGetFolderSettingsEvent
Called when the native proxy is asking for the current view settings.
Protected methodOnGetNameMaxLengthEvent
Called for validating a Shell Item's name.
Protected methodOnGetNameValidCharactersEvent
Called for validating a Shell Item's name.
Protected methodOnGetOnDemandDataObjectEvent
Called when an on-demand data object is requested for a shell item. If this method is overriden and sets a valid OnDemandDataObject instance, OnGetDataObjectEvent will not be called.
Protected methodOnManageColumnsEvent
Called when the native proxy is asking for columns management.
Protected methodOnMenuInvoke
Called when a menu is invoked.
(Inherited from ShellItem.)
Protected methodOnMergingContextMenu
Called when a context menu is merging. Overriding this or one of ShellItems's MergeContextMenuXXX methods is similar but this is recommended to support future enhancements.
Protected methodOnOperate
Called when a Shell Operation occurs.
Protected methodOnRefresh
Called when the view is refreshed, for example when the end-user presses the F5 key from the list view.
Protected methodOnSelectAndEditItemEvent
Called when a shell item has been created with the New menu.
Protected methodOnSetFolderServer
Called when the folder server is set.
Public methodParseItem(String)
Gets an item using its relative path from this folder. The path is a list of display names separated by the '\' character. If path is null or empty, this folder is returned.
Public methodParseItem(String, ShellItemIdList)
Gets an item using its relative path from this folder. The path is a list of display names separated by the '\' character. If path is null or empty, this folder is returned.
Public methodRefreshShellViews
Refreshes all shell views.
(Inherited from ShellItem.)
Public methodRefreshShellViews(RefreshViewsOptions)
Refreshes the shell views with options.
(Inherited from ShellItem.)
Protected methodRemoveAllColumns
Removes all columns.
Protected methodRemoveColumn(PropertyKey)
Removes a column using the related property's key.
Protected methodRemoveColumn(ShellFolderColumn)
Removes a column.
Protected methodRemoveColumn(String)
Removes a column using the related property's canonical name.
Public methodResetShellThumbnail
Resets the Windows Explorer thumbnail cache.
(Inherited from ShellItem.)
Public methodSetPropertyValue(PropertyDescription, Object)
Sets a property value to this item's property store.
(Inherited from ShellItem.)
Public methodSetPropertyValue(PropertyKey, Object)
Sets a property key value to this item's property store.
(Inherited from ShellItem.)
Protected methodShowDefaultContextMenu
Determines if the default context menu should be shown.
(Inherited from ShellItem.)
Public methodToString
Returns a String that represents this instance.
(Inherited from ShellItem.)
Protected methodTryCompare(ShellItem, ShellFolderColumn, CompareIdReturnValue)
Compares this instance column with another.
(Inherited from ShellItem.)
Public methodTryCompare(ShellItem, SHCIDS, CompareIdReturnValue)
Compares this instance with another.
(Inherited from ShellItem.)
Protected methodTryCompareAllFields
Compares this instance all columns with another.
(Inherited from ShellItem.)
Public methodTryGetAttributes
Gets the attributes for a PIDL that may not represent an existing Shell Item. This method is only implemented for file system Shell Items with PIDLs created from the ShellItemIdList.FromFileSystem method. If you override it, make sure you also override TryParseItem, TryGetDisplayName and TryGetPropertyValue in a consistent manner.
Public methodTryGetContent
Gets the content of this item.
(Inherited from ShellItem.)
Public methodTryGetDisplayName
Gets the display name for a PIDL that may not represent an existing Shell Item. This method is only implemented for file system Shell Items with PIDLs created from the ShellItemIdList.FromFileSystem method. If you override it, make sure you also override TryParseItem, TryGetAttributes and TryGetPropertyValue in a consistent manner.
Protected methodTryGetFileSystemValue
Gets a property key value in the case of a File System Shell item.
(Inherited from ShellItem.)
Public methodTryGetPropertyAt
Gets the property key at a given index, from this item's property store.
(Inherited from ShellItem.)
Public methodTryGetPropertyValue(PropertyKey, Object)
Gets a property key value.
(Inherited from ShellItem.)
Public methodTryGetPropertyValue(ShellItemIdList, PropertyKey, Object)
Gets a property key value. or a PIDL that may not represent an existing Shell Item. This method returns false. If you override it, make sure you also override TryParseItem and TryGetDisplayName and TryGetAttributesin a consistent manner.
Public methodTryGetPropertyValueT(PropertyKey, T, IFormatProvider)
Gets a property key value and convert it to the expected type if needed.
(Inherited from ShellItem.)
Public methodTryParseItem
Parses a display name for a Shell Item that may not exist. This method is only implemented for file system Shell Items. It will use the CreateFileSystemItem and CreateFileSystemFolder that you can override if you want it to use your derived classes instead. If you override it, make sure you also override TryGetDisplayName, TryGetAttributes and TryGetPropertyValue in a consistent manner.
Protected methodUnmergeViewMenu
Unmerges the view menu.
(Inherited from ShellItem.)
Top
Events
  NameDescription
Public eventCommandExec
Occurs when a specified command is executed.
Public eventCommandQueryStatus
Occurs when the status of one or more commands, generated by user interface events, is queried for.
Public eventFileDialogEvent
Raised when event are received from a Dialog Box.
Public eventGetDataObject
Raised when a data object for a Shell Item is requested.
Public eventGetDragDropParameters
Raised when a Shell Item is preparing a drag & drop operation.
Public eventGetDynamicColumnDetails
Raised when the shell asks for a dynamic column details.
Public eventGetFileDialogProperties
Raised to determine what properties to gather for a future file dialog event.
Public eventGetFolderSettings
Raised when a shell view window has been created.
Public eventGetNameMaxLength
Raised to validate a Shell Item name.
Public eventGetNameValidCharacters
Raised to validate a Shell Item name.
Public eventGetOnDemandDataObject
Raised when an on-demand data object for a Shell Item is requested.
Public eventManageColumns
Raised when a shell view window has been created.
Public eventMergingContextMenu
Raised when a context menu is merging.
Public eventRefresh
Raised when the view is refreshed, for example when the end-user presses the F5 key from the list view.
Public eventSelectAndEditItem
Raised when a Shell Item has been created with the New menu.
Top
Fields
  NameDescription
Public fieldStatic memberDefaultFolderAttributes
The default folder attributes.
Top
See Also