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
|
Hi, is there a way to specify the connection points' style based on the edge that we specified? |
|
|
Yes, this can be done. Firstly you need to create a custom node style. This gives you access to applying styles to the connection points. Based on the image you sent in your previous question, I think you may have already done this. Next, within a custom style applied to the connection point thumbs, there are 2 things you could do. 1) use a ContentControl and a custom made template selector to select a template based on the edge of the connection point. OR 2) use DataTriggers to bind to the Edge property, and use a setter to change the Template property of the ConnectionPointThumb. Let me know if you run into any trouble. - Jason |
|
|
Hi, I actually have a few custom nodes that I would like to apply different connection points style on it based on edge. Currently I am actually using the default node style provided by you, I just change the DataTemplate for each type of node. So, how can i apply different connections points style on each data template? Or I'll need to create full node style template in order to do that? |
|
|
Hello Creating a full node style with different connection point styles for each type of custom node would certainly solve your problem. It would be as easy as copy and paste, though this may generate a lot of code. Another possible way would be to go with the template selector approach that I mentioned. Create a template selector that selects a data template for an IDiagramConnectionPoint. Include various properties on the template selector that allows it to select a template for the connection point based on the IDiagramConnectionPoint.Edge property, and the IDiagramConnectionPoint.Connectable property. The Connectable property gives you access to the node instance (or connection instance) that the connection point belongs to. Next, within the style applied to the connection point thumbs, use this custom template selector to appropriatly change the visual appearence of the connection point. Regards |
|