In order to specify the GeometryDrawing in absolute coordinates, you have to set the Stretch
property of the DrawingBrush to None
.
Moreover I would also recommend to put both images in one ViewBox.
<Viewbox Stretch="Uniform" HorizontalAlignment="Center">
<Grid>
<Image Name="BackImage" Width="640" Height="480" Source="Images/black.png"/>
<Image Name="FrontImage" Width="640" Height="480" Source="Images/white.png">
<Image.OpacityMask>
<DrawingBrush Stretch="None">
<DrawingBrush.Drawing>
<GeometryDrawing Brush="Black">
<GeometryDrawing.Geometry>
<EllipseGeometry Center="320,240"
RadiusX="150" RadiusY="100"/>
</GeometryDrawing.Geometry>
</GeometryDrawing>
</DrawingBrush.Drawing>
</DrawingBrush>
</Image.OpacityMask>
</Image>
</Grid>
</Viewbox>