title: How do you rotate the text in textblock in C# (Code-Behind)~~
body: <p>Basically I am currently doing final year project in my college whereby i am touching on surface 2.0 WPF. </p>
  
  <p>My project is a game whereby if a user answer a question wrongly,the next question will be rotated to make it more difficult. But I am unsure how to do it. I saw an example in msdn microsoft but it only shows XAML codes. I need the C# codes.</p>
  
  <p><strong>Here's the XAML example.</strong></p>
  
  <p><a href="http://msdn.microsoft.com/en-us/library/ms754028.aspx" rel="noreferrer">http://msdn.microsoft.com/en-us/library/ms754028.aspx</a></p>
  
  <p>The last example</p>
  
  <p><strong>Here's part of my validation codes. I need to activate the animation if user answer wrongly.</strong></p>
  
  <pre><code> if (surfaceRadioButton1.IsChecked == true)
  
  {
  
  user_answer = (string)surfaceRadioButton1.Content;
  
              textBlock2.Text = validateAnswer(user_answer, answer);
              retreiveYellowQns();
              if (textBlock2.Text.Equals("Correct"))
              {
                  yellow_coord = yellow_coord + 50;
                  Canvas.SetLeft(car, yellow_coord);
                  Canvas.SetTop(car, 289);
              }
              else
              {
                  if (yellow_coord &lt;= 330)
                  {
                      yellow_coord = 330;
                      Canvas.SetLeft(car, yellow_coord);
                      Canvas.SetTop(car, 289);
                  }
                  else
                  {
                      yellow_coord = yellow_coord - 50;
                      Canvas.SetLeft(car, yellow_coord);
                      Canvas.SetTop(car, 289);
                  }
              }
          }
  </code></pre>
  
  <p>Any Help will be glad,thanks in advance.</p>