I am trying to port Xamarin code to MAUI, and do not understand how to fix this issue:
In Xamarin project, there are calls:
Resource.Id.background_image
Resource.Id.caption
Resource.Styleable.SignaturePadView
etc etc etc
I have copied resources from the Xamarin project.
And Xamarin project does not have other resources to transfer to MAUI project.
And In Xamarin project I can't inspect particular resources, names are displayed in grayed color and I can't ctrl+click to view them.
What I don't understand, how to deal with resource visibility issues:
Where are resources, related to Microsoft.Maui.Controls.Resource
namespace should be located in my case, and why they are not visible for my code?
===== UPDATE
I have tried to set "Embedded resource" and "Resource" in properties of files in the Resources
folder, but without success.
==== UPDATE #2
I decided to use DrawingView from Maui.CommunityToolkit to create the same functionality. It will take less time than porting Xamarin.SignaturePad to MAUI.
Documentation: https://learn.microsoft.com/en-us/dotnet/communitytoolkit/maui/views/drawingview
How to use DrawingView: https://www.youtube.com/watch?v=7rw13_a5GR0
1条答案
按热度按时间bt1cpqcv1#
如果您需要迁移您的项目,您需要更新任何不兼容的NuGet包。Xamarin。Controls。SignaturePad在MAUI中不兼容,您需要更新此NuGet包。您可以在this doc中检查Android迁移后文件属性的更改。