Breaking Changes

Wiesław Šoltés edited this page Oct 30, 2018 · 24 revisions

0.6 -> 0.7

Reactive UI

  • Projects that use ReactiveUI framework will need to migrate to Reactive UI 9.0.1 which Avalonia now uses.


  • Existing TemplateBindings which specify Path= will stop working, as the Path property was removed and replaced with Property. Simply remove the Path= qualifier or change it to Property= if the path was a simple property
  • Existing TemplateBindings which don't bind to a simple property on the templated parent will need to be changed to regular Bindings with RelativeSourceMode.TemplatedParent



  • The Gap property has been renamed to Spacing to be consistent with UWP and other XAML frameworks.



  • BugFix: For the replace operation in the SelectedItems collection, AddedItems and RemovedItems members of the SelectionChangedEventArgs class had their contents switched.



Was moved to Application.Windows:


  • The DataValidatiorBase base class has been renamed to DataValidationBase.



  • The AndroidKeyboardEventsHelper<TView>.ActivateAutoShowKeybord method has been renamed to AndroidKeyboardEventsHelper<TView>.ActivateAutoShowKeyboard.



  • The KeyboardEventsHelper<TView>.ActivateAutoShowKeybord method has been renamed to KeyboardEventsHelper<TView>.ActivateAutoShowKeyboard.



  • The UseGtk3 method parameters changed to Gtk3PlatformOptions.



We have removed Avalonia.MonoMac, please use Avalonia.Native instead.


We have removed Avalonia.DotNetCoreRuntime, please use Avalonia.DesktopRuntime instead.


  • Renamed theme resource from ThemeBorderLightColor to ThemeBorderLowColor.
  • Renamed theme resource from ThemeControlLightColor to ThemeControlLowColor.
  • Renamed theme resource from ThemeForegroundLightColor to ThemeForegroundLowColor.
  • Renamed theme resource from ErrorLightColor to ErrorLowColor.
  • Renamed theme resource from ThemeBorderLightBrush to ThemeBorderLowBrush.
  • Renamed theme resource from ThemeControlLightBrush to ThemeControlLowBrush.
  • Renamed theme resource from ThemeForegroundLightBrush to ThemeForegroundLowBrush.
  • Renamed theme resource from ErrorLightBrush to ErrorLowBrush.
  • Renamed theme resource from ThemeBorderDarkColor to ThemeBorderHighColor.
  • Renamed theme resource from ThemeControlDarkColor to ThemeControlHighColor.
  • Renamed theme resource from ThemeControlHighlightDarkColor to ThemeControlHighlightHighColor.
  • Renamed theme resource from ThemeBorderDarkBrush to ThemeBorderHighBrush.
  • Renamed theme resource from ThemeControlDarkBrush to ThemeControlHighBrush.
  • Renamed theme resource from ThemeControlHighlightDarkBrush to ThemeControlHighlightHighBrush.



Changed both PixelHeight and PixelWidth into a PixelSize struct.


The constructor now requires the size to be provided using PixelSize and also a DPI. Use 96 as a default.


0.5.1 -> 0.6

BuildAvaloniaApp and previewer.

You now need BuildAvaloniaApp static method in the class with your entry point (typically in Program.cs or App.xaml.cs) which should be called from Main:

        static void Main(string[] args)

        public static AppBuilder BuildAvaloniaApp()
            => AppBuilder.Configure<App>()

Previewer won't be able to work without it.

DataContextChanging and DataContextChanged

They were replaced by OnDataContextBeginUpdate and OnDataContextEndUpdate

Static and Type markup extensions

They were replaced by standard x:Static and x:Type, add xmlns:x="" to the root of your XAML file.


StyleResource has been replaced by StaticResource and DynamicResource as in other XAML frameworks. StaticResource and DynamicResource in Avalonia search both Control.Resources and Style.Resources.

Mouse device

MouseDevice is no longer available from the global context, you need to obtain one from TopLevel (Window, Popup, etc). Call GetVisualRoot() in your control and cast it to IInputRoot.

var pos = (_control.GetVisualRoot() as IInputRoot)?.MouseDevice?.Position ?? default(Point);
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.