Material.Avalonia
Material.Avalonia copied to clipboard
InvalidCastException when opening dialogs in demo
When i try to open any of the dialogs in our demo i get following exception:
System.InvalidCastException: Unable to cast object of type 'Material.Dialog.ViewModels.Elements.Header.Icons.DialogIconViewModel' to type 'Material.Dialog.ViewModels.DialogWindowViewModel'.
at CompiledAvaloniaXaml.XamlIlHelpers.Material.Dialog.ViewModels.DialogWindowViewModel,Material.Dialog.DialogIcon!Getter(Object )
at Avalonia.Data.Core.ClrPropertyInfo.Get(Object target) in /_/src/Avalonia.Base/Data/Core/ClrPropertyInfo.cs:line 27
at Avalonia.Markup.Xaml.MarkupExtensions.CompiledBindings.InpcPropertyAccessor.get_Value() in /_/src/Markup/Avalonia.Markup.Xaml/MarkupExtensions/CompiledBindings/PropertyInfoAccessorFactory.cs:line 95
at Avalonia.Markup.Xaml.MarkupExtensions.CompiledBindings.InpcPropertyAccessor.SendCurrentValue() in /_/src/Markup/Avalonia.Markup.Xaml/MarkupExtensions/CompiledBindings/PropertyInfoAccessorFactory.cs:line 142
Reproducible in 633a075c, latest dev commit
Hi! This issue is fixed in 3.0 major update branch. Unfortunately I didnt configured CI package build for it. Download repository and build the project is required to try the update.
Fixed in 3.0.0-avalonia10-preview2