How does one enhance Silverlight WritableBitmap quality when replacing UIElements for animations
I'm doing an animation where I temporarily drop down the visibility of UIElement
s and overlay WritableBitmap
versions of the original Image
.
The problem I have is tha开发者_JAVA百科t when I do this on element with text, it results in a noticeably blurry and darker image meaning the switch from UIElement
to Image
is noticeable.
Has anyone experienced this and/or know how to deal with this issue?
For standard text rendering Silverlight uses ClearType. Unfortunatly, ClearType can not be used then rendering text into WritableBitmap. That is why you see the difference in text quality in your scenario. Btw setting CacheMode to BitmapCache or using pixel shaders will disable ClearType as well (see http://forums.silverlight.net/forums/p/109627/247959.aspx)
Since quality of the text rendered into WritableBitmap can not be improved the only solution I can think of is to reduce text rendering quality of your UI using one of the methods I mentioned above.
Have you considered adding
<param name="EnableGPUAcceleration" value="true" />
to the plug in object tag and
<xxxxx CacheMode="BitmapCache">
....
</xxxxx>
Where xxxxx
is the element which you would otherwise cover with a WritableBitmap
. Using this approach perhaps the WritableBitmap
would not be needed in the first place.
精彩评论