AvaloniaUI / Avalonia.Xaml.Behaviors

Port of Windows UWP Xaml Behaviors for Avalonia Xaml.
MIT License
385 stars 46 forks source link

Using EventTriggerBehavior to bind the closed command doesn't work #139

Closed Zhou-Pixel closed 1 year ago

Zhou-Pixel commented 1 year ago

code

env: Avalonia.11.0.0 Avalonia.Xaml.Interactions.11.0.0.1

wieslawsoltes commented 1 year ago

Use CallMethodAction instead of InvokeCommandAction

Zhou-Pixel commented 1 year ago

Use CallMethodAction instead of InvokeCommandAction

I don't know how to use CallMethodAction, so I don't know if my code is correct

图片

图片

Still can't print "cmd close"

图片

wieslawsoltes commented 1 year ago

Use CallMethodAction instead of InvokeCommandAction

I don't know how to use CallMethodAction, so I don't know if my code is correct

图片

图片

Still can't print "cmd close"

图片

Do not set TargetObject

Zhou-Pixel commented 1 year ago

Use CallMethodAction instead of InvokeCommandAction

I don't know how to use CallMethodAction, so I don't know if my code is correct

图片 图片

Still can't print "cmd close"

图片

Do not set TargetObject

result

图片

xaml.cs

图片

xaml

图片

viewmodel

图片