yFiles for Avalonia
Changelog

Changes of yFiles for Avalonia Release Candidate 1 - Changes Since EAP 3

Categories: Improvements Bug Fixes API Changes Behavior Changes

Improvements

  • Replaced Transform with ITransform in the public API for enhanced flexibility.
  • CanvasControl.ExportContent now returns a Control instead of a simple Visual.
  • CollapsibleNodeStyleDecorator's ButtonPlacement now supports arbitrarily rotated buttons instead of only paraxial buttons.
  • LabelStyle now supports a FontFeatureCollection that accepts a list of FontFeature objects to enable/disable specific OpenType typography features (e.g., ligatures, tabular numbers, small caps).
  • DropInputModes now supports predefined DataFormats like DataFormat.File. Constructors for DropInputMode and subclasses accept a DataFormat instead of a String, enabling file drag-and-drop functionality.
  • A drag preview has been added to the Drag&Drop support while dragging outside the CanvasControl.
  • Built-in hotkeys now automatically use the command (⌘) key instead of Ctrl on macOS in Desktop applications. To also customize this in cases where the automatic detection fails (notably WebAssembly applications) you can manually set the EventRecognizers.CommandModifiers property early in application startup.
  • The hotkeys for built-in commands, as configured in the respective resource files, now support a custom modifier named Shortcut, which uses the aforementioned EventRecognizers.CommandModifiers property and thus acts as expected on macOS where such hotkeys do not use Ctrl.
  • Ctrl+Click now opens a context menu on macOS.
  • During drag and drop operations the cursor now indicates whether it is valid or invalid to drop an item at the current location.
  • A public Cursors class facilitates a custom cursor styling by providing properties for the different cursors used by the different input modes.
  • LassoSelectionInputMode: an indicator highlights the region where a lasso selection can be finished.

Bug Fixes

  • Fixed an issue that caused the icon in IconLabelStyle to be positioned incorrectly.
  • Fixed a bug where the pen buttons StylusBarrel and StylusEraser were not correctly determined.
  • Fixed a bug which caused the cursor to change back to default when moved with the mouse button held down.
  • Fixed stylus support when running an application in a browser.
  • Fixed ImageNodeStyle not always using the image shape correctly for lasso selection testing. This could lead to nodes with ImageNodeStyle being selected by lasso selection although their image representation wasn't included in the lasso.
  • Fixed an issue that caused candidate indicators for edge labels to be rendered at the wrong position.
  • Fixed an issue that caused the TextBox for vertical text editing to be positioned incorrectly.
  • Fixed an issue that caused candidate indicator corners for edge labels to be rendered incorrectly on small boxes.
  • Fixed broken binding between key gestures and commands added via KeyboardInputMode.AddCommandBinding.
  • Fixed an exception when a key is pressed during a drag and drop operation.
  • Fixed GraphML serialization for styles and other non-structural elements.
  • Fixed an issue that caused an exception when setting LayoutExecutor.RunInThread to true in a WASM/browser.
  • Fixed a bug which prevented the PointerUp event from being dispatched for a StylusBarrel.
  • Fixed a NullReferenceException that occurred when a GraphControl was removed from its TopLevel while an animation was running.
  • The BendLocationChanged event now uses the correct value for the y coordinate of the oldLocation.
  • Fixed a bug which could cause an exception when rendering a CollapsibleNodeStyleDecorator.
  • Fixed MemoryImageNodeStyle.Clone() to create an independent copy instead of sharing internal style state with the original instance.
  • Fixed ShapePortStyle.Clone() to create an independent copy instead of sharing internal style state with the original instance.
  • Fixed a bug on Linux where modifier keys were not always correctly set on PointerEventArgs.

Incompatible API Changes

  • The convenience methods ExportToGraphML and ImportFromGraphML as well as the GraphMLIOHandler property have been removed from GraphControl. Applications should hold their own GraphMLIOHandler instance instead and use its Read and Write methods.
  • The (non-functional) commands Open, Save, and SaveAs have been removed from GraphCommands.
  • Class ComponentResourceKey has been removed. Usages thereof are now of type object.
  • CanvasContentHost.BackgroundBrushProperty, BackgroundBrush, PrimaryBrushProperty, PrimaryBrush, SecondaryBrushProperty, and SecondaryBrush have been removed.
  • The type of GraphControl's properties SelectionIndicatorManagerProperty, HighlightIndicatorManagerProperty, FocusIndicatorManagerProperty, GraphModelManagerProperty, SelectionProperty, HighlightsProperty, and ClipboardProperty has been changed from StyledProperty to DirectProperty which better matches their intended use.
  • The type of CanvasControl's properties ContentHostProperty, InputModeProperty, ZoomProperty, and ViewPointProperty have been changed from StyledProperty to DirectProperty which better matches their intended use.
  • The delegate CanExecuteCommandHandler has been renamed to CanExecuteCommandEventHandler and the source parameter has been removed.
  • The delegate ExecuteCommandHandler has been renamed to ExecutedCommandEventHandler and the source parameter has been removed.
  • The fields GraphCommands.MoveFocusBack and MoveFocusForward have been renamed to MoveFocusLeft and MoveFocusRight.
  • TextEditorInputMode.TextBoxStyleKey has been removed. Styling the TextBox for label editing can be done with Styles matching the yfiles-labeleditbox class.

Incompatible Behavior Changes

  • CanvasControl, GraphControl, and GraphOverviewControl no longer override the default value for the Template property and thus have no template if the yFiles Styles are not included in the application. This is consistent with other Avalonia controls, which are by default lookless and rely on the Styles to have a template.

Changes of yFiles for Avalonia EAP 3 - Changes Since EAP 2

Categories: Improvements Bug Fixes API Changes

Improvements

  • yFiles for Avalonia now supports Avalonia 12.
  • Added a custom non-native drag and drop support which supports drag and drop operations using Touch and Stylus, too. The DropInputMode, NodeDropInputMode, LabelDropInputMode, PortDropInputMode, and StripeDropInputMode provide static DoDragDropAsync methods to start the drag and drop operations.
  • Drag and drop operations supported by the drop input modes now require an IDataTransfer instead of the deprecated IDataObject. Static CreateDataTransfer methods faciltate the creation of an appropriate item.
  • The ToolTipInputMode.ToolTip property is now of type ToolTip instead of Popup.
  • The type of the CanvasControl.Projection property has been changed from Transform to ITransform. This makes it easy to e.g. apply TransformOperations to the projection.

Bug Fixes

  • ToolTips handled by the ToolTipInputMode now also works correctly when the application runs in the browser.

Incompatible API Changes

  • yFiles for Avalonia now requires at least Avalonia 12.0.0.
  • The drop input modes DropInputMode, ItemDropInputMode, NodeDropInputMode, PortDropInputMode, LabelDropInputMode, and StripeDropInputMode now require an IDataTransfer instead of the deprecated IDataObject.
  • The CollapsibleNodeStyleDecorator.CollapseButtonStyleKey field and ButtonStyle property have been removed. Styling the collapse button now works with regular Avalonia styling (via the yfiles-collapsebutton class) instead of ControlThemes.


Changes of yFiles for Avalonia EAP 2 - Changes Since EAP 1

Categories: New Features Improvements Bug Fixes

New Features

  • NodeControlNodeStyle allows for rendering nodes using Avalonia styles and selectors.
  • EdgeSegmentControlEdgeStyle allows for rendering edges using Avalonia styles and selectors.
  • LabelControlLabelStyle allows for rendering labels using Avalonia styles and selectors.
  • PortControlPortStyle allows for rendering ports using Avalonia styles and selectors.
  • StripeControlStripeStyle allows for rendering stripes using Avalonia styles and selectors.
  • Method ExportToBitmap on CanvasControl now allows to export the canvas as bitmap image.
  • The new PixelImageExporter class supports exporting a CanvasControl to a bitmap image.

Improvements

  • Added more demos and a better demo overview page.

Bug Fixes

  • Fixed an issue preventing focus indicator from being shown.
  • GroupNodeStyle's button which toggles the expansion state now reacts on first click.
  • The drop shadow of GroupNodeStyle is now placed correctly.
  • Theme colors now work properly, which affect the marquee rectangle, handles, as well as selection, focus, and highlight indicators.
  • Fixed distorted rendering of selection, focus, and highlight indicators when a projection is set on the GraphControl.
  • Fixed a possible exception in label rendering when the TextWrappingShape has been set to something other than Rectangle.
  • Fixed text wrapping into irregular shapes.
  • With the EdgeStyleIndicatorRenderer class, the bends of the intermediate edges that are used for rendering now correctly have the tag object of the corresponding original bend.
  • Key bindings (KeyboardInputMode.AddKeyBinding) now overwrite earlier added bindings.
  • After moving a folder node in closed state with orthogonal edge editing enabled, folding edges no longer get incorrect additional segments when the folder is expanded.