TextBox的填充来自哪里?

时间:2012-03-02 15:08:23

标签: silverlight windows-phone-7 textbox padding

我已将所有BorderThicknessMarginPadding设置为0,0,0,0。为什么还有内部填充?

顺便说一下,为什么24 {的TextBox中的文字与32pt TextBlock中文字的大小相同?

enter image description here

3 个答案:

答案 0 :(得分:6)

此空格用于增加Button的触摸区域。

要删除它,请在Expression Blend点击Template - Create From Copy。然后转到xaml并找到Padding="10,5,10,3"(类似的东西)并删除它。

答案 1 :(得分:2)

您需要设置Margin =“ - 10,-10,-10,-10”以删除WP保留的额外空间

答案 2 :(得分:0)

您可以在上面的解决方案中使用Application.Current.Resources [“PhoneTouchTargetOverhang”]而不是10。

相关问题