Class ShellSearchFolder
- Namespace
- Microsoft.WindowsAPICodePack.Shell
- Assembly
- Microsoft.WindowsAPICodePack.Shell.dll
Create and modify search folders.
public class ShellSearchFolder : ShellSearchCollection, IEquatable<ShellObject>, IEnumerable<ShellObject>, IEnumerable, IDisposable
- Inheritance
-
ShellSearchFolder
- Implements
- Inherited Members
Constructors
ShellSearchFolder(SearchCondition, params ShellContainer[])
Create a simple search folder. Once the appropriate parameters are set, the search folder can be enumerated to get the search results.
public ShellSearchFolder(SearchCondition searchCondition, params ShellContainer[] searchScopePath)
Parameters
searchCondition
SearchConditionSpecific condition on which to perform the search (property and expected value)
searchScopePath
ShellContainer[]List of folders/paths to perform the search on. These locations need to be indexed by the system.
ShellSearchFolder(SearchCondition, params string[])
Create a simple search folder. Once the appropiate parameters are set, the search folder can be enumerated to get the search results.
public ShellSearchFolder(SearchCondition searchCondition, params string[] searchScopePath)
Parameters
searchCondition
SearchConditionSpecific condition on which to perform the search (property and expected value)
searchScopePath
string[]List of folders/paths to perform the search on. These locations need to be indexed by the system.
Properties
SearchCondition
Gets the SearchCondition of the search. When this property is not set, the resulting search will have no filters applied.
public SearchCondition SearchCondition { get; }
Property Value
SearchScopePaths
Gets the search scope, as specified using an array of locations to search. The search will include this location and all its subcontainers. The default is FOLDERID_Profile
public IEnumerable<string> SearchScopePaths { get; }
Property Value
Methods
SetDisplayName(string)
Sets the search folder display name.
public void SetDisplayName(string displayName)
Parameters
displayName
string
SetFolderLogicalViewMode(FolderLogicalViewMode)
Sets folder logical view mode. The default settings are based on the FolderTypeID which is set by the SearchFolder::SetFolderTypeID method.
public void SetFolderLogicalViewMode(FolderLogicalViewMode mode)
Parameters
mode
FolderLogicalViewModeThe logical view mode to set.
SetFolderTypeID(Guid)
Sets a search folder type ID, as specified.
public void SetFolderTypeID(Guid value)
Parameters
value
Guid
SetGroupColumn(PropertyKey)
Sets a group column, as specified. If no group column is specified, no grouping occurs.
public void SetGroupColumn(PropertyKey propertyKey)
Parameters
propertyKey
PropertyKey
Remarks
This property may not work correctly with the ExplorerBrowser control.
SetIconSize(int)
Sets the search folder icon size. The default settings are based on the FolderTypeID which is set by the SearchFolder::SetFolderTypeID method.
public void SetIconSize(int value)
Parameters
value
int
SetStacks(params PropertyKey[])
Creates a list of stack keys, as specified. If this method is not called, by default the folder will not be stacked.
public void SetStacks(params PropertyKey[] propertyKeys)
Parameters
propertyKeys
PropertyKey[]Array of property keys on which the folder is stacked.
SetStacks(params string[])
Creates a list of stack keys, as specified. If this method is not called, by default the folder will not be stacked.
public void SetStacks(params string[] canonicalNames)
Parameters
canonicalNames
string[]Array of canonical names for properties on which the folder is stacked.
Exceptions
- ArgumentException
If one of the given canonical names is invalid.
SetVisibleColumns(PropertyKey[])
Creates a new column list whose columns are all visible, given an array of PropertyKey structures. The default is based on FolderTypeID.
public void SetVisibleColumns(PropertyKey[] value)
Parameters
value
PropertyKey[]
Remarks
This property may not work correctly with the ExplorerBrowser control.
SortColumns(SortColumn[])
Creates a list of sort column directions, as specified.
public void SortColumns(SortColumn[] value)
Parameters
value
SortColumn[]
Remarks
This property may not work correctly with the ExplorerBrowser control.