Click here to Skip to main content
15,879,535 members
Articles / Desktop Programming / XAML

Silverlight 1.1 Hebrew and Arabic Language Support

Rate me:
Please Sign up or sign in to vote.
4.05/5 (8 votes)
31 Jan 2008Ms-PL7 min read 44K   290   10  
An article presenting Silverlight 1.1 Hebrew and Arabic language support
<Canvas
	xmlns="http://schemas.microsoft.com/client/2007"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:JustinAngelNet_SilverlightRTL_RTL="clr-namespace:JustinAngelNet.SilverlightRTL.RTL;assembly=ClientBin/JustinAngelNet.SilverlightRTL.dll"
	x:Name="mainCanvas"  
    x:Class="SilverlightRTL.QuickStart.WithoutRTLExtenderPage;assembly=ClientBin/SilverlightRTL_QuickStart.dll"
	Width="1496" Height="624" Background="#FFFFFFFF">

	<Canvas.Resources>
		<Storyboard x:Name="Timeline1">
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="tbx1_canvas" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
				<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
				<SplineDoubleKeyFrame KeyTime="00:00:02" Value="359.591"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="tbx1_canvas" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
				<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
				<SplineDoubleKeyFrame KeyTime="00:00:02" Value="53.5"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="tbx1_canvas" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
				<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
				<SplineDoubleKeyFrame KeyTime="00:00:02" Value="1.265"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="tbx1_canvas" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
				<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
				<SplineDoubleKeyFrame KeyTime="00:00:02" Value="1.538"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="tbx1_canvas" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
				<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
				<SplineDoubleKeyFrame KeyTime="00:00:02" Value="62"/>
			</DoubleAnimationUsingKeyFrames>
			<PointAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="tbx1_canvas" Storyboard.TargetProperty="(Panel.Background).(RadialGradientBrush.GradientOrigin)">
				<SplinePointKeyFrame KeyTime="00:00:00" Value="0.5,0.5"/>
				<SplinePointKeyFrame KeyTime="00:00:02" Value="-0.202,-0.335"/>
			</PointAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="tbx1_canvas" Storyboard.TargetProperty="(Panel.Background).(Brush.RelativeTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
				<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
				<SplineDoubleKeyFrame KeyTime="00:00:02" Value="-0.209"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="tbx1_canvas" Storyboard.TargetProperty="(Panel.Background).(Brush.RelativeTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
				<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
				<SplineDoubleKeyFrame KeyTime="00:00:02" Value="-0.125"/>
			</DoubleAnimationUsingKeyFrames>
			<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="tbx1_canvas" Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
				<SplineColorKeyFrame KeyTime="00:00:00" Value="#FF000000"/>
				<SplineColorKeyFrame KeyTime="00:00:02" Value="#FF686868"/>
			</ColorAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Name="Timeline3">
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="tbx1_canvas" Storyboard.TargetProperty="(UIElement.Opacity)">
				<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
				<SplineDoubleKeyFrame KeyTime="00:00:02" Value="0.12"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
	</Canvas.Resources>
	<Canvas.Triggers>
		<EventTrigger RoutedEvent="Canvas.Loaded">
			<BeginStoryboard>
				<Storyboard x:Name="Timeline2">
					<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="tbx1_canvas" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
						<SplineDoubleKeyFrame KeyTime="00:00:00" Value="380.183"/>
					</DoubleAnimationUsingKeyFrames>
					<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="tbx1_canvas" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
						<SplineDoubleKeyFrame KeyTime="00:00:00" Value="8"/>
					</DoubleAnimationUsingKeyFrames>
					<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="tbx1_canvas" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
						<SplineDoubleKeyFrame KeyTime="00:00:00" Value="-4"/>
					</DoubleAnimationUsingKeyFrames>
				</Storyboard>
			</BeginStoryboard>
		</EventTrigger>
	</Canvas.Triggers>
	<Rectangle Width="468" Height="115.5" Fill="#FF040404" Stroke="#FF000000" Canvas.Left="620" Canvas.Top="16"/>

	<Rectangle Width="548.5" Height="477.5" Fill="#FFFFFFFF" Stroke="#FF000000" Canvas.Left="23.5" Canvas.Top="66" RenderTransformOrigin="0.5,0.5" >
		<Rectangle.RenderTransform>
			<TransformGroup>
				<ScaleTransform ScaleX="0.99999999999999978" ScaleY="1"/>
				<SkewTransform AngleX="0" AngleY="0"/>
				<RotateTransform Angle="0"/>
				<TranslateTransform X="0" Y="0"/>
			</TransformGroup>
		</Rectangle.RenderTransform>
	</Rectangle>

	<TextBlock Width="480" Height="108" Canvas.Left="624" Canvas.Top="16" TextWrapping="Wrap" Opacity="1" Text="hello world. שלום עולם. שלום עולם. hello world. שלום עולם.  שלום עולם. hello world. שלום עולם. שלום עולם. hello world. שלום עולם.hello world. שלום עולם. שלום עולם. hello world. שלום עולם.  שלום עולם. hello world. שלום עולם. שלום עולם. hello world. שלום עולם." x:Name="tbx2">
	<TextBlock.Foreground>
    <ImageBrush ImageSource="fire.jpg"/>
  </TextBlock.Foreground>

	</TextBlock>

	<TextBlock x:Name="tbx3" Width="342" Height="63" Canvas.Left="98" TextWrapping="Wrap" RenderTransformOrigin="0.5,0.5" Canvas.Top="1" FontFamily="Arial" FontSize="16"><TextBlock.RenderTransform>
			<TransformGroup>
				<ScaleTransform ScaleX="1" ScaleY="1"/>
				<SkewTransform AngleX="0" AngleY="0"/>
				<RotateTransform Angle="0"/>
				<TranslateTransform X="0" Y="0"/>
			</TransformGroup>
		</TextBlock.RenderTransform><Run Text="שלום עולם!"/><LineBreak/><Run Text="مرحبا عالم!"/><LineBreak/><Run Text="hello world!"/></TextBlock>

	<TextBlock TextWrapping="WrapWithOverFlow" Width="239" Height="104" Canvas.Left="579.5" Canvas.Top="474"><Run Text="שמי הוא Justin-יוסף Angel והדוא&quot;ל שלי הוא J@JustinAngel.Net"/><Run Text="."/></TextBlock>


	
	<TextBlock Width="464" Height="76" Canvas.Left="624" Canvas.Top="134" Foreground="#FF000000" TextWrapping="Wrap"><Run Text="שלום עולם. שלום עולם. hello world. שלום עולם.  שלום עולם. hello world. שלום עולם. שלום עולם. hello world. שלום עולם. hello world. "/><LineBreak/><Run Text=""/></TextBlock>
	
	<Canvas x:Name="tbx1_canvas" Width="480" Height="232" Canvas.Left="594" Canvas.Top="254.5" RenderTransformOrigin="0.5,0.5">
		<Canvas.RenderTransform>
			<TransformGroup>
				<ScaleTransform ScaleX="1" ScaleY="1"/>
				<SkewTransform AngleX="0" AngleY="0"/>
				<RotateTransform Angle="0"/>
				<TranslateTransform X="0" Y="0"/>
			</TransformGroup>
		</Canvas.RenderTransform>
		<Canvas.Background>
			<RadialGradientBrush>
				<RadialGradientBrush.RelativeTransform>
					<TransformGroup>
						<ScaleTransform ScaleX="1" ScaleY="1"/>
						<SkewTransform AngleX="0" AngleY="0"/>
						<RotateTransform Angle="0"/>
						<TranslateTransform X="0" Y="0"/>
					</TransformGroup>
				</RadialGradientBrush.RelativeTransform>
				<GradientStop Color="#FF000000" Offset="0"/>
				<GradientStop Color="#FFFFFFFF" Offset="1"/>
			</RadialGradientBrush>
		</Canvas.Background>
		<Rectangle x:Name="rectOverTbx" Width="496" Height="180" Stroke="#FF000000" Canvas.ZIndex="1000"/>

		<TextBlock Width="480" Height="156"  Foreground="#FF584FC6" Text="שלום עולם. hello world. שלום עולם. שלום עולם. hello world. שלום עולם.  שלום עולם. hello world. שלום עולם. שלום עולם. hello world. שלום עולם. שלום עולם. hello world. שלום עולם. שלום עולם. hello world. שלום עולם.  שלום עולם. hello world. שלום עולם. שלום עולם. hello world. שלום עולם.שלום עולם. hello world. שלום עולם. שלום עולם. hello world. שלום עולם.  שלום עולם. hello world. שלום עולם. שלום עולם. hello world. שלום עולם." TextWrapping="Wrap" RenderTransformOrigin="0.5,0.5" x:Name="textBlock">
			<TextBlock.RenderTransform>
				<TransformGroup>
					<ScaleTransform ScaleX="1" ScaleY="1"/>
					<SkewTransform AngleX="0" AngleY="0"/>
					<RotateTransform Angle="0"/>
					<TranslateTransform X="0" Y="0"/>
				</TransformGroup>
			</TextBlock.RenderTransform>
		</TextBlock>
	</Canvas>


	
	<Ellipse x:Name="btn1" Width="104" Height="32" Stroke="#FF000000" Canvas.Left="479" Canvas.Top="16.5" StrokeThickness="0"  MouseLeftButtonDown="btn1_MouseLeftButtonDown">
		<Ellipse.Fill>
			<LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
				<GradientStop Color="#FF3E5DE4" Offset="0.183"/>
				<GradientStop Color="#FFAABAFE" Offset="0.695"/>
			</LinearGradientBrush>
		</Ellipse.Fill>
	</Ellipse>

 
	
	<TextBlock Width="68" Height="21.25" Canvas.Left="515" Canvas.Top="16.5" Text="Click Me!" TextWrapping="Wrap"  MouseLeftButtonDown="btn1_MouseLeftButtonDown"/>


	
	<TextBlock Width="540.5" Height="475" Canvas.Left="31" Canvas.Top="68" TextWrapping="Wrap" x:Name="tbx4" FontFamily="Courier New" FontSize="15" FontWeight="Bold"><Run Text="שלום עולם 123.456. hello world 789.012. مرحبا عالم 123.456. hello world 789.012. שלום עולם 123.456. hello world 789.012. مرحبا عالم 123.456. hello world 789.012. שלום עולם 123.456. hello world 789.012. مرحبا عالم 123.456. hello world 789.012. שלום עולם 123.456. hello world 789.012. مرحبا عالم 123.456. hello world 789.012. שלום עולם 123.456. hello world 789.012. مرحبا عالم 123.456. hello world 789.012. שלום עולם 123.456. hello world 789.012. مرحبا عالم 123.456. hello world 789.012. שלום עולם 123.456. hello world 789.012. مرحبا عالم 123.456. hello world 789.012. שלום עולם 123.456. hello world 789.012. مرحبا عالم 123.456. hello world 789.012. שלום עולם 123.456. hello world 789.012. مرحبا عالم 123.456. hello world 789.012. "/><LineBreak/><Run Text=""/><LineBreak/><Run Text="hello world 789.012. مرحبا عالم 123.456. hello world 789.012. שלום עולם 123.456. hello world 789.012. مرحبا عالم 123.456. hello world 789.012. שלום עולם 123.456. hello world 789.012. مرحبا عالم 123.456. hello world 789.012. שלום עולם 123.456. hello world 789.012. مرحبا عالم 123.456. hello world 789.012. שלום עולם 123.456. hello world 789.012. مرحبا عالم 123.456. hello world 789.012. שלום עולם 123.456. hello world 789.012. مرحبا عالم 123.456. hello world 789.012. שלום עולם 123.456. hello world 789.012. مرحبا عالم 123.456. hello world 789.012. שלום עולם 123.456. hello world 789.012. مرحبا عالم 123.456. hello world 789.012. שלום עולם 123.456. hello world 789.012. مرحبا عالم 123.456. hello world 789.012. שלום עולם 123.456. "/><LineBreak/><Run Text=""/><LineBreak/><Run Text=""/><LineBreak/><Run Text=""/><LineBreak/><Run Text=""/></TextBlock>


	
</Canvas>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Microsoft Public License (Ms-PL)


Written By
JustinAngel.Net, Senior .Net consultant
Israel Israel
Justin-Josef Angel is a C# Microsoft Most Valuable professional, a Senior .Net consultant in Israel with 4 years of .Net experience and has 8 years of Web experience.

Justin's been working this past year on two Enterprise sized Silverlight projects with his customers. During that time he's gained a real-insight into Silverlight's inner workings and how to integrate Silverlight into the real world of software development. Additionally, During that time he's developed a few well-known projects like the "Silverlight 1.0 Javascript Intellisense", "Silverlight 1.1 Hebrew & Arabic Languages support" and a few others you might know.

Justin is also a seasoned presenter with an impressive track-record of talking in front of thousands of people in Israel.

Justin owns the first .Net blog written in Hebrew - http://www.JustinAngel.Net .
And he also owns an additional blog with mixed Hebrew & English content - http://blogs.Microsoft.co.il/blogs/JustinAngel.

A full list of his articles (all 100+ of them) can be found at: http://www.JustinAngel.Net/#index




Comments and Discussions