Silverlight: Arabic Reversed?

Microsoft Silverlight is a cross-browser, cross-platform implementation of the .NET Framework for building rich interactive applications for the web. Support for Arabic and Bidi languages did not come for free. Microsoft added Bidi support starting version 4 but before that, there was no “official” support for Bidi languages (for example, Arabic, Hebrew). Today, thanks to the Silverlight Team, we now have that support.

First, a text rendering engine was added to display and handle Bidi text. This includes re-arranging the letters and numbers, in the case of Bidi, reversal of letters and keeping numbers as LTR. Then there are language specific features, like ligations (combining characters), diacritics (tashkeel). Silverlight handled both the display and cursor movement, across our controls, in addition to the underlying framework.

Second, Silverlight kept consistency with WPF and so added a FlowDirection property to implement the RTL layout of controls and UI elements. There are two values, FlowDirection = “RightToLeft” and FlowDirection=”LeftToRight” (the default). To host RTL Silverlight controls, you need to set FlowDirection =”RightToLeft”. You can set FlowDirection at the root level and it would be inherited in your other controls.

I got several cases where Arabic letters appear isolated and reversed in Silverlight, what is that about? Basically, some of Silverlight 3 or earlier components may still be functioning but these components lack RTL support. And so you get this unexpected behavior. The solution might be simply to rebuild the components in Silverlight 4.


More reference,