-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot assign property "Actions" #14
Comments
I have the same issue too. Using the sample from this repo, with Xamarin.Forms v2.5.1.527436, everything works like a charm. As soon as I update it to 3.0.0.446417 (in all the projects), I get the "Cannot assign property Actions" error (even after a clean & rebuild). |
Thanks for letting me know. I'll look into it. |
Same for me since few days and update. |
A temporary fix, to unblock people, is to explicitly declare an <ListView x:Name="listView" ItemsSource="{Binding People}">
<ListView.Behaviors>
<behaviors:EventHandlerBehavior EventName="ItemSelected">
<behaviors:ActionCollection>
<behaviors:InvokeCommandAction Command="{Binding ItemSelectedCommand}" Converter="{StaticResource SelectedItemConverter}" />
<behaviors:InvokeCommandAction Command="{Binding OutputAgeCommand}" Converter="{StaticResource SelectedItemConverter}" />
</behaviors:ActionCollection>
</behaviors:EventHandlerBehavior>
</ListView.Behaviors>
</ListView> In the meantime, I'll work on fixing this. |
This is now fixed, but I'm taking the opportunity to add a couple of extra bits of new functionality, so it'll be the end of the week before updated source code/NuGet is pushed live. |
This is now fixed in v1.4.0 of the NuGet package. |
Seems I was too hasty in my previous assertion, cleaning the project and restarting VS seems to have sorted things out |
Sorry, it seems that I can't get it work. Everything compiles, but the commands don't react to the events, e.g. the Appearing event doesn't fire the command I've bound to it. |
Have you get a small repo case for this (ZIP ideally)? |
I've just created two new projects:
In both cases I was able to install v1.4 of the Behaviors library, and use it to invoke commands in view models. Without a firm repo case there's nothing more I can do about this. |
I seem to be getting the same problem in a .NETStandard project with Xamarin Forms 3.2. I will post a repo reproducing the issue when I can. @sgrassie I have the same issue. Were you able to fix it? |
Hi,
I've been using Behaviors without a problem until Xamarin.Forms v3.0.
When I updated to Xamarin Forms v3.0, I got the below exception
MyView.xaml
MyViewModel.cs
The text was updated successfully, but these errors were encountered: