質問

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