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
|
Jason, In my application, I'd like to support two styles of connections, one with solid line and one with dashed line. I tried to created a DiagramConnecitonStyleSelector by following the way to create ShapeNodeStyleSelector. But the styles are not applied to the connections. What could be wrong?
Best, Xiaochu |
|
|
From the source code, I found that the custom style won't be applied if the LineStyle is not null (which is true, because the default LineStyle is ElbowArrow). Then what is the best way to support what I wanted? Thanks! |
|
|
Hello Xiaochu Sorry for the confusion. The LineType + DiagramConnectionStyleSelector is a way to apply a style by setting a single property rather than creating lots of connection implementations that don't have any logical/functional differences. This is useful if your building an application that allows the user to apply whatever style they want to each connection. Since your 2 connection implementations are probably functionally different, what you are doing is correct, but all you need to do to get it working is change DiagramConnectionStyleSelector to TypeStyleSelector. -Jason Fauchelle |
|