WorkspaceVisualNodeBase Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
This is the base class that we'll use for all Explorer "nodes" we want to show in the context of Workspace tree views. represent a single node in workspace tree view (node can be anything we decide going forward) aka Folder File Virtual node (aka named group, for pins or whatever) etc ..
public ref class WorkspaceVisualNodeBase abstract : IDisposable
public abstract class WorkspaceVisualNodeBase : IDisposable
type WorkspaceVisualNodeBase = class
interface IDisposable
Public MustInherit Class WorkspaceVisualNodeBase
Implements IDisposable
- Inheritance
-
WorkspaceVisualNodeBase
- Implements
Constructors
WorkspaceVisualNodeBase(INodeContainer) |
Initializes a new instance of the WorkspaceVisualNodeBase class. Used by root nodes |
WorkspaceVisualNodeBase(WorkspaceVisualNodeBase) |
Initializes a new instance of the WorkspaceVisualNodeBase class. Used by nodes that are children |
Fields
MonikerSeparator |
Full mode moniker separator character |
Properties
AlwaysExpandable |
true if the node is always expandable even if there is no children (such us the workspace node). |
CommandHandlers |
Command handlers associated with this code. To be consulted if node is part of selection |
Container |
Hosting tree view |
HardRefresh |
Node require add/remove to refresh |
InTransition |
Node represent object in transition (aka deleting, name setting, etc) |
InvokeAction |
Invoke action if supported (double-click, enter) |
IsDefaultExpanded |
node should be expanded by default |
IsDisposed |
Gets a value indicating whether the object is being disposed. |
IsExpandable |
If true, node will have [+] expander shown, and can be expanded and collapsed in view. |
IsExpanded |
Whether node is currently expanded |
IsSourcesInitialized |
true if children are refreshed at least once. |
Items |
Children collection property (will be accessed by XAML) |
ItemsInternal |
Internal item's collection |
NodeFullMoniker |
"Full" persistence moniker can identify the node under entire workspace. Will be null if node's moniker or any of it's parents monikers are null. |
NodeMoniker |
Persistence moniker for the node. It is expected to be unique among the children nodes with the same parent. This moniker can be used to identify the node under a "parent". Can be null. |
Parent |
Parent node (not needed for UI, just for us) |
ProvisionalViewingStatus |
provisional status if node support invoke |
Root |
Root node |
SupportsRename |
whether the item supports rename. |
Text |
the node text. |
UINode |
The UI container object |
ValidateCounter |
Get the validation count of the children of this node. |
VSSelectionKind |
Type of the node of VS selection. If Empty, node won't participate in the VSSelection. |
VSSelectionMoniker |
the URL to use for vs selection |
Workspace |
Workspace object this node belongs to |
Methods
AfterChildrenRefresh() |
Called after populating of the children for this node |
AfterCollapse() |
called after node is collapsed in UI |
ApplyActionOnRealizedNodes(Action<WorkspaceVisualNodeBase>) |
Enumerate already realized nodes and execute an action |
BeforeChildrenRefresh() |
Called before populating of the children for this node |
BeforeExpand() |
Called before node to be expanded in UI |
CancelRename() |
called when rename is canceled. |
ClearProviders() |
Clear the children providers, remove all children and command handlers. Node becomes inactive and just a visual hint. |
CollapseAll(Boolean) |
Collapse all the children (recursively) of a node (and optionally the node itself) |
Compare(WorkspaceVisualNodeBase) |
Comparison of the two nodes. Used for low impact refresh. |
Dispose() |
This code added to correctly implement the disposable pattern. |
Dispose(Boolean) |
part of dispose pattern. |
DoRename(String) |
called to commit the rename (aka rename the underlying object and update the Text box) |
EnsureRefreshChildrenFinishesAsync() |
Ensure children Refresh completes |
Exec(Guid, UInt32, UInt32, IntPtr, IntPtr) |
Command routing Exec on this node. |
GetChildCollectionForProvider(INodeExtender) |
Get the child collection associated with a provider. |
GetDefaultSelectionLength(String) |
get the default selection length for rename box (aka files will select the text before the last ".") |
GetLogger() |
Returns the logger to use for logging diagnostics information |
GetParentMoniker(String, String, String) |
Utility to extract the parent parts from a full moniker string. |
GetRealizedChild(String) |
Get a child node with a given moniker. |
GetRenameLabel() |
Rename support |
InitExtensions(IUINode) |
Initialize Extension Providers for this node |
Invalidate() |
invalidate the children collection. Note that this does not trigger an refresh, it will just indicate that the node is out of sync. |
NavigateToAsync(String) |
Navigate to child node or self representing |
NavigateToMonikerNoRefresh(String) |
Navigate to child node or self as specified by full moniker. Will not force refresh/realization of child nodes to find the target. |
NavigateToMonikerWithRefreshAsync(String) |
Navigate to child node or self as specified by full moniker. Refresh (and realize) the nodes, if needed. |
OnChildNodeExpandedStateChanged(WorkspaceVisualNodeBase, Boolean) |
called on the root node when any inner children expansion changed. |
OnChildrenCollectionChanged() |
called by UI control host when children collection changed. |
OnInitialized() |
called when node is initialized and hooked to UI control |
QueryStatus(Guid, UInt32, UInt32, String) |
Command routing Query Status result for this node alone. |
Refresh(WorkspaceVisualNodeBase) |
Called on refresh, when a "new node" is created but considered equal. This give opportunity to "refresh" some non-essential properties from the newer object (like capitalization) |
RefreshChildrenAsync(Boolean, CancellationToken) |
Initiate children refresh (can be async) |
RefreshChildrenAsync(Boolean) |
Initiate children refresh (can be async) |
RefreshChildrenSourcesAsync() |
Recreates the list of children sources in use |
RefreshStatus() |
Update to the latest visual representation (icons and such). |
SetExpandedIcon(Guid, Int32) |
Icon to use when "Expanded" in the view |
SetIcon(Guid, Int32) |
Default Icon |
SetOverlayIcon(Guid, Int32) |
Icon to provide additional icon adornment (normally shown in the corner of the other icon) |
SetStateIcon(Guid, Int32) |
Small icon on the left (like source control check-out state) |
SplitMoniker(String) |
Utility to break the fullMoniker to parts (containing on individual nodeMonikers of all parents, starting from root). |