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?
I have tried to set "Embedded resource" and "Resource" in properties of files in the
Resources folder, but without success.
I decided to use DrawingView from Maui.CommunityToolkit to create the same functionality. It will take less time than porting Xamarin.SignaturePad to MAUI.
How to use DrawingView: https://www.youtube.com/watch?v=7rw13_a5GR0
If you need to migrate your project, you need to update any incompatible NuGet packages. Xamarin.Controls.SignaturePad is not compatible in MAUI, you need to update this NuGet package. You can check this doc for changes in properties of files after Android migration.
Answered By – Dongzhi Wang-MSFT
Answer Checked By – Marilyn (Easybugfix Volunteer)