Just like with GalleryItems in the XamRibbon, it seems that ContentPane cannot render an image in the tab without resizing (and thus blurring) it -- regardess of the original image size.
Am I wrong?
Let me try again to get someone to address this...
Using the following tag:
<
igDock:ContentPane Header="Map" Name="MapContainer" Image="Images/Views/Map.png" AllowClose="False">
I am unable to get the Image to render crisply. A 16x16 pixel image is getting resized to 21x21. If I point to a 21x21 image it gets resized to 27! Nothing looks good.
Can this be fixed?
It's possible that it's something about our template but I suspect that this is more an issue relating to the DPI of your image and/or your system. In WPF, logical pixels (which is how sizes are expressed) are in logical pixels (i.e. always 96 dpi) but if the system on which you are running is actually using a different device dpi (the ratio you list would seem to indicate you're running at 125dpi) then the image will be scaled. Another possibility is an issue like what Scott describes here. If you still have an issue and you do not see the same behavior when using the same image in a standard wpf Image element in your window then post a sample that demonstrates the issue along with your dpi info and we can look into it further.
That was it! Thanks for the link to Hanselman's post.
Why is this a problem only for Dock tab and Ribbon GalleryTool images? All my other ribbon images are "wrong" (72dpi) but render just fine.
Well one difference between those is that the tools in the ribbon have the Width and Height of the Image element explicitly set (to 16x16 or 32x32 depending on whether its showing a large image). However, the Image of the GalleryItemPresenter and the Image elements used in the xamDockManager do not have a hard coded Width/Height but instead are sized based on what the WPF Image element would measure which itself I believe is based on the pixel size of the image in its Source.