I have a Longlistselector that is getting the text through data binding. My problem is I need it to be localized so it displays the right language, how is the right way to do it?
I tried the first way that came to my head, but I thought it doesn't work:
MainPage.cs
_UserAdBL.Add(new UserAdB("{Binding LocalizedResources.UsText01, Source={StaticResource LocalizedStrings}}"));
Any help will be appreciated, thanks!
If I understand you correctly, you want to get the value of the {Binding LocalizedResources.UsText01, Source={StaticResource LocalizedStrings}}
XAML binding in C#.
So use AppResources.UsText01
like so
_UserAdBL.Add(new UserAdB(AppResources.UsText01));
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.