Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where does the padding of TextBox come from?

I have already set all BorderThickness, Margin, and Padding to 0,0,0,0. Why is there still internal padding?

By the way, why is the text in TextBox of 24pt the same size of the text in TextBlock of 32pt?

enter image description here

like image 277
Dante May Code Avatar asked Mar 02 '12 15:03

Dante May Code


2 Answers

This space is used for increasing touch area of a Button.

To remove it, in Expression Blend click Template - Create From Copy. Than go to xaml and find Padding="10,5,10,3" (something like that) and delete it.

like image 98
Ku6opr Avatar answered Oct 13 '22 05:10

Ku6opr


You need to set Margin="-10,-10,-10,-10" to remove the extra space reserved by WP

like image 43
ValGe Avatar answered Oct 13 '22 04:10

ValGe