title: WPF, TextBlock Rotation, Alignment Issues
body: <p><img src="https://i.stack.imgur.com/gNT6I.jpg" alt="enter image description here">I would like to rotate the TextBlock based on the text's center point [Horizontal and vertical). I have tried the following code. it is always taking topleft corner of the textblock. How to change it to center of the text itself.</p>
  
  <pre><code>&lt;TextBlock Name="textBlock1"  TextWrapping="Wrap" FontSize="25" Foreground="#FFF63AFF" FontWeight="Bold"&gt; 
  TextBlock 
     &lt;TextBlock.RenderTransform&gt;
         &lt;TransformGroup&gt;
             &lt;RotateTransform Angle="45" /&gt; 
         &lt;/TransformGroup&gt;   
     &lt;/TextBlock.RenderTransform&gt;  
  &lt;/TextBlock&gt;
  </code></pre>
  
  <p><strong><em>Image Description:</em></strong> Textblock is part of canvas and textblock should rotate based on the intersection as shown in the image</p>
  
  <p>I have tried HorizontalAlignment as well as VerticalAlignment too, actually it is taking parent's alignment details.</p>
  
  <p>Do I need to get the actual width and actual height, then based on that details calculate the center point?</p>