Search
ItemListView Class
Remarks See Also
 





ListBox control with support for hosting DiagramItems and dragging them to the Diagram control.

Namespace: MindFusion.Diagramming.Mvc
Assembly: MindFusion.Diagramming.Mvc

 Syntax

C#  Copy Code

public class ItemListView

Visual Basic  Copy Code

Public Class ItemListView

 Remarks

Call the AddItem method to add an item to the view.

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 scaling code assumes MeasureUnit of the target diagram and the list view have matching values.

Configuring the control

ItemListView can be created inside a Razor page either by invoking the ItemListView html helper, or by adding a <mindfusion-itemlistview> tag helper:

Razor  Copy Code

@addTagHelper *, MindFusion.Diagramming.Mvc
....
<mindfusion-itemlistview
    component=(ItemListView)ViewBag.ItemListView
    style="width:100%; height:100%;">
</mindfusion-itemlistview>

 Inheritance Hierarchy

System.Object
    MindFusion.Diagramming.Mvc.ItemListView

 See Also