IShellObject Interface
Provides the requirements for a shell object.
public interface IShellObject : IDisposable, INotifyPropertyChanged
Properties
AreChildrenLoaded
Gets whether the Children collection is loaded.
bool AreChildrenLoaded { get; }
Property Value
- System.Boolean:
true
if the Children collection is loaded; otherwise,false
.
Remarks
Since the Children collection is lazy-loaded when called, this property returns whether it has been loaded without triggering a load.
CanCreateChildFolder
Gets whether the shell object can create a child folder.
bool CanCreateChildFolder { get; }
Property Value
- System.Boolean:
true
if the shell object can create a child folder; otherwise,false
.
Remarks
Only shell folders can create child folders.
CanHaveChildFolders
Gets whether the shell object may have child folders.
bool CanHaveChildFolders { get; }
Property Value
- System.Boolean:
true
if the shell object may have child folders; otherwise,false
.
Remarks
Some shell objects can immediately return that they don't have any child folders, whereas others might require a query to determine if there are any.
CanRename
Gets whether the shell object may be renamed.
bool CanRename { get; }
Property Value
- System.Boolean:
true
if the shell object may be renamed; otherwise,false
.
Children
Gets the collection of child shell objects.
IList<IShellObject> Children { get; }
Property Value
- System.Collections.Generic.IList<IShellObject>:
The collection of child shell objects.
EditingName
Gets the full user-friendly editing name of the shell object, if available.
string EditingName { get; }
Property Value
- System.String:
The full user-friendly editing name of the shell object, if available.
Remarks
This value is usually the same as FileSystemPath, except that it can also return a special value to identify special shell objects.
ExtraLargeIcon
Gets or sets the extra-large icon.
ImageSource ExtraLargeIcon { get; set; }
Property Value
- System.Windows.Media.ImageSource:
The extra-large icon.
ExtraLargeIconOverlay
Gets or sets the extra-large icon overlay.
ImageSource ExtraLargeIconOverlay { get; set; }
Property Value
- System.Windows.Media.ImageSource:
The extra-large icon overlay.
ExtraLargeThumbnail
Gets or sets the extra-large thumbnail.
ImageSource ExtraLargeThumbnail { get; set; }
Property Value
- System.Windows.Media.ImageSource:
The extra-large thumbnail.
FileSystemPath
Gets the file system path of the shell object, if available.
string FileSystemPath { get; }
Property Value
- System.String:
The file system path of the shell object, if available.
IsFolder
Gets whether the shell object is a folder, which is anything that can contain other shell objects.
bool IsFolder { get; }
Property Value
- System.Boolean:
true
if the shell object is a folder, which is anything that can contain other shell objects; otherwise,false
.
IsLink
Gets whether the shell object is a link, meaning a shortcut to another shell object.
bool IsLink { get; }
Property Value
- System.Boolean:
true
if the shell object is a link, meaning a shortcut to another shell object; otherwise,false
.
IsRemovable
Gets whether the shell object is on removable media or is a removable device.
bool IsRemovable { get; }
Property Value
- System.Boolean:
true
if the shell object is on removable media or is a removable device; otherwise,false
.
IsVirtual
Gets whether the shell object is not part of the file system (files, directories, or root directories).
bool IsVirtual { get; }
Property Value
- System.Boolean:
true
if the shell object is not part of the file system (files, directories, or root directories); otherwise,false
.
IsWatching
Gets whether the shell object's tree hierarchy is currently watching for change notifications.
bool IsWatching { get; }
Property Value
- System.Boolean:
true
if the shell object's tree hierarchy is currently watching for change notifications; otherwise,false
.
Kind
Gets a ShellObjectKind that specifies the kind of this shell object.
ShellObjectKind Kind { get; }
Property Value
- ShellObjectKind:
A ShellObjectKind that specifies the kind of this shell object.
LargeIcon
Gets or sets the large icon.
ImageSource LargeIcon { get; set; }
Property Value
- System.Windows.Media.ImageSource:
The large icon.
LargeIconOverlay
Gets or sets the large icon overlay.
ImageSource LargeIconOverlay { get; set; }
Property Value
- System.Windows.Media.ImageSource:
The large icon overlay.
LargeThumbnail
Gets or sets the large thumbnail.
ImageSource LargeThumbnail { get; set; }
Property Value
- System.Windows.Media.ImageSource:
The large thumbnail.
MediumIcon
Gets or sets the medium icon.
ImageSource MediumIcon { get; set; }
Property Value
- System.Windows.Media.ImageSource:
The medium icon.
MediumIconOverlay
Gets or sets the medium icon overlay.
ImageSource MediumIconOverlay { get; set; }
Property Value
- System.Windows.Media.ImageSource:
The medium icon overlay.
MediumThumbnail
Gets or sets the medium thumbnail.
ImageSource MediumThumbnail { get; set; }
Property Value
- System.Windows.Media.ImageSource:
The medium thumbnail.
Name
Gets or sets the name of the shell object.
string Name { get; set; }
Property Value
- System.String:
The name of the shell object.
ParsingName
Gets the full parsing name of the shell object, if available.
string ParsingName { get; }
Property Value
- System.String:
The full parsing name of the shell object, if available.
Remarks
This value is usually the same as FileSystemPath, except that it can also return a special syntax to identify special shell objects.
RelativeParsingName
Gets the parent-relative parsing name of the shell object, if available.
string RelativeParsingName { get; }
Property Value
- System.String:
The parent-relative parsing name of the shell object, if available.
Remarks
This value is usually the same as Name, except that it can also return a special syntax to identify special shell objects.
ShellService
Gets the IShellService used to return this shell object's children.
IShellService ShellService { get; }
Property Value
- IShellService:
The IShellService used to return this shell object's children.
SmallIcon
Gets or sets the small icon.
ImageSource SmallIcon { get; set; }
Property Value
- System.Windows.Media.ImageSource:
The small icon.
SmallIconOverlay
Gets or sets the small icon overlay.
ImageSource SmallIconOverlay { get; set; }
Property Value
- System.Windows.Media.ImageSource:
The small icon overlay.
SortOrder
Gets or sets a numeric sort order for sorting the shell object within other shell objects.
int SortOrder { get; set; }
Property Value
- System.Int32:
A numeric sort order for sorting the shell object within other shell objects. The default value is
0
.
SpecialFolderKind
Gets a SpecialFolderKind that specifies kind of special folder represented by this shell object, if applicable.
SpecialFolderKind SpecialFolderKind { get; }
Property Value
- SpecialFolderKind:
A SpecialFolderKind that specifies kind of special folder represented by this shell object, if applicable.
ToolTip
Gets or sets the tool-tip object that is displayed for this shell object in the user interface (UI).
object ToolTip { get; set; }
Property Value
- System.Object:
The tool-tip object.
Methods
CreateChildFolder(String)
Creates a child folder with the specified name.
bool CreateChildFolder(string name)
Parameter | Type | Description |
---|---|---|
name | System.String | The name of the child folder. |
Returns
- System.Boolean:
true
if the child folder was created; otherwise,false
.
Remarks
Only shell folders can create child folders.
RefreshChildren()
Refreshes the Children collection.
void RefreshChildren()
StartWatching()
Starts watching the shell object's tree hierarchy for change notifications.
bool StartWatching()
Returns
- System.Boolean:
true
if the shell object is watching its tree hierarchy; otherwise,false
.
StopWatching()
Stops watching the shell object's tree hierarchy for change notifications.
void StopWatching()
Events
Changed
Occurs when the shell object has changed.
event EventHandler<ShellObjectChangedEventArgs> Changed
Event Type
- System.EventHandler<ShellObjectChangedEventArgs>
Inherited Members
- System.IDisposable.Dispose()