我对齐了两张图像,一张在另一张上,
我正在尝试在顶部设置一个透明圆圈
出于某种原因,EllipseGeometry Radius 和 Center 属性不起作用。
这是 XAML 代码
谢谢 !
<Viewbox Grid.Row="1" Stretch="Uniform" HorizontalAlignment="Center">
<Image Name="BackImage" Width="640" Height="480" Source="Images/black.png"/>
</Viewbox>
<Viewbox Grid.Row="1" Stretch="Uniform" HorizontalAlignment="Center">
<Image Name="FrontImage" Width="640" Height="480" Source="Images/white.png">
<Image.OpacityMask>
<DrawingBrush>
<DrawingBrush.Drawing>
<GeometryDrawing>
<GeometryDrawing.Pen>
<Pen Thickness="0" Brush="Transparent" />
</GeometryDrawing.Pen>
<GeometryDrawing.Brush>
<SolidColorBrush Color="Black" />
</GeometryDrawing.Brush>
<GeometryDrawing.Geometry>
<EllipseGeometry Center="0,0" RadiusX="1" RadiusY="3"/>
</GeometryDrawing.Geometry>
</GeometryDrawing>
</DrawingBrush.Drawing>
</DrawingBrush>
</Image.OpacityMask>
</Image>
</Viewbox>
.