Hello,
After testing, using Resx files in MAUI's Class Library is basically the same as the steps in this document. All you need to do is set the Access Modifier for the basic resource file to public
.
After that, you can refer to the following code to reference the resource files in the library.
<ContentPage xmlns="
xmlns:local="clr-namespace:MauiLib1;assembly=MauiLib1">
<Label
Text="{x:Static local:AppResources.AddButton}"
Style="{StaticResource Headline}"
SemanticProperties.HeadingLevel="Level1" />
Best Regards,
Alec Liu.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.