Shadow effect and blurry text

1.4k views Asked by At

I would like to add shadows outside tiles in my WPF application, but when I do, the text inside tiles is blurry. I tried this solution: WPF DropShadowEffect Causing Blurriness , but unfortunately shadow effect seems not to work at all. Are there any special attributtes in Rectangle which should be set? Could you give me some clues?

1

There are 1 answers

4
punker76 On BEST ANSWER

i got the same issue and solved this by using UseLayoutRounding="True"

EDIT

<Grid UseLayoutRounding="True" VerticalAlignment="Center" HorizontalAlignment="Center">

  <Grid.Effect>
      <DropShadowEffect ShadowDepth="0"
                        Color="Black"
                        BlurRadius="20" />
  </Grid.Effect>

  <!-- your content -->
  <Grid Background="White">
    <TextBlock Text="Test" FontSize="20" Margin="10" />
  </Grid>
</Grid>

results this

enter image description here

hope that helps