locked
Icons on workflow toolbox are blurred RRS feed

  • Question

  • Hi,

    I'm re-hosting the designer in my own application. But I surprisingly found the icons in the toolbox are blurred. Screenshot is upload here.

    It seems the toolbox is stretched, but the text is displayed correctly, only the icons are blurred. The screenshot was taken from one WF sample (WF_WCF_Samples\WF\Basic\DesignerRehosting\Basic\cs). The only change I made was making the toolbox list long enough, and assigning the same icon (16x16) to all the tools. You can find the sample codes here.

    Any idea what's going wrong? Is there any workaround available?

    Thanks so much!

    Donald



    Tuesday, April 26, 2011 10:08 AM

Answers

  • Hmm. What's going on? WPF doesn't always render things at integer pixel coordinates, and what you are seeing probably results from some non-integer offset or scaling happening. It could be this is actually a bug, if so, you can always file it on connect. It could also be sensitive to settings like what DPI your app is rendering at, which may be affected by Windows DPI setting etc.

    Assuming it's a bug, workarounds would probably involve modifying the WPF toolbox visuals somehow. ToolboxControl provides some Style and Template properties which you can customize, such as ToolTemplate and CategoryTemplate. I'm not sure what exact settings would help.

    Tim

    Thursday, April 28, 2011 11:47 PM