Material.Avalonia icon indicating copy to clipboard operation
Material.Avalonia copied to clipboard

InvalidCastException when opening dialogs in demo

Open SKProCH opened this issue 2 years ago • 1 comments

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

image

Reproducible in 633a075c, latest dev commit

SKProCH avatar May 09 '22 14:05 SKProCH

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.

appleneko2001 avatar Jun 02 '22 22:06 appleneko2001

Fixed in 3.0.0-avalonia10-preview2

SKProCH avatar Sep 27 '22 08:09 SKProCH