The list below describes recent changes and additions to MindFusion Pack for WPF:
New in 2024.R2
Diagramming for WPF
Custom anchor point / pattern classes
The control now supports serialization of custom AnchorPoint and AnchorPattern -derived objects. Call the RegisterClass method to specify XML or JSON type identifiers of the custom classes. Override SaveToXml and LoadFromXml to serialize custom properties in XML format. Override SaveToJson and LoadFromJson to serialize custom properties in JSON format. Custom classes must also implement no-argument and copy constructors.
Miscellaneous
Spreadsheet for WPF
- Set the ShowLeadingApostrophes property to stop hiding escaping leading apostrophe (used to treat remaining cell content as text).
New in 2024.R1
.NET 8 support
The MindFusion.WPF Pack distribution now includes assemblies and sample projects for .NET 8. Locally installed assemblies do not appear automatically in Visual Studio toolbox at this time; you can either add them manually or through Nuget package manager.
Diagramming for WPF
UI virtualization improvements
NodeListView improvements
- The IconSize property specifies the size of node icons displayed by NodeListView.
- DefaultNodeSize specifies default size of nodes created by dragging from NodeListView.
- Fix for NodeListView not drawing supplementary labels.
- Fixed NodeListView exception when hosted in a third-party accordion control.
ItemLabel improvements
- Item labels can now by styled using global styles whose TargetType is set to NodeLabel or LinkLabel.
- ItemLabel JSON serialization fixes.
- Fixed exception when EnableWrap is set without specifying label's MaxWidth.
- Fixed label hit-testing when spatial indexing is enabled.
- Fix for DiagramLink in-place editor opening at incorrect position.
- RemoveLabel now automatically repaints the node.
Drag-and-drop improvements
Miscellaneous
New in 2023.R2
Diagramming for WPF
Model / view separation
Diagram is now considered a model class and must be displayed inside DiagramView control. DiagramView contains a built-in ScrollViewer, so updating applications to this version should be a matter of replacing old ScrollViewer with new DiagramView, and using zoom, scroll and behavior properties of the view object instead of diagram one.
For compatibility with legacy code, Diagram still inherits from Control and can be used on its own for time being, but following new features are only available through the new DiagramView class. In addition, view-related properties of Diagram, such as ZoomFactor, Scroll position, Behavior, are now marked as obsolete and will display compile warnings when used.
UI virtualization
DiagramView and ContainerNode add UI elements to WPF visual tree only for diagram items they are currently visible in respective viewports. This should improve diagram's rendering / refresh speed.
Note that rendering speed improves only when showing a smaller part of the diagram inside DiagramView's viewport. Rendering a lot of items at small zoom levels or in overview's fit-all mode will still need a lot of processing, so you might want to apply constraints on minimal zoom level of diagram view and overview controls for large diagrams.
Spatial index
Set the EnableSpatialIndex property of Diagram 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.
C#
Copy Code
|
---|
// create 20000 links + nodes in total for (int i = 0; i < 10000; i++) { var node = diagram.Factory.CreateShapeNode(x, y, size, size); node.Text = i.ToString(); if (x > diagram.Bounds.Left) { diagram.Factory.CreateDiagramLink( diagram.Nodes[i - 1], diagram.Nodes[i]); }
x += dist; if (x >= diagram.Bounds.Right) { x = diagram.Bounds.Left; y += dist; } }
diagram.EnableSpatialIndex = true; |
Multi-touch support
DiagramView handles WPF touch events 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 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. Async methods create a copy of the diagram to process it in a worker thread, and custom item classes must implement Clone method or copy constructor in order to serialize them as expected.
Miscellaneous
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.
Spreadsheet for WPF
Virtual Keyboard for WPF
- Fix for AltGr grapheme generation not working in some applications.
Scheduling for WPF
- AppointmentForm now accepts return keys in description field to create new lines.
- AppointmentDeleted property added to AppointmentForm.
- Appointment form arrow bitmaps replaced with vector ones.
New in 2023.R1
Diagramming for WPF
DiagramLink improvements
- The Rotate text style of links now honors TextTrimming property, trimming long labels at segment ends.
- Link crossing decorations are now also drawn over a control point if it is collinear with adjacent control points.
- The ValidateLinkCrossing event validates visibility of individual link crossing point decorations.
- Fix for missing segment joints when drawing thick links with LinkCrossings enabled.
SVG improvements
- Fix for hyphens offsetting text vertically in exported SVG.
- FromFile and FromStream static methods added to SvgContent let you load SVG drawings with less code.
- SvgContent path parser fixes for missing delimiters and S commands.
- Fixed SVG sub-path rendering in SvgNode.
- Improved text positioning for nodes with large fonts in exported SVG files.
- SvgNode stroke thickness fixes.
VirtualizingDiagram improvements
Miscellaneous
- Fix for NodeLabel not rendering with small font size when including some punctuation symbols.
- Fix for Arrange method of ContainerNode not applying layout.
- Arrange method of ContainerNode now adds offset for CaptionHeight; adjusting for caption through layout's Margins is no longer necessary.
- New CopySelection overload lets you copy a list of items without selecting them.
- TableNode now displays the tooltips of its row anchor points.
- TableNode now clips anchor points of rows scrolled outside current table viewport.
- Fixed ChangeItemCmd exception when saving DiagramLink properties.
- MoveShades mode no longer resets custom Opacity values to 1 after the interaction.
Spreadsheet for WPF
- Fixed ExcelExporter exception when exporting validations with null message texts.
- Fixed ExcelExporter export of quoted texts.
Reporting for WPF
- Fix for applying font attributes through style resources.
Virtual Keyboard for WPF
- The RepeatDownOnly property specifies whether keys repeat only key-down events, or pairs of down and up events.
Scheduling for WPF
Localization
Localization support has been added to MindFusion.Scheduling built-in forms. All captions and control values can be customized by setting the corresponding property of the
LocalizationInfo class. The localization data can also be exported to and loaded from XML. For additional information, refer to
Localization.
Distribution now includes localization files for the following languages:
- Chinese
- Dutch
- French
- German
- Italian
- Japanese
- Korean
- Polish
- Portuguese
- Spanish
- Turkish