This example demonstrates how to bind positions of diagram items to source properties (in two-way mode) when you generate these items from a source collection.
Create a DiagramBinding
object, specify target and source properties and binding mode, and assign the object to the DiagramItem.Bindings property:
<dxdiag:DiagramShape.Bindings>
<dxdiag:DiagramBinding PropertyName="Position"
Expression="Position"
Mode="TwoWay"/>
</dxdiag:DiagramShape.Bindings>
Handle the DiagramDataBindingBehaviorBase.CustomLayoutItems event to disable the default layout algorithm.
- Generate Diagrams from a Data Source
- DiagramItem.Bindings
- DiagramItem.Position
- DiagramDataBindingBehaviorBase.CustomLayoutItems
- WPF Diagram - Use the DiagramDataBindingBehavior to Generate a Diagram from a Collection
- WPF Diagram Control - Generate Diagrams with Grouped Items
(you will be redirected to DevExpress.com to submit your response)