I’ve got a Grid with some scale transform applied; the Grid contains an image:
<Grid Background="Black">
<Grid.LayoutTransform>
<ScaleTransform ScaleX="5.7" ScaleY="3.7"/>
</Grid.LayoutTransform>
<Image Source="rw.bmp" VerticalAlignment="Top"/>
</Grid>
The image is 2 by 1 pixels, one pixel red and one white:

I expect to get such a rendered image (stretched):

but I actually get this one (again stretched):

You can see that the actual rendered image is somehow kind of smoothed before stretch, instead of being smoothed after stretch.
Is there a way to get the image as in the expected example?
Edit: tried different values of RenderOptions.BitmapScalingMode. The closest to what I need is “NearestNeighbor”, which gives the following:

I’m not positive, but could you somehow use
RenderOptions.BitmapScalingModewith this?