Search
DiagramView.DefaultControlTemplate Property
See Also
 





Gets or sets the HTML string representing the DOM content, rendered by default in newly created ControlNode objects.

Namespace: MindFusion.Diagramming.WebForms
Package: MindFusion.Diagramming.WebForms

 Syntax

C#  Copy Code

public string DefaultControlTemplate { get; set; }

Visual Basic  Copy Code

Public Property DefaultControlTemplate As String

 Property Value

A string specifying the HTML DOM created for new ControlNode objects. The default value is an empty string.

 Remarks

This value is assigned to the Template property of new nodes. The control raises NodeDomCreatedScript client-side event when the node's DOM is instantiated and ready for manipulation.

 Example

C#  Copy Code
const string defaultTemplate = @"
  <div style='display:flex;background-color:lightcyan;'>
    <img width='70' height='70' title='Click to choose picture' src='/Images/icon4.png' data-interactive='true' data-event-click='placeholderClick'/>
    <input type='text' placeholder='Text' data-interactive='true' data-event-change='dataChange'></input>
    <div style='padding:10px'>
      <button type='button' data-interactive='true' data-event-click='subordinateClick'>Subordinate</button>
      <a title='Delete node' data-interactive='true' data-event-click='deleteClick'>&#10060;</a>
      <a title='Drag&drop task nodes from the nodeListView here' data-interactive='true' data-event-mouseup='tasksMouseUp' class='tasks'>Add task</a>
    </div>
  <div>
";
...
diagramView.DefaultControlTemplate = defaultTemplate;

 See Also