开发者

WPF not rendering properly

I'm I'm currently making a wpf c# app. I have some storyboards which animate some elements. Please look at the picture below:

WPF not rendering properly

This is my grid with some controls after it has been animated. Notice the improper rendering of the text and the rectangle. How can I solve this rendering?

UPDATE: Code request by Rachel:

<TextBlock Height="35.667" Margin="73.667,19,0,0" TextWrapping="Wrap" VerticalAlignment="Top" FontSize="32" Foreground="Black" Text="close" HorizontalAlignment="Left" Width="73.667" UseLayoutRounding="True"/>

    <Rectangle x:Name="BS2" Fill开发者_运维技巧="#FF0178D3" HorizontalAlignment="Left" Height="64.166" Margin="25,0,0,0" Stroke="Black" VerticalAlignment="Top" Width="30.667" StrokeThickness="0" UseLayoutRounding="True"/>


Have you tried testing it on several different machines? WPF can be sensitive to differences in graphics cards.


Try changing TextOptions.TextRenderingMode and see if that makes a difference. The results vary per machine.


try UseLayoutRounding and SnapsToDevicePixels = true

Edit:

I'm curios how does it look like when you do something like

<ScaleTransform ScaleX="1.01" ScaleY="1.01" />

Also you could try wrap it in some other panel (Canvas f.e.)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜