anpin/ContextMenuContainer

Cannot resolve type "c:ContextMenuItem". error when using library inside listview

Closed this issue · 4 comments

You have already mentioned that

image

but I didn't know how to do it, currently I am having this error when trying to use the ContextMenuContainer inside ListView

Cannot resolve type "c:ContextMenuItem".

anpin commented

hi, have you added the namespace to your XAML file? You can do it as such
image

Hi @anpin

your fast response is very appreciated,

yes indeed I have added the namespace as mentioned by you, please find a minimal project attached to reproduce the issue

thanks again

App1.zip

anpin commented

Hi @Shaboo thanks for your effort. The issue was due to the fact that some code should be called from C# in order for custom XAML namespace to work as found here.

I pushed the update for that and updated documentation, so in oreder to fix it you need to update the package and call APES.UI.XF.ContextMenuContainer.Init(); in your App.xaml.cs.

I also noticed that the repro wasn't building after the fix cause of how you implemented commands, so I fixed your code too and you can find it below.
App1.zip

@anpin Thank you very much for your quick response, and your fixes for my example

your library is amazing