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.

有帮助吗?

解决方案

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top