xamarin MAUI项目和Microsoft Maui控件资源

1dkrff03  于 2022-12-07  发布在  其他
关注(0)|答案(1)|浏览(265)

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

bt1cpqcv

bt1cpqcv1#

如果您需要迁移您的项目,您需要更新任何不兼容的NuGet包。Xamarin。Controls。SignaturePad在MAUI中不兼容,您需要更新此NuGet包。您可以在this doc中检查Android迁移后文件属性的更改。

相关问题