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, We used your components (WPF diagram 3.0) to create a diagram designer that is integrated in our toolsuite. It works perfectly so we just renewed our subscription. We updated to latest version without any problem (it is great, many times we are facing issues with other components). Our users want now to have custom shapes for nodes. We took a look at the sample however our application is slightly different because nodes are dynamically loaded at runtime. We have standard nodes and we can create custom nodes on demand for customers or to extend the application without recompiling the whole application. How can we customize shapes for the new nodes ? Thanks, Julien |
|
|
Hi Julien, So you want the users to be able to control/define the shape of a particular node? To do this, you'll need a new node (or perhaps your existing custom node implementation) to store the definition of the shape in its' model. The template for the node would then need to listen to changes in the model to update its' UI, which would probably be best as a Path element. I hope that helps you getting started. Let me know if you have further questions. -Jason Fauchelle |
|
|
Hi Jason, Not exactly. We (not the customer) are creating new nodes that we can add as plugins to the application by just adding the assembly to the folder and changing a row in configuration file. Customer don't have to create/change nodes or their shape. They just want to be able to identify them easily in the diagram. We want to be able to get the node from the assembly we load (done, it works), but also its shape. However, we don't find a way to dynamically define the template for the node (a property is less effective than a ressource file / datatemplate combination). Julien |
|
|
Hi Julien, Unfortunately I don't know anything about loading in classes/resources from an assembly dropped into a folder. The look of a node is controlled by the NodeTemplate property of a node style. Styles are selected with the node-style-selector that is held by the diagram formatter. I've never tried, but you should be able to dynamically add styles to the selector within the formatter for them to be picked up when rendering new types of nodes. Or, the approach I mentioned previously about storing the shape information in the model of the node could still work - and then have a template that renders a shape based on the model. Let me know if I'm still not helping with the actual problem. If at all possible, sending me a repro project would be a huge help for me to provide assistance. -Jason Fauchelle |
|