代码之家  ›  专栏  ›  技术社区  ›  Bigeyes

用几何图形绘制字母图像

  •  1
  • Bigeyes  · 技术社区  · 7 年前

    我想要一个正方形的字母图像。例如。

    image

    我要正方形的背景是蓝色,信的字母是白色。

    困难的是我需要很多字母D和S等,所以我更喜欢一个工具。

    1 回复  |  直到 7 年前
        1
  •  2
  •   Tony    7 年前

    也许这能帮上忙:

    <WrapPanel TextBlock.FontFamily="Verdana">
        <Button Background="Blue">
            <Viewbox>
                <TextBlock Foreground="White">A</TextBlock>
            </Viewbox>
        </Button>
        <Button Background="Blue">
            <Viewbox>
                <TextBlock Foreground="White">B</TextBlock>
            </Viewbox>
        </Button>
        <Button Background="Blue">
            <Viewbox>
                <TextBlock Foreground="White">C</TextBlock>
            </Viewbox>
        </Button>
    </WrapPanel>
    

    Sample

    推荐文章