.NET Framework 4 in WPF not showing bitmap effect
Posted
by Adrian
on Stack Overflow
See other posts from Stack Overflow
or by Adrian
Published on 2010-05-19T04:33:48Z
Indexed on
2010/05/19
4:40 UTC
Read the original article
Hit count: 389
I am having a problem using VS2010 and framework version 4 with bitmap effects. If I have the code below and run it in a WPF application using the .NET Framework 4 Client Profile, the bitmap effect does not appear. If I set the framework version to .NET Framework 3.5 Client Profile (and change no code), it runs as expected. At first, I thought it was a problem in my application, but I removed the code and put it in a separate standalone application and it behaves the same. Anyone else verify that the same problem happens?
What is happening here?
The version 4 framework in VS2010 just seems to ignore the bitmap effect.
<Window.Resources>
<Style x:Key="SectionHeaderTextBlockStyle" TargetType="{x:Type TextBlock}">
<Setter Property="FontFamily" Value="Segoe UI"/>
<Setter Property="FontSize" Value="18"/>
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="Foreground" Value="LightGreen"/>
<Setter Property="BitmapEffect">
<Setter.Value>
<OuterGlowBitmapEffect GlowColor="Black" GlowSize="3" />
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
<Grid VerticalAlignment="Center" HorizontalAlignment="Center">
<TextBlock Text="Contact Details" Style="{DynamicResource SectionHeaderTextBlockStyle}"/>
</Grid>
© Stack Overflow or respective owner