Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
3/12/2014
Constructs a PluginNode, which defines a single node in the Shell Treeview control.
Namespace: Microsoft.RemoteToolSdk.PluginComponents
Assembly: Microsoft.RemoteToolSdk (in microsoft.remotetoolsdk.dll)
Syntax
public PluginNode (
string description,
string guidNode,
string guidParent,
PluginData data,
PluginDataView view,
PluginComponent hostPlugin,
BuiltInIcon iconType
)
'Declaration
Public Sub New ( _
description As String, _
guidNode As String, _
guidParent As String, _
data As PluginData, _
view As PluginDataView, _
hostPlugin As PluginComponent, _
iconType As BuiltInIcon _
)
Parameters
- description
Text to display in the TreeView
- guidNode
GUID of the node
- guidParent
GUID of the parent node
- data
The object associated with this node, or NULL
- view
The object associated with this node, or NULL. If a data object is specified, and the view is set to NULL, the built-in Generic View will be automatically supplied.
- hostPlugin
The plug-in that owns this node
- iconType
The type of icon to display
Remarks
In the OnInit() method of the PluginComponent class, the plug-in developer must define all of the nodes to display in the Shell TreeView control, and add them to the PluginComponent.Nodes collection.
Example
The following example creates a top-level node that has no view or data object. It is just a label. The icon is the Plug-in icon, which looks like a hammer and a wrench.
AddNode(
new PluginNode(
Description,
guidTopLevelNode,
null,
null,
null,
this,
BuiltInIcon.Plugin)
);
The following example creates a node that is parented to a top level node. It has a data and a view object. The icon is the NodeData icon, which looks like a peice of paper.
AddNode(
new PluginNode(
"Child Node",
guidChildNode1,
guidTopLevelNode,
m_data,
m_view,
this,
BuiltInIcon.NodeData
)
);
The following example creates a node that is parented to a top level node. It has no data object, and a view object (assume the view object is a custom help system you developed, and has no data). The icon is custom.
PluginNode helpNode =
new PluginNode(
"Help",
guidHelpNode,
guidTopLevelNode,
null,
m_helpView,
this,
BuiltInIcon.Custom
);
helpNode.CustomIcon = myHelpIconLoadedFromSomeResourceFile;
AddNode(helpNode);
See Also
Reference
PluginNode Class
PluginNode Members
Microsoft.RemoteToolSdk.PluginComponents Namespace