hello,
I posted this issue earlier, but nobody replied, so I'm gonna try it again.
when I'm using a viewbox as part of the imagebrush, my imageproperties are set to 72dpi. When the imagebrush is rendered, it get's resized to 96dpi. This makes the image quite blurry. Can I prevent this from happening For example by defining the rendering dpi-size of the viewbox
Need this very badly,
Kimme

Viewbox automatic resizing
ryanlcs
XAML...
<Grid>
<Rectangle
x:Name="image"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Width="300"
Height="300">
<Rectangle.Fill>
<ImageBrush
AlignmentX="Left"
AlignmentY="Top"
TileMode="None"
Stretch="None"
Viewbox="490,362,300,300"
ImageSource="buitenland72.png"
>
</ImageBrush>
</Rectangle.Fill>
</Rectangle>
</Grid>
Leif Greenman
Hi Kimme,
If your using the default ImageBrush values, then it sounds like the problem your running into is with the default value of 'Stretch'. Set this equal to 'None', and your image will not be stretched.
You also mentioned DPI, and there is a subetely involved if using ViewboxUnits="Absolute'. but I'm not sure if your hitting that because 'Absolute' isn't the default value. If you are, please copy/paste your ImageBrush properties and I can tell you for certain.
Hope that helps,
Tim Cahill [MSFT]
This message is provided "As Is" with no warranties, and confers no rights. Opinions and views expressed here are not necessarily those of Microsoft Corporation.