Search
ItemListView Class
Remarks See Also
 





A ListView control with specific support for hosting DiagramItems and dragging them to DiagramView control.

Namespace: MindFusion.Diagramming.Wpf
Assembly: MindFusion.Diagramming.Wpf

 Syntax

C#  Copy Code

public class ItemListView : ListView

Visual Basic  Copy Code

Public Class ItemListView
    Inherits ListView

 Remarks

Items can be added or removed using the Items property of base ListView class.

Drag-and-drop operations create a copy of the dragged item, and set its size to NewInstanceSize. The copy is created by calling item's Clone method. You can override clone to copy property values of custom item subclasses.

Icons in the list are drawn by scaling NewInstanceSize down to IconSize. E.g. if a list icon is half the size of the diagram item it creates, its graphic elements such as cells, labels, strokes would be rendered at half scale too (as opposed to rendering with same label / stroke sizes but in smaller bounding rectangle).

The AutoConnectLinks and AutoConnectDistance properties control whether links created via drag-and-drop should connect to nearby nodes in the target diagram.

 Example

C#  Copy Code
itemListView.Items.Add(new ContainerNode());

var link = new DiagramLink(diagram);
link.ControlPoints[0] = new Point(0, 0);
link.ControlPoints[1] = new Point(50, 20);
itemListView.Items.Add(link);

 Inheritance Hierarchy

System.Object
    System.Windows.Threading.DispatcherObject
        System.Windows.DependencyObject
            System.Windows.Media.Visual
                System.Windows.UIElement
                    System.Windows.FrameworkElement
                        System.Windows.Controls.Control
                            System.Windows.Controls.ItemsControl
                                System.Windows.Controls.Primitives.Selector
                                    System.Windows.Controls.ListBox
                                        System.Windows.Controls.ListView
                                            MindFusion.Diagramming.Wpf.ItemListView

 See Also