Skip to content

Fix issues #22 and #25 (duplicates)#28

Open
sdarveau wants to merge 1 commit intodavidbritch:masterfrom
sdarveau:master
Open

Fix issues #22 and #25 (duplicates)#28
sdarveau wants to merge 1 commit intodavidbritch:masterfrom
sdarveau:master

Conversation

@sdarveau
Copy link
Copy Markdown

@sdarveau sdarveau commented Apr 2, 2020

Use an ObservableCollection instead of custom BindableObjectCollection. Since we need to specify a template parameter, VS is enable to resolve it correctly.

  • update version number to 1.4.1

Use an ObservableCollection instead of custom BindableObjectCollection. Since we need to specify a template parameter, VS is enable to resolve it correctly.
+ update version number to 1.4.1
@gresolio
Copy link
Copy Markdown

gresolio commented Aug 14, 2020

Thank you very much sdarveau, your fix is very useful and working perfectly for a long time. It looks like davidbritch is very busy and doesn't have time to check new issues, so we have no choice but to solve them on our own.

I recently updated VS 2019 to version 16.7.1 (because of apple account login issues, now it works) and got the following xaml error:

A value of type 'InvokeCommandAction' cannot be added to a collection or dictionary of type 'ObservableCollection`1'.

2020-08-14 10_01_40 devenv i9Y02MBcA4

Everything is compiling and working just fine with your fix, but this new xaml error is annoying. I am quite new to Xamarin and currently don't know how to fix this by myself. Can you give me some advice? Or just point me in the right direction, how I can solve this issue. Thanks.

@sdarveau
Copy link
Copy Markdown
Author

Hi @gresolio, I'm working on VS for mac (version 8.7.3) so I can't relate. Have you imported the Behaviors project into your solution so you can modify the code and see the effect instantly? Don't forget to add a reference to this project.

@gresolio
Copy link
Copy Markdown

gresolio commented Aug 25, 2020

Yes, I'm using Behaviours source files in my solution, with your fix on top ActionCollection => ObservableCollection<IAction>, not a NuGet package.

Strangely enough, after "Build/Clean Solution" and manually deleting all temporary project files, this xml syntax error disappears for a while, but then appears again.

Functionally nothing broke, the project compiles and works as before, it's just an annoying syntax error in the xaml editor.

Thanks for the answer. Hopefully, I will find some solution.

@BOBx5
Copy link
Copy Markdown

BOBx5 commented Mar 9, 2021

Yeah this will solve the problem.

이미지 2

@gresolio
Copy link
Copy Markdown

gresolio commented Mar 9, 2021

Thanks @BOBx5, it looks like returnType: typeof(ObservableCollection<IAction>) does the trick :)

But I took a different path and completely got rid of the XAML: I gradually rewrote the entire UI to C# Markup.
Only positive impressions, I can recommend it 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants