C# Class ClearCanvas.Desktop.View.WinForms.BindingTreeView

Tree-view that binds to an instance of an ITree, which acts as data-source. Also has built-in drag & drop support, delegating drop decisions to the underlying ITree.
Inheritance: System.Windows.Forms.UserControl
Show file Open project: jasper-yeh/ClearCanvas Class Usage Examples

Private Properties

Property Type Description
BindingTreeView_Load void
ConvertCheckState CheckBoxState
DisposeAll void
FindNodeRecursive ClearCanvas.Desktop.View.WinForms.BindingTreeNode
GetDragDropData object
GetDragDropDesiredEffect DragDropEffects
GetDragDropEffect DragDropEffects
GetDragDropKind DragDropKind
GetSelectionHelper ISelection
HighlightNode void
InitializeMenu void
InitializeToolStrip void
OnCheckBoxStyleChanged void
RebuildStateImageList void
ResetMenuIconScalingSize void
ResetToolbarIconScalingSize void
SendMessage System.IntPtr
SetInsertMark void
ShouldSerializeCheckBoxStyle bool
ShouldSerializeMenuIconScalingSize bool
ShouldSerializeToolbarIconScalingSize bool
_clearSearchButton_Click void
_contextMenu_Closed void
_contextMenu_Closing void
_contextMenu_Opened void
_contextMenu_Opening void
_searchTextBox_TextChanged void
_treeCtrl_AfterCheck void
_treeCtrl_AfterCollapse void
_treeCtrl_AfterExpand void
_treeCtrl_AfterLabelEdit void
_treeCtrl_AfterSelect void
_treeCtrl_BeforeExpand void
_treeCtrl_BeforeSelect void
_treeCtrl_ForeColorChanged void
_treeCtrl_ItemDrag void
_treeCtrl_NodeMouseClick void
_treeCtrl_NodeMouseDoubleClick void

Public Methods

Method Description
BindingTreeView ( ) : System

Constructor

EditSelectedNode ( ) : void

Start editing the selected node.

ExpandAll ( ) : void

Expands the entire tree

Protected Methods

Method Description
OnCheckBoxesChanged ( ) : void
OnDragDrop ( DragEventArgs e ) : void

Called when an object is dropped onto this control

OnDragEnter ( DragEventArgs e ) : void

Called when an object is first dragged into this control

OnDragLeave ( EventArgs e ) : void
OnDragOver ( DragEventArgs e ) : void

Called repeatedly as the object is dragged within this control

OnIconSizeChanged ( ) : void

Private Methods

Method Description
BindingTreeView_Load ( object sender, EventArgs e ) : void
ConvertCheckState ( ClearCanvas.Desktop.Trees.CheckState checkState ) : CheckBoxState
DisposeAll ( IEnumerable enumerable ) : void
FindNodeRecursive ( TreeNodeCollection nodeCollection, Predicate criteria ) : ClearCanvas.Desktop.View.WinForms.BindingTreeNode

Searches the tree depth-first for a node matching the specified criteria

GetDragDropData ( DragEventArgs e ) : object

Extracts the drag-drop data from the event args, assuming this is an in-process drop. Out-of-process drops are not currently supported by this control.

GetDragDropDesiredEffect ( DragEventArgs e ) : DragDropEffects

Returns the desired effect, chosen from the allowed effects in the DragEventArgs. The user indicates the desired effect (move/copy/link) by using modifier keys. Copied this logic from MSDN - seems to be standard windows convention.

GetDragDropEffect ( DragDropKind kind ) : DragDropEffects

Converts a DragDropKind to the WinForms DragDropEffects

GetDragDropKind ( DragDropEffects effect ) : DragDropKind

Converts a DragDropEffects, which is WinForms specific, to a DragDropKind

GetSelectionHelper ( ) : ISelection

Obtains the current selection

HighlightNode ( TreeNode node, bool highlight ) : void

Highlights or un-highlights the specified node, without altering the current selection

InitializeMenu ( ) : void
InitializeToolStrip ( ) : void
OnCheckBoxStyleChanged ( ) : void
RebuildStateImageList ( ) : void
ResetMenuIconScalingSize ( ) : void
ResetToolbarIconScalingSize ( ) : void
SendMessage ( IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam ) : IntPtr
SetInsertMark ( TreeNode node, DragDropPosition position ) : void

Sets or unsets an insertion mark before or after the specified node. DragDropPosition.Default clears the insertion mark.

ShouldSerializeCheckBoxStyle ( ) : bool
ShouldSerializeMenuIconScalingSize ( ) : bool
ShouldSerializeToolbarIconScalingSize ( ) : bool
_clearSearchButton_Click ( object sender, EventArgs e ) : void
_contextMenu_Closed ( object sender, System.Windows.Forms.ToolStripDropDownClosedEventArgs e ) : void
_contextMenu_Closing ( object sender, System.Windows.Forms.ToolStripDropDownClosingEventArgs e ) : void
_contextMenu_Opened ( object sender, EventArgs e ) : void
_contextMenu_Opening ( object sender, CancelEventArgs e ) : void
_searchTextBox_TextChanged ( object sender, EventArgs e ) : void
_treeCtrl_AfterCheck ( object sender, TreeViewEventArgs e ) : void
_treeCtrl_AfterCollapse ( object sender, TreeViewEventArgs e ) : void
_treeCtrl_AfterExpand ( object sender, TreeViewEventArgs e ) : void
_treeCtrl_AfterLabelEdit ( object sender, System.Windows.Forms.NodeLabelEditEventArgs e ) : void
_treeCtrl_AfterSelect ( object sender, TreeViewEventArgs e ) : void

Notify that the Selection property has changed

_treeCtrl_BeforeExpand ( object sender, System.Windows.Forms.TreeViewCancelEventArgs e ) : void

When the user is about to expand a node, need to build the level beneath it

_treeCtrl_BeforeSelect ( object sender, System.Windows.Forms.TreeViewCancelEventArgs e ) : void
_treeCtrl_ForeColorChanged ( object sender, EventArgs e ) : void
_treeCtrl_ItemDrag ( object sender, ItemDragEventArgs e ) : void
_treeCtrl_NodeMouseClick ( object sender, TreeNodeMouseClickEventArgs e ) : void
_treeCtrl_NodeMouseDoubleClick ( object sender, TreeNodeMouseClickEventArgs e ) : void

Method Details

BindingTreeView() public method

Constructor
public BindingTreeView ( ) : System
return System

EditSelectedNode() public method

Start editing the selected node.
public EditSelectedNode ( ) : void
return void

ExpandAll() public method

Expands the entire tree
public ExpandAll ( ) : void
return void

OnCheckBoxesChanged() protected method

protected OnCheckBoxesChanged ( ) : void
return void

OnDragDrop() protected method

Called when an object is dropped onto this control
protected OnDragDrop ( DragEventArgs e ) : void
e System.Windows.Forms.DragEventArgs
return void

OnDragEnter() protected method

Called when an object is first dragged into this control
protected OnDragEnter ( DragEventArgs e ) : void
e System.Windows.Forms.DragEventArgs
return void

OnDragLeave() protected method

protected OnDragLeave ( EventArgs e ) : void
e System.EventArgs
return void

OnDragOver() protected method

Called repeatedly as the object is dragged within this control
protected OnDragOver ( DragEventArgs e ) : void
e System.Windows.Forms.DragEventArgs
return void

OnIconSizeChanged() protected method

protected OnIconSizeChanged ( ) : void
return void