如何制作为Windows Phone 8绘制方格纸状方块的画笔?

时间:2013-12-07 11:05:34

标签: wpf windows-phone-8

以下是WPF的解决方案:

<DrawingBrush Viewport="0,0,20,20"
          ViewportUnits="Absolute" TileMode="Tile">
            <DrawingBrush.Drawing>
                <DrawingGroup>
                    <GeometryDrawing Geometry="M0,0 L1,0 1,0.1, 0,0.1Z" Brush="LightBlue" />
                    <GeometryDrawing Geometry="M0,0 L0,1 0.1,1, 0.1,0Z" Brush="LightBlue" />
                </DrawingGroup>
            </DrawingBrush.Drawing>
        </DrawingBrush>

但据我所知,WinPhone8下没有DrawingBrush。

1 个答案:

答案 0 :(得分:0)

您可以使用Path类而不是DrawingBrush。

示例:msdn tutorialgeekCamp