StephenH
StephenH

Reputation: 93

WPF Rotate Label but Full text not displaying

I am very new to WPF and hope someone can help with this?

I have a main window Height 450 and Width 300 and a Label which I wish to rotate through 270 so that it runs from bottom left to top left. The code for this is including the Grid is:

<Grid>
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="*"/>
        <ColumnDefinition Width="*"/>
    </Grid.ColumnDefinitions>
    <Grid Grid.Column="0">
        <Grid.RowDefinitions>
            <RowDefinition Height="100"/>
            <RowDefinition Height="100"/>
            <RowDefinition Height="100"/>
            <RowDefinition Height="100"/>
        </Grid.RowDefinitions>
    </Grid>
    <Label Grid.Column="0" x:Name="SidePanelTitle" Grid.ColumnSpan="2" Content="THIS IS A TEST ON TEXT LENGTH AND ROTATION AND DOES NOT SHOW THE FULL TEXT"
           HorizontalAlignment="Left" VerticalAlignment="Bottom" Width="450">
        <Label.RenderTransform >
            <TransformGroup>
                <RotateTransform Angle="270"/>
                <TranslateTransform X="0" Y="{Binding Path=ActualHeight, ElementName=SidePanelTitle}"/>
            </TransformGroup>
        </Label.RenderTransform>
    </Label>
</Grid>

My problem is that no matter what I try I cannot get the full text to show as it will only show as much text as will show when drawn HORIZONTALLY i.e. the Width of the main Window. What am I doing wrong? Thank you for any assistance.

Upvotes: 0

Views: 134

Answers (0)

Related Questions