문제

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