Why does System.Windows.Controls.Button always have a padding of 10px?

前端 未结 3 1725
故里飘歌
故里飘歌 2021-01-21 04:38

See screenshot. The bounding cyan-bordered box is the button, while the blue fill is the rectangle. I cannot for the life of me figure out how to get rid of the padding in the b

3条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-21 05:00

    Did you try setting the Rectangle's margin to 0?

    
    

    EDIT: The padding must come from the button control template. Try using a custom template:

    
    
    

提交回复
热议问题