In This Article

Converting to v25.2

New .NET Target

Updated the .NET target from .NET 6 to .NET 8 since the former is out of support.

Avalonia Dependency

Updated the minimum Avalonia dependency from v11.2.0 to v11.3.0.

ChromedTitleBar and WindowTitleBar

The ChromedTitleBar control's tight Window integration was limiting the ability to use the control in scenarios where integration with a Window was not desired. To improve usability, the control was split into a base ChromedTitleBar primitive control with all the core functionality and the derived WindowTitleBar control that is designed to integrate with a Window. ChromedTitleBar was also moved to the Primitives sub-namespace.

To enable more usage scenarios, the Maximize and Restore caption buttons are implemented as distinct controls instead of a single control that toggled between the two states. A new IsRestoreButtonAllowed property has been added to control availability of the Restore caption button that appears in the minimized or maximized window states.

In this release, the macOS operation system joins Windows in support for extending into the native title bar area. This capability is enabled by default. To restore the original functionality on macOS, set WindowTitleBar.CanConfigureWindowClientArea to false.

The following updates should be made for ChromedTitleBar:

  • Replace ChromedTitleBar with WindowTitleBar everywhere that integration with the parent Window is desired.
  • If not integrating with the parent Window, continue to use ChromedTitleBar with the updated ActiproSoftware.UI.Avalonia.Controls.Primitives namespace.

The following updates should be made for any custom types that derive from ChromedTitleBar:

  • Derived types that integrate with Window should be updated to derive from WindowTitleBar instead of ChromedTitleBar.
  • Derived types that do not integrate with Window should continue to derive from ChromedTitleBar and remove the IsIntegratedWithParentWindow override that is no longer necessary.
  • The virtual OnClose, OnMinimize, OnToggleMaximized, and OnToggleFullScreen methods have be replaced with related ICommand properties (e.g., CloseCommand and MaximizeCommand). Any custom logic previously associated with method overrides should be encapsulated as an ICommand and assigned to the corresponding property. The DelegateCommand<T> class is helpful in this regard.

Finally, the following updates may be necessary when using either ChromedTitleBar or WindowTitleBar.

  • If IsMaximizeButtonAllowed is set to false, the IsRestoreButtonAllowed typically should also be set to false.
  • The AllowWindowDragOnPointerPressed property has been renamed as CanDrag.
  • A default context menu has been added that is displayed when right-clicking the title bar or left-clicking the Icon. If a context menu is not desired, set HasDefaultMenu to false.
  • If the LeftContent property was used to add an icon, consider migrating to the new Icon property instead.
  • The Content property of WindowTitleBar is, by default, bound to the Title of the parent Window. If the default title is not desired, explicitly set the Content to null.

ChromedTitleBar Caption Buttons

ChromedTitleBar will now alter the appearance of its caption buttons based on the current platform: Windows, macOS, or Linux.

Bars MVVM Tag Property

To simplify storing user-defined data with Bars view models without the need to create custom derived classes, each view model has a new Tag property exposed using the IHasTag interface. The existing IBarGalleryItemViewModel interface was updated to also import the new IHasTag interface, so this is a breaking change for any user-defined types that implement IBarGalleryItemViewModel directly without deriving from BarGalleryItemViewModel<T>.

The following updates should be made to any class that implements IBarGalleryItemViewModel:

  • Add a declaration and implementation for the IHasTag.Tag property.

Theme Generator Updates

The ThemeGenerator.GetBrushResource method was updated to return IBrush instead of Brush.