Question

I have textblock like this

<TextBlock Text="BETA"
            FontSize="28"
            HorizontalAlignment="Right"
            VerticalAlignment="Center"
            Margin="0,17,420,271"
            FontFamily="Georgia">
    <TextBlock.RenderTransform>
        <RotateTransform Angle="20" />
    </TextBlock.RenderTransform>
    <TextBlock.Foreground>
        <LinearGradientBrush StartPoint="0,0"
                                EndPoint="0,24"
                                MappingMode="Absolute">
            <GradientStopCollection>
                <GradientStop Color="White"
                                Offset="0" />
                <GradientStop Color="Orange"
                                Offset=".2" />
                <GradientStop Color="DarkOrange"
                                Offset=".85" />
                <GradientStop Color="White"
                                Offset="1" />
            </GradientStopCollection>
        </LinearGradientBrush>
    </TextBlock.Foreground>
</TextBlock>

It won't render any text. If I remove the transform OR the brush then it works fine but both together won't render anything.

Was it helpful?

Solution

Removing Absolute as the mapping mode fixed my issue? Not sure why.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top