2017-08-24 91 views
0

在我的Winphone 8.1中,复选框和它的内容之间没有填充,它们在visual studio xaml viewer中非常接近,我可以看到它们之间有空间。如何在复选框和其内容之间添加填充

    <StackPanel Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Orientation="Horizontal" VerticalAlignment="Stretch" Background="White"> 
        <CheckBox Name="Chk1" Height="55" Content="blah blah1" Margin="5,0,0,0"></CheckBox> 
        <CheckBox Name="Chk2" Height="55" MinWidth="100" Content="Blah blah2"></CheckBox> 
       </StackPanel> 

我甚至尝试添加最小宽度,但它没有用处..仍然没有填充复选框和其内容之间。

回答

1

使用填充左,那么它应该是罚款

<CheckBox Name="Chk1" Height="55" Padding="5,0,5,0" Content="blah blah1" Margin="5,0,0,0"></CheckBox> 
<CheckBox Name="Chk2" Height="55" Padding="5,0,5,0" MinWidth="100" Content="Blah blah2"></CheckBox>