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
|
It appears that the flow diagram hijacks the Data property on Connections to use as a container for its labels. This means that I cannot associate my own data item (e.g. the Edge object flow my underlying Graph) with a connection. Can I turn this behavior off? Better yet, couldn't we keep Data as user data and have a Text or Label property for the label? Thanks, -Scott |
|
|
The intent is that you should be able to store rich data in the Data property. By default we use the Data directly as the label, but by restyling the connection you can have it use a subproperty as the label (or display no label at all). E.g. // assume Edge has a Description property Then in a custom connection template bind the label's Text to {Binding Data.Description}. If you need to combine data from multiple sources into the user Data property then you can create a custom type, e.g. ConnectionData, or I think you could even use an anonymous type e.g. connection.Data = new { Description = "Go this way", Edge = edge }. The impact of this is that in order to access subproperties you need to retemplate the connections, which can be a bit of an epic if you're not already doing so. We'd be happy to look at ways to improve this. In the meantime, one workaround might be to use a custom type and override ToString: public class ConnectionData { connection.Data = new ConnectionInfo(edge); I haven't tested this approach though. |
|