MindFusion.Diagramming for WPF V4.0.0
Released: Nov 30, 2023
V4.0.0 버젼 업데이트
기능
- Model / view separation - Diagram is now considered a model class and must be displayed inside a DiagramView control. DiagramView contains a built-in ScrollViewer, so updating applications to this version should be a matter of replacing the old ScrollViewer with the new DiagramView, and using zoom, scroll and behavior properties of the view object instead of the diagram one.
- UI virtualization - DiagramView and ContainerNode now add UI elements to the WPF visual tree only for diagram items that are currently visible in their respective viewports. This should improve diagram's rendering / refresh speed.
- Spatial index - You can now set the Diagram 'EnableSpatialIndex' property to create an index of item positions for faster hit-testing and viewport clipping queries. When combined with UI virtualization, this should greatly improve user interaction and rendering speed for diagrams containing tens of thousands or more items.
- Multi-touch support - DiagramView now handles WPF touch messages and implements multitouch gestures that can be controlled via following properties:
- If MultiTouchZoom property is enabled (default), the view can be zoomed or panned using two-touch pinch / flick gestures.
- If MultiTouchModify property is enabled (default), diagram nodes can be moved, scaled and rotated using two-touch pinch / flick gestures.
- If MultiTouchZoom property is disabled, each touch draws diagram items corresponding to current behavior.
- If MultiTouchModify property is disabled, each touch started from a node draws a diagram link.
- Latter modes can be used for collaborative whiteboarding / classroom scenarios.
- Setting MultiTouchDraw to false lets you prevent drawing multiple items simultaneously, while keeping other multitouch gestures enabled.
- If MultiTouchDraw is enabled (default), a second touch will still cancel first-touch drawing if added within TouchGestureInterval time and TouchGestureDistance distance, and start a multi-touch gesture.
- Additional Diagram.TouchHitDistance property makes it easier to grab adjustment handles on touch screens, without increasing the AdjustmentHandlesSize value.
- Async serialization - Files can now be saved and loaded asynchronously.
- Miscellaneous
- PageMoved and PageRenaming events have been added to TabbedDiagramView.
- Different arrowhead shapes can now be filled with distinct brushes as set through HeadBrush, BaseBrush and IntermediateBrush.
- Added DiagramDocument JSON serialization methods.
- You can now selectively prevent adding or removing child nodes to/from a container by handling the ContainerChildAdding and ContainerChildRemoving events.
- FoldIconSize property has been added to ContainerNode.
- Added Clone methods of Diagram and DiagramDocument which return a copy of the diagram / document and its items.
- You can now set GridPatternHatch and GridPatternThreshold to replace alignment grid with hatch pattern at low zoom levels for faster drawing.
- Improved precision of baseline alignment in exported SVG texts.
- SvgNode parser now supports multiple class names in the "class" attribute of SVG elements.
- API changes
- Diagram should now be hosted inside DiagramView. For time being it can still be used as a standalone control, but support for this will be removed in a future release.
- Set Behavior, ZoomFactor, Scroll*, *ButtonActions properties of DiagramView instead of Diagram.
- Instead of setting Document property of Overview to a Diagram instance, set its DiagramView property.
- Instead of setting Document property of Ruler to a Diagram instance, set its DiagramView property. The latter is the default content property now. If you still need to show stand-alone diagram inside Ruler from Xaml, you must explicitly set it through <diag:Ruler.Document> tag.
- For consistency with other MindFusion diagram libraries, DiagramNodeAdapter has been renamed to ControlNode. Its UIElement property has been renamed to Control.
수정사항
- Miscellaneous
- Fix for ShapeNode.Clone not copying ImagePadding value.
- Fixed CreateImage results when called with Windows display scaling enabled.