What does it mean to have Arabic Support in Silverlight 4?

Really that means two things:

1)      Silverlight 4, now displays Arabic properly. On earlier versions, the characters were reversed and appeared in their isolated form. Now we finally have Arabic letters combined and shaped properly.

2)      Second, we have a new property specific for Arabic display. “FlowDirection” We kept a consistent behavior with WPF FlowDirection property. There are two values, FlowDirection = “RightToLeft” and FlowDirection=”LeftToRight” (as default). To host Arabic Silverlight controls, you need to set FlowDirection =”RightToLeft” You can set FlowDirection on the root level and it would be inherited in your other controls.

This is a sample of a Silverlight Arabic sample to display a welcome string and the calendar control:

<UserControl x:Class="SilverlightSampleApp.MainPage"






    d:DesignHeight="300" d:DesignWidth="400" xmlns:dataInput="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.Input" xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"



    <Grid x:Name="LayoutRoot" Background="White">


            <ColumnDefinition Width="188*" />

            <ColumnDefinition Width="212*" />



            <RowDefinition Height="74*" />

            <RowDefinition Height="226*" />


        <dataInput:Label Margin="10" Content =" مرحباً بكم." FontSize="22" />

        <controls:DatePicker Grid.Row="1" Grid.Column="1" Margin="40" Name="datePicker1" VerticalAlignment="Top" Width="120"  />




Want to see a nice video in action, then check http://silverlight.net/learn/videos/all/bidi-right-to-left/

Check the details below on how to download and start testing Silverlight 4 Beta.


Comments (0)

Skip to main content