FlowChart.NET version 7 contains the following new features and improvements -
Multi-touch supportDiagramView now handles Windows 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.
AnimationsThe Animate method of DiagramItem can run following animations:
- FillColorAnimation animates the fill color of nodes or link arrowheads.
- StrokeColorAnimation animates the color of node borders or link segments.
- OpacityAnimation animates items' opacity for fade-in and fade-out effects.
Following animations can be applied to DiagramNodes:
- BounceAnimation animates vertical position of nodes.
- ShakeAnimation animates horizontal position of nodes.
- PulseAnimation animates node's local scale factor.
- PathAnimation moves nodes along specified path.
The Animate method of DiagramView can run following animations:
- ScrollAnimation animates the scroll position of a view.
- ZoomAnimation animates the zoom factor of a view.
diagramView.Animate(
new ScrollAnimation(
new AnimationOptions
{
FromValue = new PointF(0, 0),
ToValue = new PointF(100, 60),
AnimationType = AnimationType.Power,
EasingType = EasingType.EaseInOut
}));
Item's animated values are considered transient and do not change actual property values. If you want to assign last value from animation to actual property such as Bounds or Opacity, set the KeepLastValue flag in AnimationOptions:
node.Animate(
new PathAnimation(new List<PointF>
{
new PointF(30, 30),
new PointF(50, 30),
new PointF(75, 66),
new PointF(125, 88)
},
new AnimationOptions
{
KeepLastValue = true
}));
Other AnimationOptions properties include Duration, Repeat, RepeatCount, From/To values, animation curve and easing options:
node.Animate(
new OpacityAnimation(
new AnimationOptions
{
FromValue = 1,
ToValue = 0.5,
Duration = 222,
Repeat = true,
RepeatCount = 4,
Reverse = true,
AnimationType = AnimationType.BackBow
}));
View animations are not transient and always set the Scroll* or ZoomFactor properties. Item and view animations that affect different properties can run simultaneously.
Async serializationFiles 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.
- async SaveToFileAsync and LoadFromFileAsync methods of Diagram and DiagramDocument implement serialization in binary format.
- async SaveToXmlAsync and LoadFromXmlAsync methods of Diagram and DiagramDocument implement serialization in XML format.
- async SaveToJsonFileAsync, SaveToJsonAsync, LoadFromJsonFileAsync, LoadFromJsonAsync methods of Diagram and DiagramDocument implement serialization in JSON format.
Paged viewPagedDiagramView offers an alternative way to display DiagramDocument objects (along with TabbedDiagramView). The diagram pages are arranged vertically in a shared scrollable range. The distance between pages can be set via PageSpacing property. If pages are of differing widths, you can align them horizontally using the PageAlignment property. Apart from using scrollbars, users can also change pages by clicking navigation buttons at the bottom of the view. The navigation bar can optionally display buttons for adding and removing pages, as specified by ShowAddButton and ShowRemoveButton properties. The control raises PageAdding and PageRemoving validation events to confirm the operations. If validated, there are PageAdded and PageRemoved events raised. If the AllowRenamePages property is enabled, users can edit the Title of a DiagramPage by double clicking the label in navigation bar. The PageRenamed event is raised to notify the application when page is renamed.
Offscreen printingDiagrams can be printed without showing them in diagram views on forms, or opening forms altogether, by means of DiagramPrinter and DiagramDocumentPrinter. The former lets you print a diagram assigned to the Diagram property, while the latter prints a DiagramDocument assigned to its Document property.
Miscellaneous- Enable the Overview.AllowZoom property to let users zoom the diagram view by resizing overview's viewport tracker rectangle.
- BorderColor and BorderWidth properties added to DiagramView.
- SvgNode parser now supports multiple class names in the "class" attribute of SVG elements.
- DiagramDocument JSON serialization methods.
- Clone methods of Diagram and DiagramDocument return a copy of the diagram / document and its items.
If anyone is interested in trying the beta version, please download this archive containing updated assembly files -
https://mindfusion.eu/_beta/diag_win_7.zipAny comments, questions and general feedback are welcome.