Chash of Button Command #17778
Unanswered
DanCadwellcs
asked this question in
Q&A
Replies: 1 comment
-
You bind you XAML to "FlipOnClickCommand" method (not a command!) which is private. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Describe the bug
System.MethodAccessException
HResult=0x80131510
Message=Attempt by method 'CompiledAvaloniaXaml.XamlIlTrampolines.AvaloniaAdvisor:AvaloniaAdvisor.ViewModels.MainViewModel+AppleOnClickCommand_0!CommandExecuteTrampoline(System.Object, System.Object)' to access method 'AvaloniaAdvisor.ViewModels.MainViewModel.AppleOnClickCommand()' failed.
Source=AvaloniaAdvisor
StackTrace:
at CompiledAvaloniaXaml.XamlIlTrampolines.AvaloniaAdvisor:AvaloniaAdvisor.ViewModels.MainViewModel+AppleOnClickCommand_0!CommandExecuteTrampoline(Object , Object )
at Avalonia.Data.Core.ExpressionNodes.MethodCommandNode.Command.Execute(Object parameter)
at Avalonia.Controls.Button.OnClick()
at Avalonia.Controls.Button.OnPointerReleased(PointerReleasedEventArgs e)
at Avalonia.Input.InputElement.<>c.<.cctor>b__32_9(InputElement x, PointerReleasedEventArgs e)
at Avalonia.Reactive.LightweightObservableBase
1.PublishNext(T value) at Avalonia.Interactivity.EventRoute.RaiseEventImpl(RoutedEventArgs e) at Avalonia.Interactivity.Interactive.RaiseEvent(RoutedEventArgs e) at Avalonia.Input.MouseDevice.MouseUp(IMouseDevice device, UInt64 timestamp, IInputRoot root, Point p, PointerPointProperties props, KeyModifiers inputModifiers, IInputElement hitTest) at Avalonia.Input.MouseDevice.ProcessRawEvent(RawPointerEventArgs e) at Avalonia.Threading.Dispatcher.Send(SendOrPostCallback action, Object arg, Nullable
1 priority)at Avalonia.Controls.TopLevel.HandleInput(RawInputEventArgs e)
at Avalonia.Win32.WindowImpl.AppWndProc(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam)
at Avalonia.Win32.WindowImpl.WndProcMessageHandler(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam)
at Avalonia.Win32.Interop.UnmanagedMethods.DispatchMessage(MSG& lpmsg)
at Avalonia.Win32.Win32DispatcherImpl.RunLoop(CancellationToken cancellationToken)
at Avalonia.Threading.DispatcherFrame.Run(IControlledDispatcherImpl impl)
at Avalonia.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken)
at Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.StartCore(String[] args)
at Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.Start(String[] args)
at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime(AppBuilder builder, String[] args, Action`1 lifetimeBuilder)
at AvaloniaAdvisor.Desktop.Program.Main(String[] args) in D:\DevelopStorage\Code\AvaloniaAdvisor\AvaloniaAdvisor.Desktop\Program.cs:line 12
To Reproduce
AvaloniaAdvisorSend.zip
Expected behavior
Run the program. Click on either button, it should bring you to the MV. Instead it chashes..
Avalonia 11.2.2 ComunityToolkit.MVVM 8.40
I am happy yo discuss it further.
Avalonia version
11.2.2
OS
No response
Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions