ShellObjectViewModel Class
Represents a view-model wrapper for an IShellObject.
public class ShellObjectViewModel : ObservableObjectBase
- Inheritance:
- object ObservableObjectBase object
Constructors
ShellObjectViewModel(IShellObject)
Initializes an instance of the class.
public ShellObjectViewModel(IShellObject shellObject)
| Parameter | Type | Description |
|---|---|---|
| shellObject | IShellObject | The IShellObject model wrapped by this view model. |
Properties
CanCreateChildFolder
Indicates whether the shell object can create a child folder.
public bool CanCreateChildFolder { get; }
Property Value
- bool:
trueif the shell object can create a child folder; otherwise,false.
Remarks
Only shell folders can create child folders.
CanHaveChildFolders
Indicates whether the shell object may have child folders.
public bool CanHaveChildFolders { get; }
Property Value
- bool:
trueif 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
Indicates whether the shell object may be renamed.
public bool CanRename { get; }
Property Value
- bool:
trueif the shell object may be renamed; otherwise,false.
CanUseThumbnails
Indicates whether thumbnail images can be used in place of icons when available.
public bool CanUseThumbnails { get; set; }
Property Value
- bool:
trueif thumbnail images can be used in place of icons when available; otherwise,false. The default value isfalse.
Children
The collection of child view-models, which is initialized by an item adapter.
CreateChildFolderCommand
The ICommand used to add a new child into to an associated collection/parent.
EditingName
The full user-friendly editing name of the shell object, if available.
public string? EditingName { get; }
Property Value
Remarks
This value is usually the same as FileSystemPath, except that it can also return a special value to identify special shell objects.
ExtraLargeIcon
The extra-large icon.
ExtraLargeIconOverlay
The extra-large icon overlay.
ExtraLargeThumbnail
The extra-large thumbnail.
FileSystemPath
The file system path of the shell object, if available.
HasExtraLargeThumbnail
Indicates whether a ExtraLargeThumbnail is available.
public bool HasExtraLargeThumbnail { get; }
Property Value
- bool:
trueif a ExtraLargeThumbnail is available; otherwise,false.
HasLargeThumbnail
Indicates whether a LargeThumbnail is available.
public bool HasLargeThumbnail { get; }
Property Value
- bool:
trueif a LargeThumbnail is available; otherwise,false.
HasMediumThumbnail
Indicates whether a MediumThumbnail is available.
public bool HasMediumThumbnail { get; }
Property Value
- bool:
trueif a MediumThumbnail is available; otherwise,false.
IsEditing
Indicates whether the node is currently being edited.
public bool IsEditing { get; set; }
Property Value
- bool:
trueif the node is currently being edited; otherwise,false.
IsExpanded
Indicates whether the node is expanded.
public bool IsExpanded { get; set; }
Property Value
- bool:
trueif the node is expanded; otherwise,false.
IsFolder
Indicates whether the shell object is a folder, which is anything that can contain other shell objects.
public bool IsFolder { get; }
Property Value
- bool:
trueif the shell object is a folder, which is anything that can contain other shell objects; otherwise,false.
IsLink
Indicates whether the shell object is a link, meaning a shortcut to another shell object.
public bool IsLink { get; }
Property Value
- bool:
trueif the shell object is a link, meaning a shortcut to another shell object; otherwise,false.
IsRemovable
Indicates whether the shell object is on removable media or is a removable device.
public bool IsRemovable { get; }
Property Value
- bool:
trueif the shell object is on removable media or is a removable device; otherwise,false.
IsSelected
Indicates whether the node is selected.
public bool IsSelected { get; set; }
Property Value
- bool:
trueif the node is selected; otherwise,false.
IsVirtual
Indicates whether the shell object is not part of the file system (files, directories, or root directories).
public bool IsVirtual { get; }
Property Value
- bool:
trueif the shell object is not part of the file system (files, directories, or root directories); otherwise,false.
IsWatching
Indicates whether the shell object's tree hierarchy is currently watching for change notifications.
public bool IsWatching { get; }
Property Value
- bool:
trueif the shell object's tree hierarchy is currently watching for change notifications; otherwise,false.
Kind
A ShellObjectKind that specifies the kind of this shell object.
LargeIcon
The large icon.
LargeIconOverlay
The large icon overlay.
LargeThumbnail
The large thumbnail.
MediumIcon
The medium icon.
MediumIconOverlay
The medium icon overlay.
MediumThumbnail
The medium thumbnail.
Model
The IShellObject model wrapped by this view-model.
Name
The name of the shell object.
ParsingName
The full parsing name of the shell object, if available.
public string? ParsingName { get; }
Property Value
Remarks
This value is usually the same as FileSystemPath, except that it can also return a special syntax to identify special shell objects.
RelativeParsingName
The parent-relative parsing name of the shell object, if available.
public string? RelativeParsingName { get; }
Property Value
Remarks
This value is usually the same as Name, except that it can also return a special syntax to identify special shell objects.
ShellService
The IShellService used to return this shell object's children.
SmallIcon
The small icon.
SmallIconOverlay
The small icon overlay.
SortOrder
A numeric sort order for sorting the shell object within other shell objects.
SpecialFolderKind
A SpecialFolderKind that specifies kind of special folder represented by this shell object, if applicable.
Tag
The custom data for the node.
ToolTip
The tool-tip object that is displayed for this shell object in the user interface (UI).
Methods
CreateChildFolder(string)
Creates a child folder with the specified name.
public bool CreateChildFolder(string name)
| Parameter | Type | Description |
|---|---|---|
| name | string | The name of the child folder. |
Returns
- bool:
trueif the child folder was created; otherwise,false.
Remarks
Only shell folders can create child folders.
StartWatching()
Starts watching the shell object's tree hierarchy for change notifications.
public bool StartWatching()
Returns
- bool:
trueif the shell object is watching its tree hierarchy; otherwise,false.
StopWatching()
Stops watching the shell object's tree hierarchy for change notifications.
public void StopWatching()
ToString()
Returns the string representation of this object.
Inherited Members
- ObservableObjectBase.NotifyPropertyChanged(string)
- ObservableObjectBase.OnPropertyChanged(string)
- ObservableObjectBase.OnPropertyChanged(PropertyChangedEventArgs)
- ObservableObjectBase.OnPropertyChanging(string)
- ObservableObjectBase.OnPropertyChanging(PropertyChangingEventArgs)
- ObservableObjectBase.SetProperty<T>(ref T, T, string)
- ObservableObjectBase.PropertyChanged
- ObservableObjectBase.PropertyChanging
- object.GetType()
- object.MemberwiseClone()
- object.Equals(object)
- object.Equals(object, object)
- object.ReferenceEquals(object, object)
- object.GetHashCode()