• 19.04.2024, 21:58
  • Registrieren
  • Anmelden
  • Sie sind nicht angemeldet.

 

Lieber Besucher, herzlich willkommen bei: Aqua Computer Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.

XAML help requested

Samstag, 28. Juli 2018, 21:18

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>

Dienstag, 31. Juli 2018, 10:20

Quellcode

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/

Dienstag, 31. Juli 2018, 21:27

Thank you very much.

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