This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hello Jason, I tried to affect a "default" value to the Data of a new created connection, in the e.NewItems of a connections Collection Changed Function called by its event, but my VS told me it's ReadOnly. Is there something specific to do to affect manually this data, at the creation of its connection? Thank you |
|
|
Hello Leon You will currently be referencing connections as IDiagramConnection. The interface does not have a setter on the Data Property, and some other properties too. We might change this in the future as currently it is a bit inconvenient, but for now you can do this by simply casting the IDiagramConnection object that you have into a DiagramConnection (Or whatever type of connection you are using in your diagram).
Using DiagramConnection in the iterator would probably be fine too, but only if all your connections are DiagramConnection or extensions of it - which they probably are, but keep this in mind if you ever create custom connections that don't extend DiagramConnection.
-Jason Fauchelle |
|
|
Thank you Jason, it works |
|