Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why can't I make my button's width smaller?

I'm working on universal app. When I'm designing the view for Windows Phone 8.1 project, I can't make any button's width smaller than 109. If I set the button's width property to smaller than that, it becomes 109 when rendered.

I would like to know how to force the button to be smaller than that, and why does this limitation exists in the first place.

Thanks a lot for helping!

like image 560
Nik A. Avatar asked Oct 26 '14 09:10

Nik A.


People also ask

How do you fix a button width?

Tip: Use pixels if you want to set a fixed width and use percent for responsive buttons (e.g. 50% of its parent element).

Should buttons be fixed width?

Fixing the width for buttons will give a coherent aspect to the interface. Yet, it has the risk of not being able to handle further buttons with perhaps longer labels. This reason makes it incompatible with a fixed guideline. You can always emphasise one particular button by playing on size, colour and padding.

How do you make a button smaller in CSS?

Pure CSS Button Sizes class: There is no predefined class for button size we have to do that by using CSS. Button Size percentage depends on the parent: button-xsmall: This class is used to create extra small buttons (70%). button-small: This class is used to create small buttons (85%).


1 Answers

If you are just dragging the button from the Toolbox, it will set a MinWidth and MinHeight for you. You need to change these properties.

<Button MinWidth="25" MinHeight="50" />

enter image description here

like image 100
Chubosaurus Software Avatar answered Oct 15 '22 07:10

Chubosaurus Software