DiagramDataLayer
Binds shape and connection records to diagram items, mapping configured data members to their visual properties.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.RadDiagram.dll
Syntax:
public class DiagramDataLayer : INotifyPropertyChanged
Inheritance: objectDiagramDataLayer
Implements:
Constructors
Initializes the data layer for the specified diagram element and installs the default element provider.
public DiagramDataLayer(RadDiagramElement diagramElement)
The diagram element whose shapes and connections are populated from the data source.
Properties
Gets or sets the links data member.
[Browsable(true)]
public string ConnectionDataMember { get; set; }
The data member.
Gets or sets the currency manager for the collection selected by ConnectionDataMember.
public CurrencyManager ConnectionsCurrencyManager { get; set; }
Gets or sets the ConnectionSourceCapTypeMember data member.
[Browsable(true)]
public string ConnectionSourceCapTypeMember { get; set; }
The data member.
Gets or sets the SourceConnector data member.
[Browsable(true)]
public string ConnectionSourceConnectorMember { get; set; }
The data member.
Gets or sets the ConnectionTargetShapeIdMember data member.
public string ConnectionSourceShapeIdMember { get; set; }
The data member.
Gets or sets the ConnectionTargetCapTypeMember data member.
[Browsable(true)]
public string ConnectionTargetCapTypeMember { get; set; }
The data member.
Gets or sets the Target connector data member.
[Browsable(true)]
public string ConnectionTargetConnectorMember { get; set; }
The data member.
Gets or sets the ConnectionTargetShapeIdMember data member.
[Browsable(true)]
public string ConnectionTargetShapeIdMember { get; set; }
The data member.
Gets or sets the SourceConnector data member.
[Browsable(true)]
public string ConnectionTextMember { get; set; }
The data member.
Gets or sets the data source of the RadDiagram/>.
[Browsable(false)]
public object DataSource { get; set; }
Gets or sets the provider used to create the shape and connection elements for bound records.
public virtual IDiagramDataLayerElementProvider ElementFactory { get; set; }
Gets a value indicating whether this instance is data bound.
public bool IsDataBound { get; }
true if this instance is data bound; otherwise, false.
Gets or sets the links data member.
[Browsable(true)]
public string ShapeDataMember { get; set; }
The data member.
Gets or sets the Shape height data member.
[Browsable(true)]
public string ShapeHeightMember { get; set; }
The data member.
Gets or sets the ID data member.
[Browsable(true)]
public string ShapeIdMember { get; set; }
The data member.
Gets or sets the currency manager for the collection selected by ShapeDataMember.
public CurrencyManager ShapesCurrencyManager { get; set; }
Gets or sets the links data member.
[Browsable(true)]
public string ShapeTextMember { get; set; }
The data member.
Gets or sets the Shape data member.
[Browsable(true)]
public string ShapeTypeMember { get; set; }
The data member.
Gets or sets the Shape height data member.
[Browsable(true)]
public string ShapeWidthMember { get; set; }
The data member.
Gets or sets the Shape X position data member.
[Browsable(true)]
public string ShapeXMember { get; set; }
The data member.
Gets or sets the Shape Y position data member.
[Browsable(true)]
public string ShapeYMember { get; set; }
The data member.
Methods
Creates a connection for dataItem and synchronizes its configured properties from that record.
Creates a shape for dataItem and synchronizes its configured properties from that record.
Recreates the diagram items from the current shape and connection lists and synchronizes selection with the shape currency manager.
protected virtual void DataManagerItemChanged()
Reads the named data-member value through its property descriptor while the data layer is bound.
public object GetBoundValue(object dataBoundItem, string propertyName, PropertyDescriptorCollection properties)
The source record to read.
propertyNamestringThe member name configured for the diagram property.
propertiesPropertyDescriptorCollectionThe descriptors available for the source record type.
Returns:The member value. Returns null when the layer is unbound, the member is missing, or a non-enum getter throws. Enum-valued members are converted to their enum type.
Exceptions: ArgumentNullExceptionAn enum-typed member produces a null value, including when its getter throws.
Raises ItemDataBound after a source record has been synchronized with a diagram item.
protected virtual void OnItemDataBound(DiagramItemDataBoundEventArgs e)
The source record and synchronized diagram item.
Rebinds the current source before raising PropertyChanged for the changed data-layer property.
protected virtual void OnPropertyChanged(string propertyName)
The name reported to property-change subscribers.
Reinitializes binding for newDataSource, rebuilding diagram items when its shape or connection lists are available.
public void Rebind(object newDataSource)
The source that provides the shape and connection records.
Writes value to the named data member when the layer is bound and the member descriptor exists.
public void SetBoundValue(object dataBoundItem, string propertyName, object value, PropertyDescriptorCollection properties)
The source record to update.
propertyNamestringThe member name configured for the diagram property.
valueobjectThe value to write to the source record.
propertiesPropertyDescriptorCollectionThe descriptors available for the source record type.
If the layer is unbound, the member descriptor is missing, or its setter throws, this method does not report a failure.
Creates connection elements for records in items and adds successfully mapped connections to the diagram.
protected virtual void SetConnectiosPropetiesCore(IList items)
The connection records supplied by the bound list.
Creates shape elements for records in items and adds successfully mapped shapes to the diagram.
protected virtual void SetShapesPropertiesCore(IList items)
The shape records supplied by the bound list.
Events
Occurs after a source record has been synchronized with a diagram shape or connection.
public event DiagramItemDataBindingEventHandler ItemDataBound
Occurs after a data-layer property changes. Updating a binding member also rebinds the current data source.
public event PropertyChangedEventHandler PropertyChanged
Implements: