代码之家  ›  专栏  ›  技术社区  ›  Carl Rippon

按钮内容边距

  •  1
  • Carl Rippon  · 技术社区  · 14 年前

    我不知道如何去掉按钮内容周围的空白。下面是一些示例XAML:

    <Button Background="Red" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
        <Grid Background="Blue" Margin="0">
            <TextBlock Text="me" Padding="0"></TextBlock>
        </Grid>
    </Button>
    

    我好像摆脱不了那个红点。有人有什么想法吗?

    1 回复  |  直到 14 年前
        1
  •  2
  •   Nilesh Gule    14 年前
    推荐文章