Silverlight Radian Rotation in VB.NET

In this article you will learn about the Radian Rotation in silverlight.
  • 1671

 Radian RotationAs you learn in my previous article Silverlight provides the four transform classes which is used for transformations. All of them can be grouped into a single TransformGroup to apply multiple transformations to a single object. A Transform defines how to map, or transform, points from one coordinate space to another coordinate space.

Now we talk about the Degree Radian Rotation its very important when we go to use the Degree Radian Rotation because while Blend/XAML will take angular measurements in degrees, any rotations you do via trigonometric functions will give you radians, and you will get unexpected results if you forget to convert between the two units.

Example of Radian Rotation

<UserControl x:Class="SilverlightApplication20.MainPage"
    d:DesignWidth='640' d:DesignHeight='480'>
        <Storyboard x:Name="MoveTimer" Duration="00:00:00.03"/>
    <Canvas x:Name="LayoutRoot" Width="800" Height="600">
            <LinearGradientBrush EndPoint="0.3,1" StartPoint="0.4,0">
                <GradientStop Color="AliceBlue" Offset="0.009"/>
                <GradientStop Color="#FF000000" Offset="1"/>
        <Ellipse Height="150" Width="150" Stroke="Red" Canvas.Left="223" Canvas.Top="73"x:Name="one"/>
        <Ellipse Height="150" Width="150" Stroke="Yellow" x:Name="two" Canvas.Left="223"Canvas.Top="293"/>
        <TextBlock Text="Degrees: 0" TextWrapping="Wrap" Canvas.Top="133" Canvas.Left="98"Foreground="#FFFFFFFF" Width="118.695" 
="27" x:Name="MsgDegrees"/>
        <TextBlock Text="Radians: 0" TextWrapping="Wrap" Foreground="#FFFFFFFF"Width="118.695" Height="27" x:Name="MsgRadians" 
="98" Canvas.Top="377"/>

Output Window



Hope this article would help you understand how to Perform Radian Rotation in Silverlight.


More Articles

© 2020 DotNetHeaven. All rights reserved.