odalet
odalet

Reputation: 1419

Is there any way to determine text direction in a .NET Portable Library?

I'd like to retrieve the text direction for a culture in a PCL project, but I couldn't find CultureInfo.TextInfo.IsRightToLeft.

For information, I target:

This setup seems to be named Profile111. This is where my referenced assemblies are grabbed from by Visual Studio when I "go to definition". E.g.

C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile111\System.Globalization.dll

Anyone knows if there is another way to retrieve it with my PCL configuration, or at least, what platform I should remove in order to gain access to it?

Thanks

Upvotes: 1

Views: 107

Answers (1)

Anders Gustafsson
Anders Gustafsson

Reputation: 15981

If your concern is simultaneously supporting .NET, Windows 10 and Xamarin, you should consider switching the library to a .NET Standard profile.

.NET Standard 1.3 and higher all support CultureInfo.TextInfo.IsRightToLeft.

According to MSDN documentation, IsRightToLeft is only available on .NET and Universal Windows Platform (Windows 10), and there is no PCL profile that supports this particular platform sub-set. You are referred to .NET Standard profiles for this support.

Upvotes: 2

Related Questions