• 06.07.2026, 22:45
  • Register
  • Login
  • You are not logged in.

 

Dear visitor, welcome to Aqua Computer Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

InfoSeeker

Senior Member

XAML help requested

Saturday, July 28th 2018, 9:18pm

I am trying to display some text rotated 90 degrees, but not knowing XAML, my attempts have failed so far.
I am hoping one of the clever folks on this forum can provide direction.

From Googling, I believe I need to insert code similar to this:
<TextBlock>
<TextBlock.RenderTransform>
<RotateTransform Angle="90"/>
</TextBlock.RenderTransform>
</TextBlock>

But I have not been able to get the code syntax/placement correctly.

My current code is a slightly modified preset from the aquasuite:
<UserControl
x:Name="this"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="300">
<Grid>
<TextBlock
Text="Workload vs. Coolant Temp"
Opacity="1.0"
Height="Auto"
Width="Auto"
Foreground="#ffffffff"
FontSize="15"
FontFamily="Segoe UI"
FontWeight="Normal"
Margin="0,0,0,0"
Padding="0,0,0,0"
HorizontalAlignment="Center"
VerticalAlignment="bottom"/>
</Grid>
</UserControl>

sebastian

Administrator

Tuesday, July 31st 2018, 10:20am

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<UserControl
x:Name="this"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
xmlns:sys="clr-namespace:System;assembly=mscorlib"
mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="300">
<Grid>
<TextBlock
Text="Workload vs. Coolant Temp" 
Opacity="1.0"
Height="Auto" 
Width="Auto"
Foreground="Black"
FontSize="15"
FontFamily="Segoe UI"
FontWeight="Normal" 
Margin="0,0,0,0"
HorizontalAlignment="Center" 
VerticalAlignment="Top">
<TextBlock.RenderTransform>
<RotateTransform Angle="90"/>
</TextBlock.RenderTransform>
</TextBlock>
</Grid>
</UserControl>


You can also use an online xaml editor for build an layout:
http://yuvaltz.github.io/granularpad/

InfoSeeker

Senior Member

Tuesday, July 31st 2018, 9:27pm

Thank you very much.

Now I just have to repair my system which cratered on my Sunday. *sigh*