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

1

6

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!

Elisa answered 26/10, 2014 at 9:28 Comment(0)
B
14

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

Boatswain answered 26/10, 2014 at 9:45 Comment(2)
Thanks a lot! I can't believe I missed this simple thing. Too bad I don't have enough reputation yet to upvote the answer :(Elisa
@Telemat MinWidth allows for a minimum to be set when you are using a liquid width e.g. dependant on dynamic content. Its pretty essential really.Anderegg

© 2022 - 2024 — McMap. All rights reserved.