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, This is our last bullet before we are going to take a decision on Mindscape, your help is very critical for our decision making. So far so good :-) We just want to ensure the path itself is customizable before we move on and make the purchase. Our requirement is to implement Bezier connections (as seen in the attached image). Also see here for what I need (the first path): http://www.c-sharpcorner.com/UploadFile/mahesh/drawing-bezier-curve-with-beziersegment-in-xaml/ Should I implement the IPathBuilder? What are the segments, if I choose the linear path finder would i have one segment? Do you guys have an example on how to use the path builder? I couldn't find even one post in the forum on this, just bumped into it while googling. The implementation is quite straight forward if i understand it correctly but i couldn't understand how to assign it to the diagram. I need directions. Gilad |
|
|
Hi Gilad, Great to hear it's all good so far. Yes, the visualization of the connection paths can be customized, and you are correct in using IPathBuilder to do this. Segments are logical lines between two consecutive points along a connection route. (A connection route is the output of a Pathfinder). There is an extra Segment at the start of each connection though, so the StraightLinePathfinder will give 2 segments to each connection. Here is a very simplistic implementation of a BezierPathBuilder. (I never implemented one before and really wanted to have a quick try).
A good example of using path builders in your diagram can be found in ActivityDiagramStyle.xaml in the ActivityDiagrams demo. Near the end of the file will be a connection style. Connection styles are built up from a bunch of optional little bits - a style applied to the path itself to provide color, thickness, dash arrays and so on - templates to render visuals at each end of the connection such as arrowheads or diamonds - a path builder to take the output of a Pathfinder and create a visual geometry from it. All these bits are set on properties on a Connection style, and then that style is set on some kind of style selector, which is finally set on the DiagramFormatter - much like how node styles are provided. Follow the example in the ActivityDiagrams demo, but of course use the BezierPathBuilder. Please let me know if you have further questions about this and I'll help you out. -Jason Fauchelle |
|
|
Wow. That was super easy! Thank you so much! We will compare the out-of-the-box algorithms to Bezier and take a decision which one is the best for us. I'm happy to tell you that we are really impressed from your product. Out of the box the performance for a large diagram wasn't so good, although it was better than any other framework we evaluated (Infragistics, DevExpress, Telerik). We eventually applied late-realization techniques that use custom styles, a node style starts as an outline of our node, as the viewport changes we start adding more details to the nodes using the dispatcher in a priority that still keeps the diagram responsive. The affect is that the diagram is always responsive to the user such that the user can always pan, but the data doesn't necessarily shows up immediately. That's in highlevel, we dynamically decide on how we send it to the dispatcher which affectedly determines how late the realization would be. In addition we data-virtualized the connections, we noticed that this is your weakness point. If we give you all the connections in advance the performance drops drastically, so instead - we only add the connections as the viewport changes and we only do it for the nodes that are 'participating' in the viewport (either they are in the viewport or connect to a node in the viewport). I can understand certain concerns that you had to deal with. For example, if a 2 nodes are not 'participating' in the viewport but a connection connecting them crosses the viewport - you need to know it. But we don't care about it. For us, if neither of the 2 nodes are 'participating' in the viewport - we don't care about drawing connections between them. Anyways, your product is awesome! And it is 99% that we will go with Mindscape. Your responsiveness was crucial to out ability to take a decision. We were impressed from the support responsiveness which is super important to us as well. Once we conclude the experiment we will contact your sales department to make the purchase. We will make sure to mention your name as the one who helped us. THANK YOU SO MUCH. We might have more questions in the future so this is far from being a goodbye :-) Gilad |
|
|
Hi Gilad, Thanks for the kind words! It's great to hear that you're pleased with WPF Diagrams and our support. Thanks for all the feedback about how you improved performance at your end. I'll be around to help you with any questions you have in the future. -Jason Fauchelle |
|